public interface TriggerManager
TriggerManager is the manager of all triggers in the server.| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(java.lang.String triggerName)
Tests whether there is a trigger specified by triggerName in the
TriggerManager. |
Trigger |
createTrigger(java.lang.String triggerName,
java.lang.String triggerDesc)
Creates a new EXTERN trigger with the specified trigger name and description
in the inner collection if there is no trigger with the same name yet.
|
void |
deleteTrigger(java.lang.String triggerName)
Deletes an existing
Trigger specified by triggerName. |
void |
fire(java.lang.String triggerName,
java.util.Properties userData)
Fires a trigger with the specified name and customer's trigger data.
|
Trigger |
getTrigger(java.lang.String triggerName)
Gets an existing
Trigger specified by triggerName. |
java.util.Iterator |
iterator()
Gets all triggers in the
TriggerManager, and the triggers are put into an iterator. |
void |
setEnable(java.lang.String triggerName,
boolean enable)
Enables or disables a
Trigger specified by triggerName. |
int |
size()
Gets the number of triggers in the
TriggerManager. |
Trigger createTrigger(java.lang.String triggerName, java.lang.String triggerDesc) throws TriggerManageException
triggerName - The name of the trigger which you want to create.triggerDesc - The description of the trigger which you want to create.TriggerManageException - If there is a trigger with the name specified
by triggerName already.Trigger getTrigger(java.lang.String triggerName)
Trigger specified by triggerName.triggerName - The name of the trigger which you want to get.Trigger instance if it exists, or else return null.void deleteTrigger(java.lang.String triggerName)
throws TriggerManageException
Trigger specified by triggerName.triggerName - The name of the trigger which you want to delete.TriggerManageException - If the trigger specified by triggerName is not bound with any scheduled task,
that is to say, the trigger is not referenced, it will be deleted;
otherwise, a TriggerManageException will be thrown.void setEnable(java.lang.String triggerName,
boolean enable)
Trigger specified by triggerName.
An enabled trigger can be fired, but a disabled trigger cannot.
triggerName - The name of the trigger which you want to enable or disable.enable - true to enable the trigger, or false to disable the trigger.void fire(java.lang.String triggerName,
java.util.Properties userData)
throws TriggerManageException
triggerName - The name of the trigger which you want to fire.userData - The customer's trigger data passed to the scheduled tasks. It can be used to
transfer parameters of reports between external system and the server.TriggerManageException - A TriggerManagerException will be thrown if there
is no trigger specified by triggerName.boolean contains(java.lang.String triggerName)
TriggerManager.triggerName - The name of the trigger which you want to test.java.util.Iterator iterator()
TriggerManager, and the triggers are put into an iterator.int size()
TriggerManager.TriggerManager.