OSID Logo
OSID Specifications
hold package
Version 3.0.0
Release Candidate Preview
Interfaceosid.hold.HoldAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Holds. To unmap a Hold from the current Oubliette, the HoldOublietteAssignmentSession should be used. These delete operations attempt to remove the Hold itself thus removing it from all known Oubliette catalogs.

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

MethodgetOublietteId
Description

Gets the Oubliette Id associated with this session.

Returnosid.id.Idthe Oubliette Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetOubliette
Description

Gets the Oubliette associated with this session.

Returnosid.hold.Oubliettethe oubliette
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateHolds
Description

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

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

Parametersosid.type.Type[]holdRecordTypesarray of hold record types
Returnboolean true if Hold creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT holdRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetHoldFormForCreateForResource
Description

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

Parametersosid.id.IdissueIdthe Id for the issue
osid.id.IdresourceIdthe Id for the resource
osid.type.Type[]holdRecordTypesarray of hold record types
Returnosid.hold.HoldFormthe hold form
ErrorsNOT_FOUND issueId or resourceId is not found
NULL_ARGUMENT issueId, resourceId or holdRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodgetHoldFormForCreateForAgent
Description

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

Parametersosid.id.IdissueIdthe Id for the issue
osid.id.IdagentIdthe Id for the agent
osid.type.Type[]holdRecordTypesarray of hold record types
Returnosid.hold.HoldFormthe hold form
ErrorsNOT_FOUND issueId or agentId is not found
NULL_ARGUMENT issueId, agentId or holdRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateHold
Description

Creates a new Hold.

Parametersosid.hold.HoldFormholdFormthe form for this Hold
Returnosid.hold.Holdthe new Hold
ErrorsILLEGAL_STATE holdForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT holdForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED holdForm did not originate from getHoldFormForCreateForResource() or getHoldFormForCreateForAgent()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateHolds
Description

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

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

Parametersosid.id.IdholdIdthe Id of the Hold
Returnosid.hold.HoldFormthe hold form
ErrorsNOT_FOUND holdId is not found
NULL_ARGUMENT holdId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodupdateHold
Description

Updates an existing hold.

Parametersosid.hold.HoldFormholdFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE holdForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT holdId or holdForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED holdForm did not originate from getHoldFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteHolds
Description

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

Deletes a Hold.

Parametersosid.id.IdholdIdthe Id of the Hold to remove
ErrorsNOT_FOUND holdId not found
NULL_ARGUMENT holdId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageHoldAliases
Description

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

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

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