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

This session creates and removes demographics. The data for create and update is provided via the DemographicForm.

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.
MethodcanCreateDemographic
Description

Tests if this user can create demographics. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Demographic will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Demographic creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateDemographicWithRecordTypes
Description

Tests if this user can create a single Demographic using the desired record types. While ResourceDemographicManager.getDemographicRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Demographic. Providing an empty array tests if a Demographic can be created with no records.

Parametersosid.type.Type[]demographicRecordTypesarray of demographic record types
Returnboolean true if Demographic creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT demographicRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetDemographicFormForCreate
Description

Gets the demographic form for creating new demographics. A new form should be requested for each create transaction.

Parametersosid.type.Type[]demographicRecordTypesarray of demographic record types
Returnosid.resource.demographic.DemographicFormthe demographic form
ErrorsNULL_ARGUMENT demographicRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateDemographic
Description

Creates a new Demographic.

Parametersosid.resource.demographic.DemographicFormdemographicFormthe form for this Demographic
Returnosid.resource.demographic.Demographicthe new Demographic
ErrorsILLEGAL_STATE demographicForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT demographicForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED demographicForm did not originate from getDemographicFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateDemographics
Description

Tests if this user can update demographics. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Demographic will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if Demographic modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetDemographicFormForUpdate
Description

Gets the demographic form for updating an existing demographic. A new demographic form should be requested for each update transaction.

Parametersosid.id.IddemographicIdthe Id of the Demographic
Returnosid.resource.demographic.DemographicFormthe demographic form
ErrorsNOT_FOUND demographicId is not found
NULL_ARGUMENT demographicId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateDemographic
Description

Updates an existing demographic.

Parametersosid.resource.demographic.DemographicFormdemographicFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE demographicForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT demographicId or demographicForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED demographicForm did not originate from getDemographicFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteDemographics
Description

Tests if this user can delete demographics. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Demographic will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Demographic deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteDemographic
Description

Deletes a Demographic.

Parametersosid.id.IddemographicIdthe Id of the Demographic to remove
ErrorsNOT_FOUND demographicId not found
NULL_ARGUMENT demographicId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageDemographicAliases
Description

Tests if this user can manage Id aliases for demographics. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Demographic aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasDemographic
Description

Adds an Id to a Demographic for the purpose of creating compatibility. The primary Id of the Demographic is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another demographic. it is reassigned to the given demographic Id.

Parametersosid.id.IddemographicIdthe Id of a Demographic
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND demographicId not found
NULL_ARGUMENT demographicId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.