Package mks.ci.server.engine
Class LocalTriggerManager.ScriptOperationsBean
- java.lang.Object
-
- mks.frame.triggers.ScriptExposableBaseBean
-
- mks.frame.triggers.beans.ScriptBaseBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptIMBaseBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptOperationsBean
-
- All Implemented Interfaces:
mks.frame.triggers.ScriptExposableBean
- Enclosing class:
- LocalTriggerManager
public static class LocalTriggerManager.ScriptOperationsBean extends LocalTriggerManager.ScriptIMBaseBean implements mks.frame.triggers.ScriptExposableBean
A bean that exposes a set of server operations. A ScriptOperationsBean provides read only access to operations invoked on the client. An instance of this bean will be created for both PRE and POST trigger events. As of the 2006 release, this bean is only available to time entry triggers and only time entry operations are exposed in the getOps call. PRE HANDLING: In a PRE event, this bean shows the operations that are to be performed on the server allowing the script writer to abort the operation. In batch mode, all operations in the batch are available through the getOps call and an abort call will abort all operations. In non batch mode, the getOps call will only return a single operation and an abort call will only abort that operation. The semantics of what is a batch operation are based on the client command being executed. POST HANDLING: In a POST event, the bean provides access to the operations and their disposition (see the ScriptOperationBean) for both batch and non-batch modes. For non-batch operations, script writers should be prepared to handle multiple POST events as the client is free to combine blocks of operations for performance.
-
-
Constructor Summary
Constructors Constructor Description ScriptOperationsBean(java.util.List<LocalTriggerManager.ScriptOperationBean> ops, int userId, java.sql.Connection c, boolean batch)
Create a new ScriptOperationsBean.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getExposedName()
Returns the name of this bean that is exposed to the scripting language.LocalTriggerManager.ScriptOperationBean[]
getOps()
Return the array of ScriptOperationBean that this bean encompasses.boolean
isBatch()
-
Methods inherited from class mks.ci.server.engine.LocalTriggerManager.ScriptIMBaseBean
getCurrentDatabaseTime, getCurrentDatabaseTime, getCurrentUser, getServerBean, getUserID, isParallelProcessingEnabled
-
Methods inherited from class mks.frame.triggers.beans.ScriptBaseBean
getEnvironmentBean, setEnvironmentBean
-
-
-
-
Constructor Detail
-
ScriptOperationsBean
public ScriptOperationsBean(java.util.List<LocalTriggerManager.ScriptOperationBean> ops, int userId, java.sql.Connection c, boolean batch)
Create a new ScriptOperationsBean.- Parameters:
ops
- the ScriptOperationBeans that the bean encompassesuserId
- the current userc
- the database connectionbatch
- true if the operations are being performed in a batch context, false otherwise
-
-
Method Detail
-
getExposedName
public java.lang.String getExposedName()
Returns the name of this bean that is exposed to the scripting language.- Specified by:
getExposedName
in interfacemks.frame.triggers.ScriptExposableBean
- Specified by:
getExposedName
in classScriptBaseBean
- Returns:
- the bean name:
imOperationsBean
.
-
getOps
public LocalTriggerManager.ScriptOperationBean[] getOps()
Return the array of ScriptOperationBean that this bean encompasses.- Returns:
- an array of ScriptOperationBean
-
isBatch
public boolean isBatch()
- Returns:
- true if the operations are being performed in a batch context in which case a failure or veto will cause the entire set of operations to rollback, false otherwise.
-
-