com.jscape.inet.mft.workflow

## Class Trigger

- java.lang.Object
- - com.jscape.inet.mft.workflow.Trigger

- All Implemented Interfaces:
    com.jscape.util.db.IntVersioned, java.io.Serializable

      public class Trigger
      extends java.lang.Object
      implements java.io.Serializable, com.jscape.util.db.IntVersioned

  Event trigger.
  Author:
    Alex
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Trigger.SingleInstanceMode`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Trigger()` Creates a new trigger instance.
    `Trigger(java.lang.String name, java.lang.String description, java.lang.Class eventClass, java.lang.String expressionString, ActionContext[] onStartActions, ActionContext[] onFinishActions, ActionContext[] onSuccessActions, ActionContext[] onFailureActions, boolean allowErrorEvent, boolean enabled, boolean asynchronous, boolean asynchronousActions, boolean singleInstanceRequired, Trigger.SingleInstanceMode singleInstanceMode, com.jscape.inet.mft.workflow.IgnoredDomainState ignoredDomainState, java.lang.String[] tags, long creationDate, java.lang.Long lastRunDate, int version)`
    `Trigger(Trigger that)` Copy constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getCreationDate()`
    `java.lang.String` | `getDescription()` Returns trigger description.
    `java.lang.Class` | `getEventClass()` Returns binded event class.
    `java.lang.String` | `getExpressionString()` Returns expression string as entered by user.
    `com.jscape.inet.mft.workflow.IgnoredDomainState` | `getIgnoredDomainState()` Returns the domain state in which this trigger will be ignored.
    `java.lang.Long` | `getLastRunDate()`
    `java.lang.String` | `getName()` Returns trigger name.
    `ActionContext[]` | `getOnFailureActions()`
    `ActionContext[]` | `getOnFinishActions()`
    `ActionContext[]` | `getOnStartActions()`
    `ActionContext[]` | `getOnSuccessActions()`
    `Trigger.SingleInstanceMode` | `getSingleInstanceMode()`
    `java.lang.String[]` | `getTags()`
    `int` | `getVersion()`
    `boolean` | `hasActions()`
    `boolean` | `isAllowErrorEvent()` Returns firing error event flag.
    `boolean` | `isAsynchronous()` Returns trigger asynchronous flag.
    `boolean` | `isAsynchronousActions()`
    `boolean` | `isEnabled()` Returns trigger enabled flag.
    `boolean` | `isSingleInstanceRequired()`
    `void` | `setAllowErrorEvent(boolean value)` Sets firing error event flag.
    `void` | `setAsynchronous(boolean value)` Sets trigger asynchronous flag.
    `void` | `setAsynchronousActions(boolean value)`
    `void` | `setContexts(ActionContext[] value)` Sets action contexts.
    `void` | `setCreationDate(long value)`
    `void` | `setDescription(java.lang.String value)` Sets trigger description.
    `void` | `setEnabled(boolean value)` Sets trigger enabled flag.
    `void` | `setEventClass(java.lang.Class value)` Sets binded event class.
    `void` | `setExpression(com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object> value)` Sets trigger expression.
    `void` | `setExpressionString(java.lang.String value)` Sets expression string as entered by user.
    `void` | `setIgnoredDomainState(com.jscape.inet.mft.workflow.IgnoredDomainState value)` Sets a domain state in which this trigger will be ignored.
    `void` | `setLastRunDate(java.lang.Long value)`
    `void` | `setName(java.lang.String value)` Sets trigger name.
    `void` | `setOnFailureActions(ActionContext[] value)`
    `void` | `setOnFinishActions(ActionContext[] value)`
    `void` | `setOnStartActions(ActionContext[] value)`
    `void` | `setOnSuccessActions(ActionContext[] value)`
    `void` | `setSingleInstanceMode(Trigger.SingleInstanceMode value)`
    `void` | `setSingleInstanceRequired(boolean value)`
    `void` | `setTags(java.lang.String[] value)`
    `void` | `setVersion(int value)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Trigger

          public Trigger(java.lang.String name,
                         java.lang.String description,
                         java.lang.Class eventClass,
                         java.lang.String expressionString,
                         ActionContext[] onStartActions,
                         ActionContext[] onFinishActions,
                         ActionContext[] onSuccessActions,
                         ActionContext[] onFailureActions,
                         boolean allowErrorEvent,
                         boolean enabled,
                         boolean asynchronous,
                         boolean asynchronousActions,
                         boolean singleInstanceRequired,
                         Trigger.SingleInstanceMode singleInstanceMode,
                         com.jscape.inet.mft.workflow.IgnoredDomainState ignoredDomainState,
                         java.lang.String[] tags,
                         long creationDate,
                         java.lang.Long lastRunDate,
                         int version)

    - #### Trigger

          public Trigger()

      Creates a new trigger instance.

    - #### Trigger

          public Trigger(Trigger that)

      Copy constructor.
      Parameters:
        `that` - instance to copy

  - ### Method Detail

    - #### getName

          public java.lang.String getName()

      Returns trigger name.
      Returns:
        trigger name

    - #### setName

          public void setName(java.lang.String value)

      Sets trigger name.
      Parameters:
        `value` - the trigger name

    - #### getDescription

          public java.lang.String getDescription()

      Returns trigger description.
      Returns:
        trigger description

    - #### setDescription

          public void setDescription(java.lang.String value)

      Sets trigger description.
      Parameters:
        `value` - the trigger description

    - #### getEventClass

          public java.lang.Class getEventClass()

      Returns binded event class.
      Returns:
        binded event class

    - #### setEventClass

          public void setEventClass(java.lang.Class value)

      Sets binded event class.
      Parameters:
        `value` - the event class

    - #### setExpression

          public void setExpression(com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object> value)

      Sets trigger expression.
      Parameters:
        `value` - trigger expression

    - #### getExpressionString

          public java.lang.String getExpressionString()

      Returns expression string as entered by user.
      Returns:
        an expression string

    - #### setExpressionString

          public void setExpressionString(java.lang.String value)

      Sets expression string as entered by user.
      Parameters:
        `value` - an expression string value

    - #### setContexts

          public void setContexts(ActionContext[] value)

      Sets action contexts.
      Parameters:
        `value` - action contexts

    - #### getOnStartActions

          public ActionContext[] getOnStartActions()

    - #### setOnStartActions

          public void setOnStartActions(ActionContext[] value)

    - #### getOnFinishActions

          public ActionContext[] getOnFinishActions()

    - #### setOnFinishActions

          public void setOnFinishActions(ActionContext[] value)

    - #### getOnSuccessActions

          public ActionContext[] getOnSuccessActions()

    - #### setOnSuccessActions

          public void setOnSuccessActions(ActionContext[] value)

    - #### getOnFailureActions

          public ActionContext[] getOnFailureActions()

    - #### setOnFailureActions

          public void setOnFailureActions(ActionContext[] value)

    - #### isAllowErrorEvent

          public boolean isAllowErrorEvent()

      Returns firing error event flag.
      Returns:
        `true` if error event firing allowed; `false` otherwise

    - #### setAllowErrorEvent

          public void setAllowErrorEvent(boolean value)

      Sets firing error event flag.
      Parameters:
        `value` - if `true` trigger will fire error event if error appears while trigger run

    - #### isEnabled

          public boolean isEnabled()

      Returns trigger enabled flag.
      Returns:
        `true` if trigger is enabled; `false` otherwise

    - #### setEnabled

          public void setEnabled(boolean value)

      Sets trigger enabled flag.
      Parameters:
        `value` - if `true` trigger will be enabled

    - #### isAsynchronous

          public boolean isAsynchronous()

      Returns trigger asynchronous flag.
      Returns:
        `true` if trigger must be run asynchronously; `false` otherwise

    - #### setAsynchronous

          public void setAsynchronous(boolean value)

      Sets trigger asynchronous flag.
      Parameters:
        `value` - if `true` trigger will be run asynchronously

    - #### isAsynchronousActions

          public boolean isAsynchronousActions()

    - #### setAsynchronousActions

          public void setAsynchronousActions(boolean value)

    - #### isSingleInstanceRequired

          public boolean isSingleInstanceRequired()

    - #### setSingleInstanceRequired

          public void setSingleInstanceRequired(boolean value)

    - #### getSingleInstanceMode

          public Trigger.SingleInstanceMode getSingleInstanceMode()

    - #### setSingleInstanceMode

          public void setSingleInstanceMode(Trigger.SingleInstanceMode value)

    - #### getIgnoredDomainState

          public com.jscape.inet.mft.workflow.IgnoredDomainState getIgnoredDomainState()

      Returns the domain state in which this trigger will be ignored.
      Returns:
        a domain stated

    - #### setIgnoredDomainState

          public void setIgnoredDomainState(com.jscape.inet.mft.workflow.IgnoredDomainState value)

      Sets a domain state in which this trigger will be ignored.
      Parameters:
        `value` - a domain stated

    - #### getTags

          public java.lang.String[] getTags()

    - #### setTags

          public void setTags(java.lang.String[] value)

    - #### getCreationDate

          public long getCreationDate()

    - #### setCreationDate

          public void setCreationDate(long value)

    - #### getLastRunDate

          public java.lang.Long getLastRunDate()

    - #### setLastRunDate

          public void setLastRunDate(java.lang.Long value)

    - #### getVersion

          public int getVersion()

      Specified by:
        `getVersion` in interface `com.jscape.util.db.IntVersioned`

    - #### setVersion

          public void setVersion(int value)

      Specified by:
        `setVersion` in interface `com.jscape.util.db.IntVersioned`

    - #### hasActions

          public boolean hasActions()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © Advanced Systems Concepts Inc. 1999-2021. All Rights Reserved