OSID Logo
OSID Specifications
resourcing package
Version 3.0.0
Release Candidate Preview
Interfaceosid.resourcing.FoundryAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Foundries, It is safer to remove all mappings to the Foundry catalogs before deletion.

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

MethodcanCreateFoundries
Description

Tests if this user can create Foundries. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Foundry. 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 Foundry creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateFoundryWithRecordTypes
Description

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

Parametersosid.type.Type[]foundryRecordTypesarray of foundry record types
Returnboolean true if Foundry creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT foundryRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetFoundryFormForCreate
Description

Gets the foundry form for creating new foundries. A new form should be requested for each create transaction.

Parametersosid.type.Type[]foundryRecordTypesarray of foundry record types
Returnosid.resourcing.FoundryFormthe foundry form
ErrorsNULL_ARGUMENT foundryRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateFoundry
Description

Creates a new Foundry.

Parametersosid.resourcing.FoundryFormfoundryFormthe form for this Foundry
Returnosid.resourcing.Foundrythe new Foundry
ErrorsILLEGAL_STATE foundryForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT foundryForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED foundryForm did not originate from getFoundryFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateFoundries
Description

Tests if this user can update Foundries. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Foundry 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 Foundry modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetFoundryFormForUpdate
Description

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

Parametersosid.id.IdfoundryIdthe Id of the Foundry
Returnosid.resourcing.FoundryFormthe foundry form
ErrorsNOT_FOUND foundryId is not found
NULL_ARGUMENT foundryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateFoundry
Description

Updates an existing foundry

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

Tests if this user can delete Foundries. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Foundry 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 Foundry deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteFoundry
Description

Deletes a Foundry.

Parametersosid.id.IdfoundryIdthe Id of the Foundry to remove
ErrorsNOT_FOUND foundryId not found
NULL_ARGUMENT foundryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageFoundryAliases
Description

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

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

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