com.sun.n1.sps.model.rule
Interface RuleMetaData


public interface RuleMetaData

A meta data object describing a rule. A rule meta data object is a data bean that contains a collection of criteria and action meta data objects. Logically, the criteria are used to determine if a particular event is interesting, and the actions are used to handle any interesting events in a particular way. Note that in most cases, a rule contains just a single criteria and a single action.

Note that the criteria and actions contained in a rule are logically managed and owned by the rule. They are not meant to be shared with other rules. If a rule is deleted, each of its contained criteria and actions are deleted as well.

This representation of a rule is intended for use by a UI, and is suitable for transport over RPC and eventual persistent storage.


Method Summary
 ActionMetaData[] getActions()
          Returns the collection of action meta data defined for this rule.
 CriteriaMetaData[] getCriteria()
          Returns the collection of criteria meta data defined for this rule.
 java.lang.String getDescription()
          Returns the description of this object.
 java.lang.String getName()
          Returns the name of this object.
 RuleID getRuleID()
          The unique ID of this object.
 boolean isActive()
          True if this rule is currently active, false otherwise.
 

Method Detail

getRuleID

RuleID getRuleID()
The unique ID of this object. If null, the object does not yet exist in persistent storage. If non-null, then this object corresponds to an object in persistent storage. When this rule is saved, a persistent rule is created or updated depending on whether this field is null or non-null, respectively.

Returns:
The RuleID for this object.

isActive

boolean isActive()
True if this rule is currently active, false otherwise. Only active rules are capable of handling events.

Returns:
true if this rule is currently active, else false.

getCriteria

CriteriaMetaData[] getCriteria()
Returns the collection of criteria meta data defined for this rule. Note that in determining whether a particular event is interesting, all criteria must agree that the event is interesting.

Returns:
The array of CriteriaMetaData.

getActions

ActionMetaData[] getActions()
Returns the collection of action meta data defined for this rule. If more than one action is defined, then each action is executed for any interesting event.

Returns:
The array of ActionMetaData defined for this rule.

getName

java.lang.String getName()
Returns the name of this object.

Returns:
The name of this object.

getDescription

java.lang.String getDescription()
Returns the description of this object.

Returns:
The description of this object.