OSID Logo
OSID Specifications
personnel package
Version 3.1.0
Interfaceosid.personnel.OrganizationAdminSession
Implementsosid.OsidSession
Implemented Byosid.personnel.batch.OrganizationBatchAdminSession
Used Byosid.personnel.PersonnelManager
osid.personnel.PersonnelProxyManager
Description

This session creates, updates, and deletes Organizations. 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 Organization, an OrganizationForm is requested using getOrganizationFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned OrganizationForm 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 OrganizationForm is submitted to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each OrganizationForm corresponds to an attempted transaction.

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

The delete operations delete Organizations. To unmap an Organization from the current Realm, the OrganizationRealmAssignmentSession should be used. These delete operations attempt to remove the Organization itself thus removing it from all known Realm catalogs.

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

MethodgetRealmId
Description

Gets the Realm Id associated with this session.

Returnosid.id.Id the Realm Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetRealm
Description

Gets the Realm associated with this session.

Returnosid.personnel.Realm the realm
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanCreateOrganizations
Description

Tests if this user can create organizations. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an Organization 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 Organization creation is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanCreateOrganizationWithRecordTypes
Description

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

Parametersosid.type.Type[]organizationRecordTypes array of organization record types
Returnboolean true if Organization creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT organizationRecordTypes is null
Compliancemandatory This method must be implemented.
MethodgetOrganizationFormForCreate
Description

Gets the organization form for creating new organizations. A new form should be requested for each create transaction.

Parametersosid.type.Type[]organizationRecordTypes array of organization record types to be included in the create operation or an empty list if none
Returnosid.personnel.OrganizationForm the organization form
ErrorsNULL_ARGUMENT organizationRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED cannot get form for requested record types
Compliancemandatory This method must be implemented.
MethodcreateOrganization
Description

Creates a new Organization.

Parametersosid.personnel.OrganizationFormorganizationForm the form for this Organization
Returnosid.personnel.Organization the new Organization
ErrorsILLEGAL_STATE organizationForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT organizationForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED organizationForm did not originate from getOrganizationFormForCreate()
Compliancemandatory This method must be implemented.
MethodcanUpdateOrganizations
Description

Tests if this user can update organizations. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an Organization 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 Organization modification is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodgetOrganizationFormForUpdate
Description

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

Parametersosid.id.IdorganizationId the Id of the Organization
Returnosid.personnel.OrganizationForm the organization form
ErrorsNOT_FOUND organizationId is not found
NULL_ARGUMENT organizationId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateOrganization
Description

Updates an existing organization.

Parametersosid.personnel.OrganizationFormorganizationForm the form containing the elements to be updated
ErrorsILLEGAL_STATE organizationForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT organizationForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED organizationForm did not originate from getOrganizationFormForUpdate()
Compliancemandatory This method must be implemented.
MethodcanDeleteOrganizations
Description

Tests if this user can delete organizations. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Organization 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 Organization deletion is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethoddeleteOrganization
Description

Deletes an Organization.

Parametersosid.id.IdorganizationId the Id of the Organization to remove
ErrorsNOT_FOUND organizationId not found
NULL_ARGUMENT organizationId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanManageOrganizationAliases
Description

Tests if this user can manage Id aliases for Organizations. 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 Organization aliasing is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodaliasOrganization
Description

Adds an Id to an Organization for the purpose of creating compatibility. The primary Id of the Organization is determined by the provider. The new Id is an alias to the primary Id. If the alias is a pointer to another organization, it is reassigned to the given organization Id.

Parametersosid.id.IdorganizationId the Id of an Organization
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is in use as a primary Id
NOT_FOUND organizationId not found
NULL_ARGUMENT organizationId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.