Interface ParameterPressAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ParameterPressAssignmentSession extends OsidSession

This session provides methods to re-assign Parameter to Press mappings. A Parameter may appear in multiple Press objects and removing the last reference to a Parameter 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 a Parameter to another Press is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignParameters

      boolean canAssignParameters()
      Tests if this user can alter parameter/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 mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignParametersToPress

      boolean canAssignParametersToPress(Id pressId)
      Tests if this user can alter parameter/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 mapping 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 parameter 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.
    • getAssignablePressIdsForParameter

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

      void assignParameterToPress(Id parameterId, Id pressId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Parameter to a Press .
      Parameters:
      parameterId - the Id of the Parameter
      pressId - the Id of the Press
      Throws:
      AlreadyExistsException - parameterId is already assigned to pressId
      NotFoundException - parameterId or pressId not found
      NullArgumentException - parameterId or pressId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignParameterFromPress

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

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