public interface OfferingConstrainerCatalogueAssignmentSession extends OsidSession
This session provides methods to re-assign OfferingConstrainer
to Catalogue
mappings. An
OfferingConstrainer
may appear in multiple Catalogue
objects and removing the last reference to an
OfferingConstrainer
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 an OfferingConstrainer
to another
Catalogue
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignOfferingConstrainerToCatalogue(Id offeringConstrainerId,
Id catalogueId)
Adds an existing
OfferingConstrainer to a
Catalogue. |
boolean |
canAssignOfferingConstrainers()
Tests if this user can alter offering constrainer/catalogue mappings.
|
boolean |
canAssignOfferingConstrainersToCatalogue(Id catalogueId)
Tests if this user can alter offering constrainer/catalogue mappings.
|
IdList |
getAssignableCatalogueIds(Id catalogueId)
Gets a list of catalogues including and under the given catalogue node
in which any offering constrainer can be assigned.
|
IdList |
getAssignableCatalogueIdsForOfferingConstrainer(Id catalogueId,
Id offeringConstrainerId)
Gets a list of catalogues including and under the given catalogue node
in which a specific offering constrainer can be assigned.
|
void |
reassignOfferingConstrainerToCatalogue(Id offeringConstrainerId,
Id fromCatalogueId,
Id toCatalogueId)
Moves an
OfferingConstrainer from one Catalogue
to another. |
void |
unassignOfferingConstrainerFromCatalogue(Id offeringConstrainerId,
Id catalogueId)
Removes an
OfferingConstrainer from a Catalogue. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignOfferingConstrainers()
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 canAssignOfferingConstrainersToCatalogue(Id catalogueId)
PERMISSION_DENIED.
This is intended as
a hint to an application that may opt not to offer lookup 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 getAssignableCatalogueIdsForOfferingConstrainer(Id catalogueId, Id offeringConstrainerId) throws OperationFailedException
catalogueId
- the Id
of the Catalogue
offeringConstrainerId
- the Id
of the
OfferingConstrainer
Ids
NullArgumentException
- catalogueId
or
offeringConstrainerId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignOfferingConstrainerToCatalogue(Id offeringConstrainerId, Id catalogueId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
OfferingConstrainer
to a
Catalogue.
offeringConstrainerId
- the Id
of the
OfferingConstrainer
catalogueId
- the Id
of the Catalogue
AlreadyExistsException
- offeringConstrainerId
already assigned to catalogueId
NotFoundException
- offeringConstrainerId
or catalogueId
not foundNullArgumentException
- offeringConstrainerId
or catalogueId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignOfferingConstrainerFromCatalogue(Id offeringConstrainerId, Id catalogueId) throws NotFoundException, OperationFailedException, PermissionDeniedException
OfferingConstrainer
from a Catalogue.
offeringConstrainerId
- the Id
of the
OfferingConstrainer
catalogueId
- the Id
of the Catalogue
NotFoundException
- offeringConstrainerId
or catalogueId
not found or
offeringConstrainerId
already assigned to
catalogueId
NullArgumentException
- offeringConstrainerId
or catalogueId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignOfferingConstrainerToCatalogue(Id offeringConstrainerId, Id fromCatalogueId, Id toCatalogueId) throws NotFoundException, OperationFailedException, PermissionDeniedException
OfferingConstrainer
from one Catalogue
to another. Mappings to other Catalogues
are
unaffected.offeringConstrainerId
- the Id
of the
OfferingConstrainer
fromCatalogueId
- the Id
of the current
Catalogue
toCatalogueId
- the Id
of the destination
Catalogue
NotFoundException
- offeringConstraienrId,
fromCatalogueId,
or toCatalogueId
not
found or offeringConstrainerId,
not mapped to
fromCatalogueId
NullArgumentException
- offeringConstrainerId,
fromCatalogueId,
or toCatalogueId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.