OSID Logo
OSID Specifications
lexicon package
Version 3.0.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.

Returnbooleanfalse if Press creation is not authorized, true otherwise
CompliancemandatoryThis 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[]pressRecordTypesarray of press record types
Returnbooleantrue if Press creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENTpressRecordTypes is null
CompliancemandatoryThis 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[]pressRecordTypesarray of press record types
Returnosid.lexicon.PressFormthe press form
ErrorsNULL_ARGUMENTpressRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreatePress
Description

Creates a new Press .

Parametersosid.lexicon.PressFormpressFormthe form for this Press
Returnosid.lexicon.Pressthe new Press
ErrorsILLEGAL_STATEpressForm already used in a create transidiom
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENTpressForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDpressForm did not originate from getPressFormForCreate()
CompliancemandatoryThis 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.

Returnbooleanfalse if Press modification is not authorized, true otherwise
CompliancemandatoryThis 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.IdpressIdthe Id of the Press
Returnosid.lexicon.PressFormthe press form
ErrorsNOT_FOUNDpressId is not found
NULL_ARGUMENTpressId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdatePress
Description

Updates an existing press

Parametersosid.lexicon.PressFormpressFormthe form containing the elements to be updated
ErrorsILLEGAL_STATEpressForm already used in an update transidiom
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENTpressForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDpressForm did not originate from getPressFormForUpdate()
CompliancemandatoryThis 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.

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

Deletes a Press .

Parametersosid.id.IdpressIdthe Id of the Press to remove
ErrorsNOT_FOUNDpressId not found
NULL_ARGUMENTpressId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis 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.

Returnbooleanfalse if Press aliasing is not authorized, true otherwise
CompliancemandatoryThis 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.IdpressIdthe Id of a Press
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTSaliasId is already assigned
NOT_FOUNDpressId not found
NULL_ARGUMENTpressId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.