Class LocalTriggerManager.ScriptOperationBean

  • All Implemented Interfaces:
    mks.frame.triggers.ScriptExposableBean
    Direct Known Subclasses:
    DeleteAllTimeEntryOp.ScriptDeleteAllTimeEntryOpBean, LocalTriggerManager.ScriptModifyTimeEntryOpBean
    Enclosing class:
    LocalTriggerManager

    public abstract static class LocalTriggerManager.ScriptOperationBean
    extends LocalTriggerManager.ScriptIMBaseBean
    implements mks.frame.triggers.ScriptExposableBean
    A base abstract bean that provides read only access to a single server operation. Instances of this bean are available from the imOperationsBean in both the PRE and POST events. In a POST event, the disposition of the operation can be determined by looking at the state and error message if any. As of the 2006 release only beans for time entry operations are implemented. An operation can be in one of four states:
    • "unknown" not initialized
    • "pending" nothing has been done with the operation yet
    • "processed" the operation has been successfully performed (POST only)
    • "failed" the operation failed or was aborted (POST only)
    • Constructor Detail

      • ScriptOperationBean

        public ScriptOperationBean​(mks.ci.server.BulkOp op,
                                   int userId,
                                   java.sql.Connection c)
        Create a new ScriptOperationBean.
        Parameters:
        op - the operation that the bean encompasses
        userId - the current user
        c - the database connection
    • Method Detail

      • getState

        public java.lang.String getState()
        Returns:
        the state of the operation. The operation may be:
        • "unknown" not initialized
        • "pending" nothing has been done with the operation yet
        • "processed" the operation has been successfully performed (POST only)
        • "failed" the operation failed or was aborted (POST only)
        In the case of a failure, the failure reason is available through the getErrorMessage() call.
      • getErrorMessage

        public java.lang.String getErrorMessage()
        Returns:
        the error message for a failed operation. Only applicable in POST triggers.