Interface CatalogEnablerCatalogAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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 Summary
Modifier and TypeMethodDescriptionvoidassignCatalogEnablerToCatalog(Id catalogEnablerId, Id catalogId) Adds an existingCatalogEnablerto aCatalog.booleanTests if this user can alter catalog enabler/catalog mappings.booleancanAssignCatalogEnablersToCatalog(Id catalogId) Tests if this user can alter catalog enabler/catalog mappings.getAssignableCatalogIds(Id catalogId) Gets a list of catalogs including and under the given catalog node in which any catalog enabler can be assigned.getAssignableCatalogIdsForCatalogEnabler(Id catalogId, Id catalogEnablerId) Gets a list of catalogs including and under the given catalog node in which a specific catalog enabler can be assigned.voidreassignCatalogEnablerToCatalog(Id catalogEnablerId, Id fromCatalogId, Id toCatalogId) Moves aCatalogEnablerfrom oneCatalogto another.voidunassignCatalogEnablerFromCatalog(Id catalogEnablerId, Id catalogId) Removes aCatalogEnablerfrom 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
-
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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignCatalogEnablersToCatalog
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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Parameters:
catalogId- theIdof theCatalog- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-catalogIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableCatalogIds
Gets a list of catalogs including and under the given catalog node in which any catalog enabler can be assigned.- Parameters:
catalogId- theIdof theCatalog- Returns:
- list of assignable catalog
Ids - Throws:
NullArgumentException-catalogIdisnullOperationFailedException- 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- theIdof theCatalogcatalogEnablerId- theIdof theCatalogEnabler- Returns:
- list of assignable catalog
Ids - Throws:
NullArgumentException-catalogIdorcatalogEnablerIdisnullOperationFailedException- 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 existingCatalogEnablerto aCatalog.- Parameters:
catalogEnablerId- theIdof theCatalogEnablercatalogId- theIdof theCatalog- Throws:
AlreadyExistsException-catalogEnablerIdis already assigned tocatalogIdNotFoundException-catalogEnablerIdorcatalogIdnot foundNullArgumentException-catalogEnablerIdorcatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignCatalogEnablerFromCatalog
void unassignCatalogEnablerFromCatalog(Id catalogEnablerId, Id catalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aCatalogEnablerfrom aCatalog.- Parameters:
catalogEnablerId- theIdof theCatalogEnablercatalogId- theIdof theCatalog- Throws:
NotFoundException-catalogEnablerIdorcatalogIdnot found orcatalogEnablerIdis not assigned tocatalogIdNullArgumentException-catalogEnablerIdorcatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignCatalogEnablerToCatalog
void reassignCatalogEnablerToCatalog(Id catalogEnablerId, Id fromCatalogId, Id toCatalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aCatalogEnablerfrom oneCatalogto another. Mappings to otherCatalogsare unaffected.- Parameters:
catalogEnablerId- theIdof theCatalogEnablerfromCatalogId- theIdof the currentCatalogtoCatalogId- theIdof the destinationCatalog- Throws:
AlreadyExistsException-catalogEnablerIdalready assigned totoCatalogIdNotFoundException-catalogEnablerId, fromCatalogEnablerId, ortoCatalogEnablerIdnot found orcatalogEnablerIdnot mapped tofromCatalogIdNullArgumentException-catalogEnablerId, fromCatalogId, ortoCatalogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-