public final class Trigger
extends java.lang.Object
Constructor and Description |
---|
Trigger(Condition condition,
Action action)
Creates a new local trigger instance.
|
Modifier and Type | Method and Description |
---|---|
void |
bind(Binding binding)
Binds this trigger to the given binding.
|
boolean |
equals(java.lang.Object o) |
Action |
getAction()
Returns the action for this trigger.
|
Binding |
getBinding()
Returns this triggers binding.
|
Condition |
getCondition()
Returns the condition of this trigger.
|
int |
getID()
Returns the trigger id.
|
JPack |
getInfo()
Returns the info pack for this trigger.
|
java.lang.String |
getOwner()
Returns the unique UID of the creator of this trigger.
|
int |
hashCode() |
boolean |
hasValidID()
Returns whether this trigger is already stored at the server and has a valid trigger id.
|
boolean |
isActive()
Returns whether this trigger is active.
|
void |
save()
Saves this trigger.
|
void |
setActive(boolean active)
Sets whether this trigger should be active.
|
boolean |
validateOwner(boolean writeUserUID)
Returns whether the stored trigger owner is stored as a unique UID.
|
public boolean isActive()
public void setActive(boolean active)
active
- set to true if this trigger is activepublic final void bind(Binding binding)
binding
- to bind topublic Condition getCondition()
public Action getAction()
public JPack getInfo()
public Binding getBinding()
Binding
or null of not yet boundpublic java.lang.String getOwner()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean hasValidID()
public int getID()
public void save() throws CumulusException, InvalidTypeException, InvalidStateException
CumulusException
- in case of an errorInvalidTypeException
- in case of an invalid type of binding for this triggerInvalidStateException
- in case of an errorpublic boolean validateOwner(boolean writeUserUID) throws InvalidStateException, InvalidTypeException
writeUserUID
- set to true if you want to convert an old trigger with a login name for the owner to a new trigger using a unique UIDInvalidStateException
- in case of an errorInvalidTypeException
- in case of an errorwww.canto.com
Canto, the Canto logo, the Cumulus logo, and Cumulus are registered trademarks of Canto GmbH, registered in the U.S. and other countries.