Interface ParticipantCatalogueAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ParticipantCatalogueAssignmentSession extends OsidSession

This session provides methods to re-assign Participants to Catalogues . A Participant may map to multiple Catalogues and removing the last reference to a Participant is the equivalent of deleting it. Each Catalogue may have its own authorizations governing who is allowed to operate on it.

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

  • Method Details

    • canAssignParticipants

      boolean canAssignParticipants()
      Tests if this user can alter participant/catalogue 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 lookup operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignParticipantsToCatalogue

      boolean canAssignParticipantsToCatalogue(Id catalogueId)
      Tests if this user can alter participant/catalogue 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:
      catalogueId - the Id of the Catalogue
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - catalogueId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableCatalogueIds

      IdList getAssignableCatalogueIds(Id catalogueId) throws OperationFailedException
      Gets a list of catalogues including and under the given catalogue node in which any participant can be assigned.
      Parameters:
      catalogueId - the Id of the Catalogue
      Returns:
      list of assignable catalogue Ids
      Throws:
      NullArgumentException - catalogueId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableCatalogueIdsForParticipant

      IdList getAssignableCatalogueIdsForParticipant(Id catalogueId, Id participantId) throws OperationFailedException
      Gets a list of catalogues including and under the given catalogue node in which a specific participant can be assigned.
      Parameters:
      catalogueId - the Id of the Catalogue
      participantId - the Id of the Participant
      Returns:
      list of assignable catalogue Ids
      Throws:
      NullArgumentException - catalogueId or participantId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignParticipantToCatalogue

      void assignParticipantToCatalogue(Id participantId, Id catalogueId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Participant to a Catalogue .
      Parameters:
      participantId - the Id of the Participant
      catalogueId - the Id of the Catalogue
      Throws:
      AlreadyExistsException - participantId already assigned to catalogueId
      NotFoundException - participantId or catalogueId not found
      NullArgumentException - participantId or catalogueId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignParticipantFromCatalogue

      void unassignParticipantFromCatalogue(Id participantId, Id catalogueId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Participant from a Catalogue .
      Parameters:
      participantId - the Id of the Participant
      catalogueId - the Id of the Catalogue
      Throws:
      NotFoundException - participantId or catalogueId not found or participantId not mapped to catalogueId
      NullArgumentException - participantId or catalogueId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignParticipantToCatalogue

      void reassignParticipantToCatalogue(Id participantId, Id fromCatalogueId, Id toCatalogueId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Participant from one Catalogue to another. Mappings to other Catalogues are unaffected.
      Parameters:
      participantId - the Id of the Participant
      fromCatalogueId - the Id of the current Catalogue
      toCatalogueId - the Id of the destination Catalogue
      Throws:
      AlreadyExistsException - participantId already assigned to toCatalogueId
      NotFoundException - participantId, fromCatalogueId , or toCatalogueId not found or participantId not mapped to fromCatalogueId
      NullArgumentException - participantId, fromCatalogueId , or toCatalogueId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.