Knowledge API Legacy5 Adapter 6.0.0.CR4-Pre1

org.drools.impl.adapters
Class RuleAdapter

java.lang.Object
  extended by org.drools.impl.adapters.RuleAdapter
All Implemented Interfaces:
KnowledgeDefinition, Rule

public class RuleAdapter
extends Object
implements Rule


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.drools.definition.KnowledgeDefinition
KnowledgeDefinition.KnowledgeType
 
Constructor Summary
RuleAdapter(org.kie.api.definition.rule.Rule delegate)
           
 
Method Summary
static List<Rule> adaptRules(Collection<org.kie.api.definition.rule.Rule> rules)
           
 String getId()
           
 KnowledgeDefinition.KnowledgeType getKnowledgeType()
           
 String getMetaAttribute(String key)
          Returns the value of the meta attribute identified by the "key"
 Map<String,Object> getMetaAttributes()
          Returns an immutable Map of all meta attributes associated with this rule object.
 Map<String,Object> getMetaData()
          Returns an immutable Map of all meta data attributes associated with this rule object.
 String getName()
          Returns this rule's name.
 String getNamespace()
           
 String getPackageName()
          Returns the package name (namespace) this rule is tied to.
 Collection<String> listMetaAttributes()
          This method is deprecated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleAdapter

public RuleAdapter(org.kie.api.definition.rule.Rule delegate)
Method Detail

getPackageName

public String getPackageName()
Description copied from interface: Rule
Returns the package name (namespace) this rule is tied to.

Specified by:
getPackageName in interface Rule
Returns:
the package name.

getName

public String getName()
Description copied from interface: Rule
Returns this rule's name.

Specified by:
getName in interface Rule
Returns:
the rule name

getMetaData

public Map<String,Object> getMetaData()
Description copied from interface: Rule
Returns an immutable Map of all meta data attributes associated with this rule object.

Specified by:
getMetaData in interface Rule
Returns:
an immutable Map of meta data attributes.

listMetaAttributes

public Collection<String> listMetaAttributes()
Description copied from interface: Rule
This method is deprecated. Please use Rule.getMetaAttributes() instead.

Specified by:
listMetaAttributes in interface Rule
Returns:
a collection with all the meta attribute keys associated with this Rule.

getMetaAttributes

public Map<String,Object> getMetaAttributes()
Description copied from interface: Rule
Returns an immutable Map of all meta attributes associated with this rule object.

Specified by:
getMetaAttributes in interface Rule
Returns:
an immutable Map of meta attributes.

getMetaAttribute

public String getMetaAttribute(String key)
Description copied from interface: Rule
Returns the value of the meta attribute identified by the "key"

Specified by:
getMetaAttribute in interface Rule
Parameters:
key - the meta attribute key
Returns:
the meta attribute value or null if there is no value for that key.

getKnowledgeType

public KnowledgeDefinition.KnowledgeType getKnowledgeType()
Specified by:
getKnowledgeType in interface KnowledgeDefinition

getNamespace

public String getNamespace()
Specified by:
getNamespace in interface KnowledgeDefinition

getId

public String getId()
Specified by:
getId in interface KnowledgeDefinition

adaptRules

public static List<Rule> adaptRules(Collection<org.kie.api.definition.rule.Rule> rules)

Knowledge API Legacy5 Adapter 6.0.0.CR4-Pre1

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.