OSID Logo
OSID Specifications
control package
Version 3.1.0
Interfaceosid.control.TriggerAdminSession
Implementsosid.OsidSession
Implemented Byosid.control.batch.TriggerBatchAdminSession
Used Byosid.control.ControlManager
osid.control.ControlProxyManager
Description

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

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

The delete operations delete Triggers. To unmap a Trigger from the current System, the TriggerSystemAssignmentSession should be used. These delete operations attempt to remove the Trigger itself thus removing it from all known System catalogs.

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

MethodgetSystemId
Description

Gets the System Id associated with this session.

Returnosid.id.Id the System Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetSystem
Description

Gets the System associated with this session.

Returnosid.control.System the system
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanCreateTriggers
Description

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

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

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

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

Parametersosid.id.IdcontrollerId a controller Id
osid.type.Type[]triggerRecordTypes array of trigger record types
Returnosid.control.TriggerForm the trigger form
ErrorsNOT_FOUND controllerId is not found
NULL_ARGUMENT controllerId or triggerRecordTypes 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.
MethodcreateTrigger
Description

Creates a new Trigger.

Parametersosid.control.TriggerFormtriggerForm the form for this Trigger
Returnosid.control.Trigger the new Trigger
ErrorsILLEGAL_STATE triggerForm already used in a create transaction
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT triggerForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED triggerForm did not originate from getTriggerFormForCreate()
Compliancemandatory This method must be implemented.
MethodcanUpdateTriggers
Description

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

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

Parametersosid.id.IdtriggerId the Id of the Trigger
Returnosid.control.TriggerForm the trigger form
ErrorsNOT_FOUND triggerId is not found
NULL_ARGUMENT triggerId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateTrigger
Description

Updates an existing trigger.

Parametersosid.control.TriggerFormtriggerForm the form containing the elements to be updated
ErrorsILLEGAL_STATE triggerForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT triggerForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED triggerForm did not originate from getTriggerFormForUpdate()
Compliancemandatory This method must be implemented.
MethodcanDeleteTriggers
Description

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

Deletes a Trigger.

Parametersosid.id.IdtriggerId the Id of the Trigger to remove
ErrorsNOT_FOUND triggerId not found
NULL_ARGUMENT triggerId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanManageTriggerAliases
Description

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

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

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