OSID Logo
OSID Specifications
lexicon package
Version 3.1.0
Interfaceosid.lexicon.PressAdminSession
Implementsosid.OsidSession
Implemented Byosid.lexicon.batch.PressBatchAdminSession
Used Byosid.lexicon.LexiconManager
osid.lexicon.LexiconProxyManager
Description

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

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

The delete operations delete Presses.

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

MethodcanCreatePresses
Description

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

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

Parametersosid.type.Type[]pressRecordTypes array of press record types
Returnboolean true if Press creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT pressRecordTypes is null
Compliancemandatory This method must be implemented.
MethodgetPressFormForCreate
Description

Gets the press form for creating new presses. A new form should be requested for each create transidiom.

Parametersosid.type.Type[]pressRecordTypes array of press record types
Returnosid.lexicon.PressForm the press form
ErrorsNULL_ARGUMENT pressRecordTypes 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.
MethodcreatePress
Description

Creates a new Press.

Parametersosid.lexicon.PressFormpressForm the form for this Press
Returnosid.lexicon.Press the new Press
ErrorsILLEGAL_STATE pressForm already used in a create transidiom
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT pressForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED pressForm did not originate from getPressFormForCreate()
Compliancemandatory This method must be implemented.
MethodcanUpdatePresses
Description

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

Gets the press form for updating an existing press. A new press form should be requested for each update transidiom.

Parametersosid.id.IdpressId the Id of the Press
Returnosid.lexicon.PressForm the press form
ErrorsNOT_FOUND pressId is not found
NULL_ARGUMENT pressId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdatePress
Description

Updates an existing press

Parametersosid.lexicon.PressFormpressForm the form containing the elements to be updated
ErrorsILLEGAL_STATE pressForm already used in an update transidiom
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT pressForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED pressForm did not originate from getPressFormForUpdate()
Compliancemandatory This method must be implemented.
MethodcanDeletePresses
Description

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

Deletes a Press.

Parametersosid.id.IdpressId the Id of the Press to remove
ErrorsNOT_FOUND pressId not found
NULL_ARGUMENT pressId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanManagePressAliases
Description

Tests if this user can manage Id aliases for Presses. 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 Press aliasing is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodaliasPress
Description

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

Parametersosid.id.IdpressId the Id of a Press
osid.id.IdaliasId the alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND pressId not found
NULL_ARGUMENT pressId or aliasId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.