OSID Logo
OSID Specifications
resource demographic package
Version 3.0.0
Interfaceosid.resource.demographic.DemographicBinAssignmentSession
Implementsosid.OsidSession
Used Byosid.resource.demographic.ResourceDemographicManager
osid.resource.demographic.ResourceDemographicProxyManager
Description

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

Adding a reference of a Demographic to another Bin is not a copy operation (eg: does not change its Id ).

MethodcanAssignDemographics
Description

Tests if this user can alter demographic/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 lookup operations to unauthorized users.

Returnbooleanfalse if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignDemographicsToBin
Description

Tests if this user can alter demographic/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 lookup operations to unauthorized users.

Parametersosid.id.IdbinIdthe Id of the Bin
Returnbooleanfalse if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENTbinId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableBinIds
Description

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

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

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

Parametersosid.id.IdbinIdthe Id of the Bin
osid.id.IddemographicIdthe Id of the Demographic
Returnosid.id.IdListlist of assignable bin Ids
ErrorsNULL_ARGUMENTbinId or demographicId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignDemographicToBin
Description

Adds an existing Demographic to an Bin .

Parametersosid.id.IddemographicIdthe Id of the Demographic
osid.id.IdbinIdthe Id of the Bin
ErrorsALREADY_EXISTSdemographicId is not assigned to binId
NOT_FOUNDdemographicId or binId not found
NULL_ARGUMENTdemographicId or binId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignDemographicFromBin
Description

Removes a Demographic from a Bin .

Parametersosid.id.IddemographicIdthe Id of the Demographic
osid.id.IdbinIdthe Id of the Bin
ErrorsNOT_FOUNDdemographicId or binId not found or demographicId not assigned to binId
NULL_ARGUMENTdemographicId or binId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignDemographicToBin
Description

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

Parametersosid.id.IddemographicIdthe Id of the Demographic
osid.id.IdfromBinIdthe Id of the current Bin
osid.id.IdtoBinIdthe Id of the destination Bin
ErrorsALREADY_EXISTSdemographicId already assigned to toBinId
NOT_FOUNDdemographicId, fromBinId , or toBinId not found or demographicId not mapped to fromBinId
NULL_ARGUMENTdemographicId, fromBinId , or toBinId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.