OSID Logo
OSID Specifications
workflow package
Version 3.0.0
Release Candidate Preview
Interfaceosid.workflow.OfficeAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Offices. The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create an Office, an OfficeForm is requested using getOfficeFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned OfficeForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the OfficeForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each OfficeForm corresponds to an attempted transaction.

For updates, OfficeForms are requested to the Office Id that is to be updated using getOfficeFormForUpdate(). Similarly, the OfficeForm has metadata about the data that can be updated and it can perform validation before submitting the update. The OfficeForm can only be used once for a successful update and cannot be reused.

The delete operations delete Offices.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodcanCreateOffices
Description

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

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

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

Parametersosid.type.Type[]officeRecordTypesarray of office record types
Returnboolean true if Office creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT officeRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetOfficeFormForCreate
Description

Gets the office form for creating new offices. A new form should be requested for each create transaction.

Parametersosid.type.Type[]officeRecordTypesarray of office record types
Returnosid.workflow.OfficeFormthe office form
ErrorsNULL_ARGUMENT officeRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateOffice
Description

Creates a new Office.

Parametersosid.workflow.OfficeFormofficeFormthe form for this Office
Returnosid.workflow.Officethe new Office
ErrorsILLEGAL_STATE officeForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT officeForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED officeForm did not originate from getOfficeFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateOffices
Description

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

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

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

Parametersosid.id.IdofficeIdthe Id of the Office
Returnosid.workflow.OfficeFormthe office form
ErrorsNOT_FOUND officeId is not found
NULL_ARGUMENT officeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateOffice
Description

Updates an existing office

Parametersosid.workflow.OfficeFormofficeFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE officeForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT officeForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED officeForm did not originate from getOfficeFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteOffices
Description

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

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

Deletes an Office.

Parametersosid.id.IdofficeIdthe Id of the Office to remove
ErrorsNOT_FOUND officeId not found
NULL_ARGUMENT officeId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageOfficeAliases
Description

Tests if this user can manage Id aliases for Offices. 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 Office aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasOffice
Description

Adds an Id to an Office for the purpose of creating compatibility. The primary Id of the Office is determined by the provider. The new Id performs as an alias to the primary Id.

Parametersosid.id.IdofficeIdthe Id of an Office
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND officeId not found
NULL_ARGUMENT officeId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.