Interface TriggerSystemAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface TriggerSystemAssignmentSession extends OsidSession

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

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

  • Method Details

    • canAssignTriggers

      boolean canAssignTriggers()
      Tests if this user can alter trigger/system mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignTriggersToSystem

      boolean canAssignTriggersToSystem(Id systemId)
      Tests if this user can alter trigger/system mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.
      Parameters:
      systemId - the Id of the System
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - systemId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableSystemIds

      IdList getAssignableSystemIds(Id systemId) throws OperationFailedException
      Gets a list of systems including and under the given system node in which any trigger can be assigned.
      Parameters:
      systemId - the Id of the System
      Returns:
      list of assignable system Ids
      Throws:
      NullArgumentException - systemId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableSystemIdsForTrigger

      IdList getAssignableSystemIdsForTrigger(Id systemId, Id triggerId) throws OperationFailedException
      Gets a list of systems including and under the given system node in which a specific trigger can be assigned.
      Parameters:
      systemId - the Id of the System
      triggerId - the Id of the Trigger
      Returns:
      list of assignable system Ids
      Throws:
      NullArgumentException - systemId or triggerId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignTriggerToSystem

      void assignTriggerToSystem(Id triggerId, Id systemId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Trigger to a System .
      Parameters:
      triggerId - the Id of the Trigger
      systemId - the Id of the System
      Throws:
      AlreadyExistsException - triggerId is already assigned to systemId
      NotFoundException - triggerId or systemId not found
      NullArgumentException - triggerId or systemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignTriggerFromSystem

      void unassignTriggerFromSystem(Id triggerId, Id systemId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Trigger from a System .
      Parameters:
      triggerId - the Id of the Trigger
      systemId - the Id of the System
      Throws:
      NotFoundException - triggerId or systemId not found or triggerId not assigned to systemId
      NullArgumentException - triggerId or systemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignTriggerToSystem

      void reassignTriggerToSystem(Id triggerId, Id fromSystemId, Id toSystemId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Trigger from one System to another. Mappings to other Systems are unaffected.
      Parameters:
      triggerId - the Id of the Trigger
      fromSystemId - the Id of the current System
      toSystemId - the Id of the destination System
      Throws:
      AlreadyExistsException - triggerId already assigned to toSystemId
      NotFoundException - triggerId, fromSystemId , or toSystemId not found or triggerId not mapped to fromSystemId
      NullArgumentException - triggerId, fromSystemId , or toSystemId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.