org.drools.jsr94.rules.admin
Class RuleImpl

java.lang.Object
  extended by org.drools.jsr94.rules.admin.RuleImpl

public class RuleImpl
extends java.lang.Object

The Drools implementation of the Rule interface which provides access to simple metadata for a rule. Related Rule instances are assembled into RuleExecutionSets, which in turn, can be executed by a rules engine via the RuleSession interface.

See Also:
Rule

Method Summary
 java.lang.String getDescription()
          Get a description of the rule.
 java.lang.String getName()
          Get the name of this rule.
 java.lang.Object getProperty(java.lang.Object key)
          Get a user-defined or Drools-defined property.
 void setProperty(java.lang.Object key, java.lang.Object value)
          Set a user-defined or Drools-defined property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
Get the name of this rule.

Returns:
The name of this rule.

getDescription

public java.lang.String getDescription()
Get a description of the rule.

Returns:
A description of the rule or null of no description is specified.

getProperty

public java.lang.Object getProperty(java.lang.Object key)
Get a user-defined or Drools-defined property.

Parameters:
key - the key to use to retrieve the property
Returns:
the value bound to the key or null

setProperty

public void setProperty(java.lang.Object key,
                        java.lang.Object value)
Set a user-defined or Drools-defined property.

Parameters:
key - the key for the property value
value - the value to associate with the key