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
).
Modifier and Type | Method and Description |
---|---|
void |
assignCatalogEnablerToCatalog(Id catalogEnablerId,
Id catalogId)
Adds an existing
CatalogEnabler to a Catalog. |
boolean |
canAssignCatalogEnablers()
Tests if this user can alter catalog enabler/catalog mappings.
|
boolean |
canAssignCatalogEnablersToCatalog(Id catalogId)
Tests if this user can alter catalog enabler/catalog mappings.
|
IdList |
getAssignableCatalogIds(Id catalogId)
Gets a list of catalogs including and under the given catalog node in
which any catalog enabler can be assigned.
|
IdList |
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.
|
void |
reassignCatalogEnablerToCatalog(Id catalogEnablerId,
Id fromCatalogId,
Id toCatalogId)
Moves a
CatalogEnabler from one Catalog
to another. |
void |
unassignCatalogEnablerFromCatalog(Id catalogEnablerId,
Id catalogId)
Removes a
CatalogEnabler from a Catalog. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignCatalogEnablers()
PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer lookup operations
to unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignCatalogEnablersToCatalog(Id catalogId)
PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer lookup operations
to unauthorized users.catalogId
- the Id
of the Catalog
false
if mapping is not authorized, true
otherwiseNullArgumentException
- catalogId
is
null
mandatory
- This method must be implemented. IdList getAssignableCatalogIds(Id catalogId) throws OperationFailedException
catalogId
- the Id
of the Catalog
Ids
NullArgumentException
- catalogId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableCatalogIdsForCatalogEnabler(Id catalogId, Id catalogEnablerId) throws OperationFailedException
catalogId
- the Id
of the Catalog
catalogEnablerId
- the Id
of the
CatalogEnabler
Ids
NullArgumentException
- catalogId
or
catalogEnablerId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignCatalogEnablerToCatalog(Id catalogEnablerId, Id catalogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
CatalogEnabler
to a Catalog.
catalogEnablerId
- the Id
of the
CatalogEnabler
catalogId
- the Id
of the Catalog
AlreadyExistsException
- catalogEnablerId
is already assigned to catalogId
NotFoundException
- catalogEnablerId
or
catalogId
not foundNullArgumentException
- catalogEnablerId
or catalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignCatalogEnablerFromCatalog(Id catalogEnablerId, Id catalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CatalogEnabler
from a Catalog.
catalogEnablerId
- the Id
of the
CatalogEnabler
catalogId
- the Id
of the Catalog
NotFoundException
- catalogEnablerId
or
catalogId
not found or catalogEnablerId
is not assigned to catalogId
NullArgumentException
- catalogEnablerId
or catalogId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignCatalogEnablerToCatalog(Id catalogEnablerId, Id fromCatalogId, Id toCatalogId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CatalogEnabler
from one Catalog
to another. Mappings to other Catalogs
are unaffected.catalogEnablerId
- the Id
of the
CatalogEnabler
fromCatalogId
- the Id
of the current
Catalog
toCatalogId
- the Id
of the destination
Catalog
NotFoundException
- catalogEnablerId,
fromCatalogEnablerId,
or toCatalogEnablerId
not found or catalogEnablerId
not
mapped to fromCatalogId
NullArgumentException
- catalogEnablerId,
fromCatalogId,
or toCatalogId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.