Interface IdiomPressAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface IdiomPressAssignmentSession extends OsidSession

This session provides methods to re-assign Idioms to Press mappings. An Idiom may appear in multiple Press objects and removing the last reference to an Idiom is the equivalent of deleting it. Each Press may have its own authorizations governing who is allowed to operate on it.

Adding a reference of an Idiom to another Press is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignIdioms

      boolean canAssignIdioms()
      Tests if this user can alter idiom/press 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 press that may opt not to offer assignment operations to unauthorized users.
      Returns:
      false if idiom assignment is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignIdiomsToPress

      boolean canAssignIdiomsToPress(Id pressId)
      Tests if this user can alter idiom/press 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 press that may opt not to offer assignment operations to unauthorized users.
      Parameters:
      pressId - the Id of the Press
      Returns:
      false if idiom assignment is not authorized, true otherwise
      Throws:
      NullArgumentException - pressId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignablePressIds

      IdList getAssignablePressIds(Id pressId) throws OperationFailedException
      Gets a list of presses including and under the given press node in which any idiom can be assigned.
      Parameters:
      pressId - the Id of the Press
      Returns:
      list of assignable press Ids
      Throws:
      NullArgumentException - pressId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignablePressIdsForIdiom

      IdList getAssignablePressIdsForIdiom(Id pressId, Id idiomId) throws OperationFailedException
      Gets a list of presses including and under the given press node in which a specific idiom can be assigned.
      Parameters:
      pressId - the Id of the Press
      idiomId - the Id of the Idiom
      Returns:
      list of assignable press Ids
      Throws:
      NullArgumentException - pressId or idiomId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignIdiomToPress

      Adds an existing Idiom to a Press .
      Parameters:
      idiomId - the Id of the Idiom
      pressId - the Id of the Press
      Throws:
      AlreadyExistsException - idiomId is already assigned to pressId
      NotFoundException - idiomId or pressId not found
      NullArgumentException - idiomId or pressId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignIdiomFromPress

      void unassignIdiomFromPress(Id idiomId, Id pressId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes an Idiom from a Press .
      Parameters:
      idiomId - the Id of the Idiom
      pressId - the Id of the Press
      Throws:
      NotFoundException - idiomId or pressId not found or idiomId not assigned to pressId
      NullArgumentException - idiomId or pressId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignIdiomToPress

      void reassignIdiomToPress(Id idiomId, Id fromPressId, Id toPressId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Moves an Idiom from one Press to another. Mappings to other Presses are unaffected.
      Parameters:
      idiomId - the Id of the Idiom
      fromPressId - the Id of the current Press
      toPressId - the Id of the destination Press
      Throws:
      NotFoundException - idiomId, fromPressId , or toPressId not found or idiomId not mapped to fromPressId
      NullArgumentException - idiomId, fromPressId , or toPressId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.