OSID Logo
OSID Specifications
resource package
Version 3.1.0
Interfaceosid.resource.ResourceBinAssignmentSession
Implementsosid.OsidSession
Used Byosid.resource.ResourceManager
osid.resource.ResourceProxyManager
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
Compliancemandatory This 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.IdbinId the Id of the Bin
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT binId is null
Compliancemandatory This 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.IdbinId the Id of the Bin
Returnosid.id.IdList list of assignable bin Ids
ErrorsNULL_ARGUMENT binId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This 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.IdbinId the Id of the Bin
osid.id.IdresourceId the Id of the Resource
Returnosid.id.IdList list of assignable bin Ids
ErrorsNULL_ARGUMENT binId or resourceId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodassignResourceToBin
Description

Adds an existing Resource to a Bin.

Parametersosid.id.IdresourceId the Id of the Resource
osid.id.IdbinId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodunassignResourceFromBin
Description

Removes a Resource from a Bin.

Parametersosid.id.IdresourceId the Id of the Resource
osid.id.IdbinId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodreassignResourceToBin
Description

Moves a Resource from one Bin to another. Mappings to other Bins are unaffected.

Parametersosid.id.IdresourceId the Id of the Resource
osid.id.IdfromBinId the Id of the current Bin
osid.id.IdtoBinId the Id of the destination Bin
ErrorsALREADY_EXISTS resourceId already assigned to toBinId
NOT_FOUND resourceId, fromBinId, or toBinId not found or resourceId not mapped to fromBinId
NULL_ARGUMENT resourceId, fromBinId, or toBinId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.