Interface GroupAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface GroupAssignmentSession extends OsidSession

This session provides methods to re-assign Resources to group Resources .

  • Method Details

    • getBinId

      Id getBinId()
      Gets the Bin Id associated with this session.
      Returns:
      the Bin Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getBin

      Gets the Bin associated with this session.
      Returns:
      the Bin associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canAssignResources

      boolean canAssignResources()
      Tests if this user can change resource group mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not wish to offer assignment operations.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignResourcesToGroup

      boolean canAssignResourcesToGroup(Id resourceId)
      Tests if this user can assign members to the given group. 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:
      resourceId - the Id of the Resource
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - resourceId is null
      Compliance:
      mandatory - This method must be implemented.
    • assignResourceToGroup

      void assignResourceToGroup(Id resourceId, Id resourceGroupId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Resource to a Resource group.
      Parameters:
      resourceId - the Id of the Resource
      resourceGroupId - the Id of the Resource group
      Throws:
      AlreadyExistsException - resourceId is already part of resourceGroupId
      NotFoundException - resourceId or resourceGroupId not found
      NullArgumentException - resourceId or resourceGroupId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignResourceFromGroup

      void unassignResourceFromGroup(Id resourceId, Id resourceGroupId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Resource from a Resource group.
      Parameters:
      resourceId - the Id of the Resource
      resourceGroupId - the Id of the Repository
      Throws:
      NotFoundException - resourceId or resourceGroupId not found or resourceId not part of resourceGroupId
      NullArgumentException - resourceId or resourceGroupId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.