Class 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 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 encompasses
        userId - the current user
        c - the database connection
        batch - 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 interface mks.frame.triggers.ScriptExposableBean
        Specified by:
        getExposedName in class ScriptBaseBean
        Returns:
        the bean name: imOperationsBean.
      • 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.