OSID Logo
OSID Specifications
hold package
Version 3.1.0
Interfaceosid.hold.HoldAdminSession
Implementsosid.OsidSession
Implemented Byosid.hold.batch.HoldBatchAdminSession
Used Byosid.hold.HoldManager
osid.hold.HoldProxyManager
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.Id the Oubliette Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetOubliette
Description

Gets the Oubliette associated with this session.

Returnosid.hold.Oubliette the oubliette
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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[]holdRecordTypes array of hold record types
Returnboolean true if Hold creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT holdRecordTypes is null
Compliancemandatory This 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.IdissueId the Id for the issue
osid.id.IdresourceId the Id for the resource
osid.type.Type[]holdRecordTypes array of hold record types
Returnosid.hold.HoldForm the hold form
ErrorsNOT_FOUND issueId or resourceId is not found
NULL_ARGUMENT issueId, resourceId or holdRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to get form for requested record types
Compliancemandatory This 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.IdissueId the Id for the issue
osid.id.IdagentId the Id for the agent
osid.type.Type[]holdRecordTypes array of hold record types
Returnosid.hold.HoldForm the hold form
ErrorsNOT_FOUND issueId or agentId is not found
NULL_ARGUMENT issueId, agentId or holdRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to get form for requested record types
Compliancemandatory This method must be implemented.
MethodcreateHold
Description

Creates a new Hold.

Parametersosid.hold.HoldFormholdForm the form for this Hold
Returnosid.hold.Hold the new Hold
ErrorsILLEGAL_STATE holdForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT holdForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED holdForm did not originate from getHoldFormForCreateForResource() or getHoldFormForCreateForAgent()
Compliancemandatory This 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
Compliancemandatory This 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.IdholdId the Id of the Hold
Returnosid.hold.HoldForm the hold form
ErrorsNOT_FOUND holdId is not found
NULL_ARGUMENT holdId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodupdateHold
Description

Updates an existing hold.

Parametersosid.hold.HoldFormholdForm the form containing the elements to be updated
ErrorsILLEGAL_STATE holdForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT holdId or holdForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED holdForm did not originate from getHoldFormForUpdate()
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethoddeleteHold
Description

Deletes a Hold.

Parametersosid.id.IdholdId the Id of the Hold to remove
ErrorsNOT_FOUND holdId not found
NULL_ARGUMENT holdId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.IdholdId the Id of a Hold
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND holdId not found
NULL_ARGUMENT holdId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.