OSID Logo
OSID Specifications
resource demographic package
Version 3.1.0
Interfaceosid.resource.demographic.DemographicAdminSession
Implementsosid.OsidSession
Used Byosid.resource.demographic.ResourceDemographicManager
osid.resource.demographic.ResourceDemographicProxyManager
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.Id the Bin Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetBin
Description

Gets the Bin associated with this session.

Returnosid.resource.Bin the bin
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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[]demographicRecordTypes array of demographic record types
Returnboolean true if Demographic creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT demographicRecordTypes is null
Compliancemandatory This 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[]demographicRecordTypes array of demographic record types
Returnosid.resource.demographic.DemographicForm the demographic form
ErrorsNULL_ARGUMENT demographicRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to get form for requested record types
Compliancemandatory This method must be implemented.
MethodcreateDemographic
Description

Creates a new Demographic.

Parametersosid.resource.demographic.DemographicFormdemographicForm the form for this Demographic
Returnosid.resource.demographic.Demographic the new Demographic
ErrorsILLEGAL_STATE demographicForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT demographicForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED demographicForm did not originate from getDemographicFormForCreate()
Compliancemandatory This 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
Compliancemandatory This 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.IddemographicId the Id of the Demographic
Returnosid.resource.demographic.DemographicForm the demographic form
ErrorsNOT_FOUND demographicId is not found
NULL_ARGUMENT demographicId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateDemographic
Description

Updates an existing demographic.

Parametersosid.resource.demographic.DemographicFormdemographicForm the form containing the elements to be updated
ErrorsILLEGAL_STATE demographicForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT demographicId or demographicForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED demographicForm did not originate from getDemographicFormForUpdate()
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethoddeleteDemographic
Description

Deletes a Demographic.

Parametersosid.id.IddemographicId the Id of the Demographic to remove
ErrorsNOT_FOUND demographicId not found
NULL_ARGUMENT demographicId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.IddemographicId the Id of a Demographic
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND demographicId not found
NULL_ARGUMENT demographicId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.