Kanzi  3.9.3
Java API
Trigger Class Reference

Trigger is the base class for defining events, conditions and actions for content-driven logic programming. More...

Inheritance diagram for Trigger:
[legend]

Public Member Functions

void addAction (Action action)
 Adds an action to the trigger. More...
 
void addCondition (Condition condition)
 Adds an condition to the trigger. More...
 
boolean checkConditions ()
 Checks against all conditions in the trigger.
 
void close ()
 Close the object, and release native resources.
 
void invokeActions ()
 Invokes actions in the trigger.
 
Iterable< ActioniterateActions ()
 Gets an Iterable object used to iterate the Actions. More...
 
Iterable< ConditioniterateConditions ()
 Gets an Iterable object used to iterate the Conditions. More...
 
- Public Member Functions inherited from NodeComponent
void close ()
 Close the object, and release native resources.
 
String getName ()
 Gets the value of NameProperty. More...
 
Node getNode ()
 Returns the node the node component is attached to or null if node component is not attached to a node. More...
 
NodeComponentState getState ()
 Gets the state of node component indicating if component is attached to a node, detached from any node or in process of attaching/detaching. More...
 
boolean isAttached ()
 Indicates whether node component is attached to a node. More...
 
boolean isAttaching ()
 Indicates whether node component is in the process of attaching to a node. More...
 
boolean isAttachingOrAttached ()
 Indicates whether node component is in the process of attaching to a node or already attached. More...
 
boolean isDetached ()
 Indicates whether node component is detached from any node. More...
 
boolean isDetaching ()
 Indicates whether node component currently detaching from the node. More...
 
boolean isDetachingOrDetached ()
 Indicates whether node component is in the process of detaching from the node or already detached. More...
 
void setName (String value)
 Sets the value of NameProperty. More...
 
- Public Member Functions inherited from KanziObject
boolean equals (Object object)
 
Domain getDomain ()
 Returns the domain the object belongs to. More...
 
Metaclass getDynamicMetaclass ()
 Returns the metaclass of the dynamic type of the object. More...
 
long getNative ()
 Gets a pointer to the backing C++ instance. More...
 
TDataType getOptionalProperty (PropertyType< TDataType > propertyType)
 Returns the current value of a property type, but does not use the default value if there are no inputs to the property value. More...
 
TDataType getProperty (PropertyType< TDataType > propertyType)
 Returns the current value of a property type. More...
 
EnumType getProperty (PropertyType< Integer > propertyType, Class< EnumType > enumClass)
 Returns the current value of an integer property type converted to a matching constant from specified enumeration. More...
 
int hashCode ()
 
boolean hasValue (PropertyType< TDataType > propertyType)
 Evaluates whether there are any inputs into the property value. More...
 
boolean isStale ()
 Test if the object is stale i.e. More...
 
void removeLocalValue (PropertyType< TDataType > propertyType)
 Removes the local value associated with the property. More...
 
void setProperty (PropertyType< TDataType > propertyType, TDataType value)
 Sets the local value of a property type. More...
 
void setProperty (PropertyType< Integer > propertyType, EnumType value)
 Sets the local value of an integer property type using a constant from an enumeration. More...
 

Static Public Attributes

static final Metaclass metaclass
 The Metaclass for the class. More...
 
- Static Public Attributes inherited from NodeComponent
static final Metaclass metaclass
 The Metaclass for the class. More...
 
- Static Public Attributes inherited from KanziObject
static final Metaclass metaclass = new AbstractMetaclass("Kanzi.Object")
 The Metaclass for the class.
 

Protected Member Functions

 Trigger (Domain domain, long handle, Metaclass metaclass)
 Wraps a given native Trigger. More...
 
void attachOverride ()
 Called when the Trigger is attached to a node.
 
void detachOverride ()
 Called when a Trigger is detached from a Node.
 
void initialize ()
 Initializes the Trigger.
 
- Protected Member Functions inherited from NodeComponent
 NodeComponent (Domain domain, long handle, Metaclass metaclass)
 Wraps a given native Node Component. More...
 
void attachOverride ()
 Called when the Trigger is attached to a node.
 
void detachOverride ()
 Called when a Trigger is detached from a Node.
 
void initialize ()
 Initializes the Node Component.
 
void removeNodeComponentMessageFilter (Node.MessageSubscriptionToken token)
 Removes message handler added via NodeComponent#addNodeComponentMessageHandler function. More...
 

Static Protected Member Functions

static< Derived extends NodeComponent > ObjectRef< Derived > createDerived (Domain domain, String name, Metaclass metaclass)
 Creates a derived class instance. More...
 
- Static Protected Member Functions inherited from NodeComponent
static< Derived extends NodeComponent > ObjectRef< Derived > createDerived (Domain domain, String name, Metaclass metaclass)
 Creates a derived class instance. More...
 

Additional Inherited Members

- Public Attributes inherited from NodeComponentMetadata
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.NodeComponent")
 Metaclass for NodeComponent.
 
DynamicPropertyType< String > NameProperty
 Name. More...
 
- Public Attributes inherited from TriggerMetadata
AbstractMetaclass metaclass = new AbstractMetaclass("Kanzi.Trigger")
 Metaclass for Trigger.
 

Detailed Description

Trigger is the base class for defining events, conditions and actions for content-driven logic programming.

Constructor & Destructor Documentation

◆ Trigger()

Trigger ( Domain  domain,
long  handle,
Metaclass  metaclass 
)
protected

Wraps a given native Trigger.

Called by KanziObject.connectObject(ObjectWrapper) when connecting to a native trigger.

Parameters
domainUI Domain where this trigger belongs.
handleNative object that is backing this trigger.
metaclassMetaclass data for this trigger.

Member Function Documentation

◆ addAction()

void addAction ( Action  action)

Adds an action to the trigger.

Parameters
actionThe Action to add.

◆ addCondition()

void addCondition ( Condition  condition)

Adds an condition to the trigger.

Parameters
conditionThe Condition to add.

◆ createDerived()

static <Derived extends NodeComponent> ObjectRef<Derived> createDerived ( Domain  domain,
String  name,
Metaclass  metaclass 
)
staticprotected

Creates a derived class instance.

Call this method as part of the create method for a derived class.

Parameters
domainUI Domain where this trigger belongs.
nameName of the trigger
metaclassMetaclass data of the trigger.
Returns
An ObjectRef that holds the created instance.

◆ iterateActions()

Iterable<Action> iterateActions ( )

Gets an Iterable object used to iterate the Actions.

Returns
An iterable of Actions.

◆ iterateConditions()

Iterable<Condition> iterateConditions ( )

Gets an Iterable object used to iterate the Conditions.

Returns
An iterable of Conditions.

Member Data Documentation

◆ metaclass

final Metaclass metaclass
static
Initial value:

The Metaclass for the class.