public interface CatalogAssignmentSession extends 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.
Modifier and Type | Method and Description |
---|---|
void |
assignIdToCatalog(Id id,
Id catalogId)
Adds an
Id to a Catalog. |
boolean |
canAssignCatalogs()
Tests if this user can perform alter
Id/Catalog
mappings. |
void |
unassignIdFromCatalog(Id id,
Id catalogId)
Removes an
Id from a Catalog. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignCatalogs()
Id/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 assignment operations to unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. void assignIdToCatalog(Id id, Id catalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a Catalog.
id
- an Id
catalogId
- the Id
of the Catalog
AlreadyExistsException
- id
is already
mapped to catalogId
NotFoundException
- id
or
catalogId
not foundNullArgumentException
- id
or
catalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignIdFromCatalog(Id id, Id catalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
from a Catalog.
id
- an Id
catalogId
- the Id
of the Catalog
NotFoundException
- id
or
catalogId
not found or id
is not mapped
to catalogId
NullArgumentException
- id
or
catalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.