OSID Logo
OSID Specifications
installation package
Version 3.0.0
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.

Returnbooleanfalse 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
Returnbooleanfalse if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENTdepotId 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_ARGUMENTdepotId 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_ARGUMENTdepotId 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_EXISTSpackageId is already assigned to depotId
NOT_FOUNDpackageId or depotId not found
NULL_ARGUMENTpackageId 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_FOUNDpackageId or depotId not found or packageId not assigned to depotId
NULL_ARGUMENTpackageId or depotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignPackageToDepot
Description

Moves a Package from one Depot to another. Mappings to other Depots are unaffected.

Parametersosid.id.IdpackageIdthe Id of the Package
osid.id.IdfromDepotIdthe Id of the current Depot
osid.id.IdtoDepotIdthe Id of the destination Depot
ErrorsALREADY_EXISTSpackageId already assigned to toDepotId
NOT_FOUNDpackageId, fromDepotId , or toDepotId not found or packageId not mapped to fromDepotId
NULL_ARGUMENTpackageId, fromDepotId , or toDepotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.