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

This session applies resource search queries and search orders to Demographics. Applying a search query to a demographic adds the resources resulting from that query to the demographic.

MethodgetBinId
Description

Gets the Bin Id associated with this session.

Returnosid.id.Idthe Bin Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetBin
Description

Gets the Bin associated with this session.

Returnosid.resource.Binthe bin
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanBuildDemographics
Description

Tests if this user can build demographics. A return of true does not guarantee successful authorization. A return of false indicates that it is known 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 operations to unauthorized users.

Returnboolean false if smart bin management is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetResourceQuery
Description

Gets a resource query.

Returnosid.resource.ResourceQuerythe resource query
CompliancemandatoryThis method must be implemented.
MethodgetResourceSearchOrder
Description

Gets a resource search order.

Returnosid.resource.ResourceSearchOrderthe resource search order
CompliancemandatoryThis method must be implemented.
MethodapplyResourceQuery
Description

Applies a resource query to a demographic. If a query is already applied, it is replaced with the new one.

Parametersosid.id.IddemographicIda demographic Id
osid.resource.ResourceQueryresourceQuerythe resource query
ErrorsNOT_FOUND demographicId is not found
NULL_ARGUMENT demographicId or resourceQuery is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTED resourceQuery did not originate from getResourceQuery()
CompliancemandatoryThis method must be implemented.
MethodinspectResourceQuery
Description

Gets a resource query inspector for a demographic.

Parametersosid.id.IddemographicIda demographic Id
Returnosid.resource.ResourceQueryInspectorthe demographic query inspector
ErrorsNOT_FOUND demographicId is not found
NULL_ARGUMENT demographicId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodclearResourceQuery
Description

Clears the resource query effectively replacing it with a wildcard query.

Parametersosid.id.IddemographicIda demographic Id
ErrorsNOT_FOUND demographicId is not found
NULL_ARGUMENT demographicId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodapplyResourceSequencing
Description

Applies a demographic search order to this bin.

Parametersosid.id.IddemographicIda demographic Id
osid.resource.ResourceSearchOrderresourceSearchOrderthe resource search order
ErrorsNOT_FOUND demographicId is not found
NULL_ARGUMENT demographicId or resourceSearchOrder is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTED resourceSearchOrder did not originate from getResourceSearchOrder()
CompliancemandatoryThis method must be implemented.
MethodclearResourceSequencing
Description

Clears the resource sequencing.

Parametersosid.id.IddemographicIda demographic Id
ErrorsNOT_FOUND demographicId is not found
NULL_ARGUMENT demographicId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodgetResourceQueryFromInspector
Description

Gets a resource query from an inspector.

Parametersosid.resource.ResourceQueryInspectorresourceQueryInspectora resource query inspector
Returnosid.resource.ResourceQuerythe resource query
ErrorsNULL_ARGUMENT resourceQueryInspector is null
UNSUPPORTED resourceQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.