OSID Logo
OSID Specifications
resource package
Version 3.0.0
Release Candidate Preview
Interfaceosid.resource.ResourceBinAssignmentSession
Implementsosid.OsidSession
Description

This session provides methods to re-assign Resources to Bins. A Resource may map to multiple Bin objects and removing the last reference to a Resource is the equivalent of deleting it. Each Bin may have its own authorizations governing who is allowed to operate on it.

Moving or adding a reference of a Resource to another Bin is not a copy operation (eg: does not change its Id ).

MethodcanAssignResources
Description

Tests if this user can alter resource/bin 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.
MethodcanAssignResourcesToBin
Description

Tests if this user can alter resource/bin 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.IdbinIdthe Id of the Bin
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT binId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableBinIds
Description

Gets a list of bins including and under the given bin node in which any resource can be assigned.

Parametersosid.id.IdbinIdthe Id of the Bin
Returnosid.id.IdListlist of assignable bin Ids
ErrorsNULL_ARGUMENT binId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableBinIdsForResource
Description

Gets a list of bins including and under the given bin node in which a specific resource can be assigned.

Parametersosid.id.IdbinIdthe Id of the Bin
osid.id.IdresourceIdthe Id of the Resource
Returnosid.id.IdListlist of assignable bin Ids
ErrorsNULL_ARGUMENT binId or resourceId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignResourceToBin
Description

Adds an existing Resource to a Bin.

Parametersosid.id.IdresourceIdthe Id of the Resource
osid.id.IdbinIdthe Id of the Bin
ErrorsALREADY_EXISTS resourceId is already assigned to binId
NOT_FOUND resourceId or binId not found
NULL_ARGUMENT resourceId or binId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignResourceFromBin
Description

Removes a Resource from a Bin.

Parametersosid.id.IdresourceIdthe Id of the Resource
osid.id.IdbinIdthe Id of the Bin
ErrorsNOT_FOUND resourceId or binId not found or resourceId not assigned to binId
NULL_ARGUMENT resourceId or binId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.