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

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

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

The delete operations delete Efforts. To unmap an Effort from the current Foundry, the EffortFoundryAssignmentSession should be used. These delete operations attempt to remove the Effort itself thus removing it from all known Foundry catalogs.

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

MethodgetFoundryId
Description

Gets the Foundry Id associated with this session.

Returnosid.id.Idthe Foundry Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetFoundry
Description

Gets the Foundry associated with this session.

Returnosid.resourcing.Foundrythe foundry
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateEfforts
Description

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

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

Parametersosid.type.Type[]effortRecordTypesarray of effort record types
Returnboolean true if Effort creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT effortRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetEffortFormForCreate
Description

Gets the effort form for creating new efforts. A new form should be requested for each create transaction.

Parametersosid.id.IdresourceIdthe Id for the resource
osid.id.IdcommissionIdthe Id for the commission
osid.type.Type[]effortRecordTypesarray of effort record types
Returnosid.resourcing.EffortFormthe effort form
ErrorsNOT_FOUND resourceId or commissionId is not found
NULL_ARGUMENT resourceId, commissionId, or effortRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateEffort
Description

Creates a new Effort.

Parametersosid.resourcing.EffortFormeffortFormthe form for this Effort
Returnosid.resourcing.Effortthe new Effort
ErrorsILLEGAL_STATE effortForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT effortForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED effortForm did not originate from getEffortFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateEfforts
Description

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

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

Parametersosid.id.IdeffortIdthe Id of the Effort
Returnosid.resourcing.EffortFormthe effort form
ErrorsNOT_FOUND effortId is not found
NULL_ARGUMENT effortId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateEffort
Description

Updates an existing effort.

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

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

Deletes an Effort.

Parametersosid.id.IdeffortIdthe Id of the Effort to remove
ErrorsNOT_FOUND effortId not found
NULL_ARGUMENT effortId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageEffortAliases
Description

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

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

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