public interface CanonicalUnitCatalogueAssignmentSession extends OsidSession
This session provides methods to re-assign CanonicalUnits
to Bilings.
A CanonicalUnit
may map
to multiple Catalogues
and removing the last reference to a
CanonicalUnit
is the equivalent of deleting it. Each
Catalogue
may have its own authorizations governing who is allowed
to operate on it.
Adding a reference of a CanonicalUnit
to another
Catalogue
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignCanonicalUnitToCatalogue(Id canonicalUnitId,
Id catalogueId)
Adds an existing
CanonicalUnit to a Catalogue. |
boolean |
canAssignCanonicalUnits()
Tests if this user can alter canonical unit/catalogue mappings.
|
boolean |
canAssignCanonicalUnitsToCatalogue(Id catalogueId)
Tests if this user can alter canonical unit/catalogue mappings.
|
IdList |
getAssignableCatalogueIds(Id catalogueId)
Gets a list of catalogues including and under the given catalogue node
in which any canonical unit can be assigned.
|
IdList |
getAssignableCatalogueIdsForCanonicalUnit(Id catalogueId,
Id canonicalUnitId)
Gets a list of catalogues including and under the given catalogue node
in which a specific canonical unit can be assigned.
|
void |
unassignCanonicalUnitFromCatalogue(Id canonicalUnitId,
Id catalogueId)
Removes a
CanonicalUnit from a Catalogue. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignCanonicalUnits()
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 canAssignCanonicalUnitsToCatalogue(Id catalogueId)
PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer assignment
operations to unauthorized users.catalogueId
- the Id
of the Catalogue
false
if mapping is not authorized, true
otherwiseNullArgumentException
- catalogueId
is
null
mandatory
- This method must be implemented. IdList getAssignableCatalogueIds(Id catalogueId) throws OperationFailedException
catalogueId
- the Id
of the Catalogue
Ids
NullArgumentException
- catalogueId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableCatalogueIdsForCanonicalUnit(Id catalogueId, Id canonicalUnitId) throws OperationFailedException
catalogueId
- the Id
of the Catalogue
canonicalUnitId
- the Id
of the
CanonicalUnit
Ids
NullArgumentException
- catalogueId
or
canonicalUnitId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignCanonicalUnitToCatalogue(Id canonicalUnitId, Id catalogueId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
CanonicalUnit
to a Catalogue.
canonicalUnitId
- the Id
of the
CanonicalUnit
catalogueId
- the Id
of the Catalogue
AlreadyExistsException
- canonicalUnitId
already assigned to catalogueId
NotFoundException
- canonicalUnitId
or
catalogueId
not foundNullArgumentException
- canonicalUnitId
or catalogueId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignCanonicalUnitFromCatalogue(Id canonicalUnitId, Id catalogueId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CanonicalUnit
from a Catalogue.
canonicalUnitId
- the Id
of the
CanonicalUnit
catalogueId
- the Id
of the Catalogue
NotFoundException
- canonicalUnitId
or
catalogueId
not found or canonicalUnitId
not mapped to catalogueId
NullArgumentException
- canonicalUnitId
or catalogueId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.