public interface PackageDepotAssignmentSession extends OsidSession
This session provides methods to re-assign Packages to
Depots. A Package may map to multiple
Depots and removing the last reference to an Package
is the equivalent of deleting it. Each Depot may
have its own authorizations governing who is allowed to operate on it.
Moving or adding a reference of a Package to another
Depot is not a copy operation (eg: does not change its
Id ).
| Modifier and Type | Method and Description |
|---|---|
void |
assignPackageToDepot(Id packageId,
Id depotId)
Adds an existing
Package to a Depot. |
boolean |
canAssignPackages()
Tests if this user can alter package/depot mappings.
|
boolean |
canAssignPackagesToDepot(Id depotId)
Tests if this user can alter package/depot mappings.
|
IdList |
getAssignableDepotIds(Id depotId)
Gets a list of depot including and under the given depot node in which
any package can be assigned.
|
IdList |
getAssignableDepotIdsForPackage(Id depotId,
Id packageId)
Gets a list of depot including and under the given depot node in which
a specific package can be assigned.
|
void |
unassignPackageFromDepot(Id packageId,
Id depotId)
Removes a
Package from a Depot. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canAssignPackages()
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. boolean canAssignPackagesToDepot(Id depotId)
PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.depotId - the Id of the Depot false if mapping is not authorized, true
otherwiseNullArgumentException - depotId is
null mandatory - This method must be implemented. IdList getAssignableDepotIds(Id depotId) throws OperationFailedException
depotId - the Id of the Depot Ids NullArgumentException - depotId is
null OperationFailedException - unable to complete requestmandatory - This method must be implemented. IdList getAssignableDepotIdsForPackage(Id depotId, Id packageId) throws OperationFailedException
depotId - the Id of the Depot packageId - the Id of the Package Ids NullArgumentException - depotId or
packageId is null OperationFailedException - unable to complete requestmandatory - This method must be implemented. void assignPackageToDepot(Id packageId, Id depotId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Package to a Depot. packageId - the Id of the Package depotId - the Id of the Depot AlreadyExistsException - packageId is
already assigned to depotId NotFoundException - packageId or
depotId not foundNullArgumentException - packageId or
depotId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void unassignPackageFromDepot(Id packageId, Id depotId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Package from a Depot. packageId - the Id of the Package depotId - the Id of the Depot NotFoundException - packageId or
depotId not found or packageId not
assigned to depotId NullArgumentException - packageId or
depotId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.