OSID Logo
OSID Specifications
resourcing package
Version 3.0.0
Interfaceosid.resourcing.WorkAdminSession
Implementsosid.OsidSession
Implemented Byosid.resourcing.batch.WorkBatchAdminSession
Used Byosid.resourcing.ResourcingManager
osid.resourcing.ResourcingProxyManager
Description

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

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

The delete operations delete Work . To unmap a Work from the current Foundry , the WorkFoundryAssignmentSession should be used. These delete operations attempt to remove the Work 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.
MethodcanCreateWorks
Description

Tests if this user can create Works . A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Work 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.

Returnbooleanfalse if Work creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateWorkWithRecordTypes
Description

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

Parametersosid.type.Type[]workRecordTypesarray of work record types
Returnbooleantrue if Work creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENTworkRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetWorkFormForCreate
Description

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

Parametersosid.id.IdjobIda job Id
osid.type.Type[]workRecordTypesarray of work record types
Returnosid.resourcing.WorkFormthe work form
ErrorsNOT_FOUNDjobId is not found
NULL_ARGUMENTjobId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateWork
Description

Creates a new Work .

Parametersosid.resourcing.WorkFormworkFormthe form for this Work
Returnosid.resourcing.Workthe new Work
ErrorsILLEGAL_STATEworkForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENTworkForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDworkForm did not orginiate from getWorkFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateWorks
Description

Tests if this user can update Works . A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Work 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.

Returnbooleanfalse if Work modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetWorkFormForUpdate
Description

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

Parametersosid.id.IdworkIdthe Id of the Work
Returnosid.resourcing.WorkFormthe work form
ErrorsNOT_FOUNDworkId is not found
NULL_ARGUMENTworkId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateWork
Description

Updates an existing work.

Parametersosid.resourcing.WorkFormworkFormthe form containing the elements to be updated
ErrorsILLEGAL_STATEworkForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENTworkForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDworkForm did not orginiate from getWorkFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteWorks
Description

Tests if this user can delete Works . A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Work 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.

Returnbooleanfalse if Work deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteWork
Description

Deletes a Work .

Parametersosid.id.IdworkIdthe Id of the Work to remove
ErrorsNOT_FOUNDworkId not found
NULL_ARGUMENTworkId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageWorkAliases
Description

Tests if this user can manage Id aliases for Works . 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.

Returnbooleanfalse if Work aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasWork
Description

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

Parametersosid.id.IdworkIdthe Id of a Work
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTSaliasId is already assigned
NOT_FOUNDworkId not found
NULL_ARGUMENTworkId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanMoveWork
Description

Tests if this user can move Work among jobs. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Work will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer move operations to an unauthorized user.

Returnbooleanfalse if Work moving is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodmoveWork
Description

Moves work to another job.

Parametersosid.id.IdworkIdthe work Id
osid.id.IdjobIdthe new job Id
ErrorsALREADY_EXISTSwork already part of job
NOT_FOUNDjobId or workId is not found
NULL_ARGUMENTjobId or workId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageWorkStatus
Description

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

Returnbooleanfalse if Work status is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcompleteWork
Description

Marks work as complete.

Parametersosid.id.IdworkIdthe work Id
ErrorsNOT_FOUNDworkId is not found
NULL_ARGUMENTworkId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreopenWork
Description

Marks work as incomplete.

Parametersosid.id.IdworkIdthe work Id
ErrorsNOT_FOUNDworkId is not found
NULL_ARGUMENTworkId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.