Interface CatalogEnablerCatalogAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface CatalogEnablerCatalogAssignmentSession extends OsidSession

This session provides methods to re-assign CatalogEnabler to Catalog mappings. A CatalogEnabler may appear in multiple Catalog objects and removing the last reference to a CatalogEnabler is the equivalent of deleting it. Each Catalog may have its own authorizations governing who is allowed to operate on it.

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

  • Method Details

    • canAssignCatalogEnablers

      boolean canAssignCatalogEnablers()
      Tests if this user can alter catalog enabler/catalog 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.
    • canAssignCatalogEnablersToCatalog

      boolean canAssignCatalogEnablersToCatalog(Id catalogId)
      Tests if this user can alter catalog enabler/catalog 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:
      catalogId - the Id of the Catalog
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - catalogId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableCatalogIds

      IdList getAssignableCatalogIds(Id catalogId) throws OperationFailedException
      Gets a list of catalogs including and under the given catalog node in which any catalog enabler can be assigned.
      Parameters:
      catalogId - the Id of the Catalog
      Returns:
      list of assignable catalog Ids
      Throws:
      NullArgumentException - catalogId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableCatalogIdsForCatalogEnabler

      IdList getAssignableCatalogIdsForCatalogEnabler(Id catalogId, Id catalogEnablerId) throws OperationFailedException
      Gets a list of catalogs including and under the given catalog node in which a specific catalog enabler can be assigned.
      Parameters:
      catalogId - the Id of the Catalog
      catalogEnablerId - the Id of the CatalogEnabler
      Returns:
      list of assignable catalog Ids
      Throws:
      NullArgumentException - catalogId or catalogEnablerId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignCatalogEnablerToCatalog

      void assignCatalogEnablerToCatalog(Id catalogEnablerId, Id catalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing CatalogEnabler to a Catalog .
      Parameters:
      catalogEnablerId - the Id of the CatalogEnabler
      catalogId - the Id of the Catalog
      Throws:
      AlreadyExistsException - catalogEnablerId is already assigned to catalogId
      NotFoundException - catalogEnablerId or catalogId not found
      NullArgumentException - catalogEnablerId or catalogId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignCatalogEnablerFromCatalog

      void unassignCatalogEnablerFromCatalog(Id catalogEnablerId, Id catalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a CatalogEnabler from a Catalog .
      Parameters:
      catalogEnablerId - the Id of the CatalogEnabler
      catalogId - the Id of the Catalog
      Throws:
      NotFoundException - catalogEnablerId or catalogId not found or catalogEnablerId is not assigned to catalogId
      NullArgumentException - catalogEnablerId or catalogId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignCatalogEnablerToCatalog

      void reassignCatalogEnablerToCatalog(Id catalogEnablerId, Id fromCatalogId, Id toCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a CatalogEnabler from one Catalog to another. Mappings to other Catalogs are unaffected.
      Parameters:
      catalogEnablerId - the Id of the CatalogEnabler
      fromCatalogId - the Id of the current Catalog
      toCatalogId - the Id of the destination Catalog
      Throws:
      AlreadyExistsException - catalogEnablerId already assigned to toCatalogId
      NotFoundException - catalogEnablerId, fromCatalogEnablerId , or toCatalogEnablerId not found or catalogEnablerId not mapped to fromCatalogId
      NullArgumentException - catalogEnablerId, fromCatalogId , or toCatalogId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.