OSID Logo
OSID Specifications
installation package
Version 3.0.0
Release Candidate Preview
Interfaceosid.installation.PackageDepotAssignmentSession
Implementsosid.OsidSession
Description

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 ).

MethodcanAssignPackages
Description

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 a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignPackagesToDepot
Description

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 a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Parametersosid.id.IddepotIdthe Id of the Depot
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT depotId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableDepotIds
Description

Gets a list of depot including and under the given depot node in which any package can be assigned.

Parametersosid.id.IddepotIdthe Id of the Depot
Returnosid.id.IdListlist of assignable depot Ids
ErrorsNULL_ARGUMENT depotId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableDepotIdsForPackage
Description

Gets a list of depot including and under the given depot node in which a specific package can be assigned.

Parametersosid.id.IddepotIdthe Id of the Depot
osid.id.IdpackageIdthe Id of the Package
Returnosid.id.IdListlist of assignable depot Ids
ErrorsNULL_ARGUMENT depotId or packageId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignPackageToDepot
Description

Adds an existing Package to a Depot.

Parametersosid.id.IdpackageIdthe Id of the Package
osid.id.IddepotIdthe Id of the Depot
ErrorsALREADY_EXISTS packageId is already assigned to depotId
NOT_FOUND packageId or depotId not found
NULL_ARGUMENT packageId or depotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignPackageFromDepot
Description

Removes a Package from a Depot.

Parametersosid.id.IdpackageIdthe Id of the Package
osid.id.IddepotIdthe Id of the Depot
ErrorsNOT_FOUND packageId or depotId not found or packageId not assigned to depotId
NULL_ARGUMENT packageId or depotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.