|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.db.RuleFactoryAdapter org.opengts.extra.rule.RuleFactoryLite
public class RuleFactoryLite
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.opengts.db.RuleFactory |
---|
RuleFactory.NotifyAction |
Field Summary | |
---|---|
static java.lang.String |
PROP_RuleFactoryLite_emailEnabled
|
Constructor Summary | |
---|---|
RuleFactoryLite()
|
Method Summary | |
---|---|
protected boolean |
_performAction(EventData evdb,
org.opengts.extra.rule.RuleFactoryLite.RuleFunction ftn,
int actionMask,
java.lang.String emailTo,
java.lang.String emailSubj,
java.lang.String emailBody)
|
protected boolean |
_sendNotification(EventData evdb,
org.opengts.extra.rule.RuleFactoryLite.RuleFunction ftn,
int actionMask,
java.lang.String devEmailTo,
java.lang.String devEmailSubj,
java.lang.String devEmailBody)
|
boolean |
checkRuntime()
Initializes and returns true if successful |
boolean |
checkSelectorSyntax(java.lang.String selector)
Return true if the specified selector is syntactically correct |
java.lang.String |
convertToENRE(java.lang.String selector)
|
static int |
cron(java.lang.String[] argv)
|
static void |
DebugSetSendNotification(boolean send)
|
java.lang.Object |
evaluateSelector(java.lang.String selector,
Account account)
Evaluates a selector against the specified Account and returns the result |
java.lang.Object |
evaluateSelector(java.lang.String selector,
EventData event)
Evaluates a selector against the specified event and returns the result |
int |
executeRule(java.lang.String ruleID,
EventData event)
Executes the specified ruleID against the specified EventData record, and return a mask containing the actions performed. |
int |
executeRules(EventData event)
May call an extended set of rule definitions |
int |
executeSelector(java.lang.String sel,
EventData event)
Checks the specified rule 'selector' against the specified event, and executes the default action devices by the current Device. |
java.lang.String |
getFunctionDescription(java.lang.String ftnName)
Returns the description for the specified function name |
java.util.List<java.lang.String> |
getFunctionNames()
Returns a list of all available selector function names |
java.lang.String |
getFunctionUsage(java.lang.String ftnName)
Returns the function "usage" description for the specified function name |
java.lang.String |
getIdentifierDescription(java.lang.String idName)
Returns the description for the specified identifier |
java.util.List<java.lang.String> |
getIdentifierNames()
Returns a list of all available selector identifiers |
java.lang.String |
getName()
Returns this RuleFactory name |
java.lang.String[] |
getRuleIDs(Account account)
Returns a list of defined rule-ids for the specified Account. |
java.lang.String |
getRuleNotifyEmail(Account account,
java.lang.String ruleID)
Returns the rule notification email addresses for the specified rule-id, in the specified Account. |
java.lang.String |
getRuleSelector(Account account,
java.lang.String ruleID)
Return the selector for the specified rule-id |
java.lang.String |
getVersion()
Return this RuleFactory version String |
boolean |
isSelectorMatch(java.lang.String selector,
Account account)
|
boolean |
isSelectorMatch(java.lang.String selector,
EventData event)
Return true if the specified 'event' matches the specified 'selector' |
static void |
main(java.lang.String[] argv)
|
static boolean |
SendNotification()
|
Methods inherited from class org.opengts.db.RuleFactoryAdapter |
---|
getGeoCorridorDescription, getPredefinedRuleActions, ValidateActionMask |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROP_RuleFactoryLite_emailEnabled
Constructor Detail |
---|
public RuleFactoryLite()
Method Detail |
---|
public static void DebugSetSendNotification(boolean send)
public static boolean SendNotification()
public java.lang.String getName()
RuleFactoryAdapter
getName
in interface RuleFactory
getName
in class RuleFactoryAdapter
public java.lang.String getVersion()
RuleFactoryAdapter
getVersion
in interface RuleFactory
getVersion
in class RuleFactoryAdapter
public boolean checkRuntime()
RuleFactory
public java.util.List<java.lang.String> getIdentifierNames()
RuleFactory
public java.lang.String getIdentifierDescription(java.lang.String idName)
RuleFactory
idName
- The name of the identifier for which the description is returned.
public java.util.List<java.lang.String> getFunctionNames()
RuleFactory
public java.lang.String getFunctionUsage(java.lang.String ftnName)
RuleFactory
ftnName
- The name of the function for which the "usage" description is returned.
public java.lang.String getFunctionDescription(java.lang.String ftnName)
RuleFactory
ftnName
- The name of the function for which the description is returned.
public java.lang.String[] getRuleIDs(Account account)
account
- The account from which the rule-id list is returned
public java.lang.String getRuleSelector(Account account, java.lang.String ruleID)
account
- the AccountruleID
- the rule-id
public java.lang.String getRuleNotifyEmail(Account account, java.lang.String ruleID)
account
- The account which owns the rule-id from which the notify email addresses are returnedruleID
- The Rule-ID which contains the notify email addresses to return
public boolean checkSelectorSyntax(java.lang.String selector)
RuleFactory
selector
- The rule selector to syntax check
public boolean isSelectorMatch(java.lang.String selector, EventData event)
RuleFactory
selector
- The rule selector to check against the specified eventevent
- The event that contains the criteria used by the selector
public boolean isSelectorMatch(java.lang.String selector, Account account)
public java.lang.String convertToENRE(java.lang.String selector)
public java.lang.Object evaluateSelector(java.lang.String selector, EventData event)
RuleFactory
selector
- The selector to execute.event
- The event that contains the criteria used by the selector
public java.lang.Object evaluateSelector(java.lang.String selector, Account account)
RuleFactory
selector
- The selector to execute.account
- The Account that contains the criteria used by the selector
public int executeSelector(java.lang.String sel, EventData event)
sel
- The rule selectorevent
- The current event
public int executeRules(EventData event)
event
- The current incoming EventData record
public int executeRule(java.lang.String ruleID, EventData event)
ruleID
- The ruleID to execute against the specified eventevent
- The event that contains the criteria used by the rules
protected boolean _performAction(EventData evdb, org.opengts.extra.rule.RuleFactoryLite.RuleFunction ftn, int actionMask, java.lang.String emailTo, java.lang.String emailSubj, java.lang.String emailBody)
protected boolean _sendNotification(EventData evdb, org.opengts.extra.rule.RuleFactoryLite.RuleFunction ftn, int actionMask, java.lang.String devEmailTo, java.lang.String devEmailSubj, java.lang.String devEmailBody)
public static int cron(java.lang.String[] argv)
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |