Interface CheckEngineAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CheckEngineAssignmentSession extends OsidSession

This session provides methods to re-assign Checks to Engine mappings. A Check may appear in multiple Engine objects and removing the last reference to a Check is the equivalent of deleting it. Each Engine may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a Check to another Engine is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignChecks

      boolean canAssignChecks()
      Tests if this user can alter hold/engine mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known check methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignChecksToEngine

      boolean canAssignChecksToEngine(Id engineId)
      Tests if this user can alter hold/engine mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known check methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Parameters:
      engineId - the Id of the Engine
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - engineId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableEngineIds

      IdList getAssignableEngineIds(Id engineId) throws OperationFailedException
      Gets a list of engines including and under the given engine node in which any check can be assigned.
      Parameters:
      engineId - the Id of the Engine
      Returns:
      list of assignable engine Ids
      Throws:
      NullArgumentException - engineId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableEngineIdsForCheck

      IdList getAssignableEngineIdsForCheck(Id engineId, Id checkId) throws OperationFailedException
      Gets a list of engines including and under the given engine node in which a specific check can be assigned.
      Parameters:
      engineId - the Id of the Engine
      checkId - the Id of the Check
      Returns:
      list of assignable engine Ids
      Throws:
      NullArgumentException - engineId or checkId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignCheckToEngine

      void assignCheckToEngine(Id checkId, Id engineId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Check to a Engine .
      Parameters:
      checkId - the Id of the Check
      engineId - the Id of the Engine
      Throws:
      AlreadyExistsException - checkId is already assigned to engineId
      NotFoundException - checkId or engineId not found
      NullArgumentException - checkId or engineId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignCheckFromEngine

      void unassignCheckFromEngine(Id checkId, Id engineId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Check from a Engine .
      Parameters:
      checkId - the Id of the Check
      engineId - the Id of the Engine
      Throws:
      NotFoundException - checkId or engineId not found or checkId not assigned to engineId
      NullArgumentException - checkId or engineId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignCheckToEngine

      void reassignCheckToEngine(Id checkId, Id fromEngineId, Id toEngineId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Check from one Engine to another. Mappings to other Engines are unaffected.
      Parameters:
      checkId - the Id of the Check
      fromEngineId - the Id of the current Engine
      toEngineId - the Id of the destination Engine
      Throws:
      AlreadyExistsException - checkId already assigned to toEngineId
      NotFoundException - checkId, fromEngineId , or toEngineId not found or checkId not mapped to fromEngineId
      NullArgumentException - checkId, fromEngineId , or toEngineId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.