Interface InstallationPackageDepotAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign
InstallationPackages to Depots. A InstallationPackage may
map to multiple Depots and removing the last reference to an
InstallationPackage 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 InstallationPackage to
another Depot is not a copy operation (eg: does not change its
Id).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignInstallationPackageToDepot(Id installationPackageId, Id depotId) Adds an existingInstallationPackageto aDepot.booleanTests if this user can alter package/depot mappings.booleancanAssignInstallationPackagesToDepot(Id depotId) Tests if this user can alter package/depot mappings.getAssignableDepotIds(Id depotId) Gets a list of depot including and under the given depot node in which any package can be assigned.getAssignableDepotIdsForInstallationPackage(Id depotId, Id installationPackageId) Gets a list of depot including and under the given depot node in which a specific package can be assigned.voidreassignInstallationPackageToDepot(Id installationPackageId, Id fromDepotId, Id toDepotId) Moves aInstallationPackagefrom oneDepotto another.voidunassignInstallationPackageFromDepot(Id installationPackageId, Id depotId) Removes aInstallationPackagefrom aDepot.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignInstallationPackages
boolean canAssignInstallationPackages()Tests if this user can alter package/depot 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignInstallationPackagesToDepot
Tests if this user can alter package/depot 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Parameters:
depotId- theIdof theDepot- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-depotIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableDepotIds
Gets a list of depot including and under the given depot node in which any package can be assigned.- Parameters:
depotId- theIdof theDepot- Returns:
- list of assignable depot
Ids - Throws:
NullArgumentException-depotIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableDepotIdsForInstallationPackage
IdList getAssignableDepotIdsForInstallationPackage(Id depotId, Id installationPackageId) throws OperationFailedException Gets a list of depot including and under the given depot node in which a specific package can be assigned.- Parameters:
depotId- theIdof theDepotinstallationPackageId- theIdof theInstallationPackage- Returns:
- list of assignable depot
Ids - Throws:
NullArgumentException-depotIdorinstallationPackageIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignInstallationPackageToDepot
void assignInstallationPackageToDepot(Id installationPackageId, Id depotId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingInstallationPackageto aDepot.- Parameters:
installationPackageId- theIdof theInstallationPackagedepotId- theIdof theDepot- Throws:
AlreadyExistsException-installationPackageIdis already assigned todepotIdNotFoundException-installationPackageIdordepotIdnot foundNullArgumentException-installationPackageIdordepotIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignInstallationPackageFromDepot
void unassignInstallationPackageFromDepot(Id installationPackageId, Id depotId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aInstallationPackagefrom aDepot.- Parameters:
installationPackageId- theIdof theInstallationPackagedepotId- theIdof theDepot- Throws:
NotFoundException-installationPackageIdordepotIdnot found orinstallationPackageIdnot assigned todepotIdNullArgumentException-installationPackageIdordepotIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignInstallationPackageToDepot
void reassignInstallationPackageToDepot(Id installationPackageId, Id fromDepotId, Id toDepotId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aInstallationPackagefrom oneDepotto another. Mappings to otherDepotsare unaffected.- Parameters:
installationPackageId- theIdof theInstallationPackagefromDepotId- theIdof the currentDepottoDepotId- theIdof the destinationDepot- Throws:
AlreadyExistsException-installationPackageIdalready assigned totoDepotIdNotFoundException-installationPackageId, fromDepotId, ortoDepotIdnot found orinstallationPackageIdnot mapped tofromDepotIdNullArgumentException-installationPackageId, fromDepotId, ortoDepotIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-