Interface CatalogAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to assign OSID Ids to
Catalogs . An Id may appear in multiple Catalogs and
removing the last reference to an Id is the equivalent of deleting
it. Each catalog may have its own authorizations as to who is allowed to
operate on it.
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignIdToCatalog(Id id, Id catalogId) Adds anIdto aCatalog.booleanTests if this user can perform alterId/Catalogmappings.voidreassignIdToCatalog(Id id, Id fromCatalogId, Id toCatalogId) Moves anIdfrom oneCatalogto another.voidunassignIdFromCatalog(Id id, Id catalogId) Removes anIdfrom aCatalog.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignCatalogs
boolean canAssignCatalogs()Tests if this user can perform alterId/Catalogmappings. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
assignIdToCatalog
void assignIdToCatalog(Id id, Id catalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aCatalog.- Parameters:
id- anIdcatalogId- theIdof theCatalog- Throws:
AlreadyExistsException-idis already mapped tocatalogIdNotFoundException-idorcatalogIdnot foundNullArgumentException-idorcatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignIdFromCatalog
void unassignIdFromCatalog(Id id, Id catalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes anIdfrom aCatalog.- Parameters:
id- anIdcatalogId- theIdof theCatalog- Throws:
NotFoundException-idorcatalogIdnot found oridis not mapped tocatalogIdNullArgumentException-idorcatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignIdToCatalog
void reassignIdToCatalog(Id id, Id fromCatalogId, Id toCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves anIdfrom oneCatalogto another. Mappings to otherCatalogsare unaffected.- Parameters:
id- theIdfromCatalogId- theIdof the currentCatalogtoCatalogId- theIdof the destinationCatalog- Throws:
AlreadyExistsException-idalready assigned totoCatalogIdNotFoundException-id, fromCatalogId, ortoCatalogIdnot found oridnot mapped tofromCatalogIdNullArgumentException-id, fromCatalogId, ortoCatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-