Interface CanonicalUnitEnablerCatalogueAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CanonicalUnitEnablerCatalogueAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignCanonicalUnitEnablers

      boolean canAssignCanonicalUnitEnablers()
      Tests if this user can alter canonical unit enabler/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.
    • canAssignCanonicalUnitEnablersToCatalogue

      boolean canAssignCanonicalUnitEnablersToCatalogue(Id catalogueId)
      Tests if this user can alter canonical unit enabler/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.
      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 canonical unit enabler 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.
    • getAssignableCatalogueIdsForCanonicalUnitEnabler

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

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

      void unassignCanonicalUnitEnablerFromCatalogue(Id canonicalUnitEnablerId, Id catalogueId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a CanonicalUnitEnabler from a Catalogue .
      Parameters:
      canonicalUnitEnablerId - the Id of the CanonicalUnitEnabler
      catalogueId - the Id of the Catalogue
      Throws:
      NotFoundException - canonicalUnitEnablerId or catalogueId not found or canonicalUnitEnablerId already assigned to catalogueId
      NullArgumentException - canonicalUnitEnablerId or catalogueId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignCanonicalUnitEnablerToCatalogue

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