org.drools.tags.rule
Class RuleTagSupport

java.lang.Object
  |
  +--org.apache.commons.jelly.TagSupport
        |
        +--org.drools.tags.rule.RuleTagSupport
All Implemented Interfaces:
org.apache.commons.jelly.Tag
Direct Known Subclasses:
ConditionTag, ConsequenceTag, DeclarationTag, DurationTag, ExtractionTag, RuleSetTag, RulesTag, RuleTag

public abstract class RuleTagSupport
extends org.apache.commons.jelly.TagSupport

Support for rule tags.

Version:
$Id: RuleTagSupport.java,v 1.6 2002/09/27 20:55:32 bob Exp $
Author:
bob mcwhirter

Field Summary
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
protected RuleTagSupport()
          Construct.
 
Method Summary
 Declaration[] getAvailableDeclarations()
          Retrieve the array of available Declarations.
protected  Rule getRule()
          Retrieve the current Rule.
protected  RuleSet getRuleSet()
          Retrieve the current RuleSet.
protected  void requiredAttribute(java.lang.String name, java.lang.String value)
          Check required attribute.
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isTrim, setBody, setContext, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.commons.jelly.Tag
doTag
 

Constructor Detail

RuleTagSupport

protected RuleTagSupport()
Construct.

Method Detail

getRuleSet

protected RuleSet getRuleSet()
Retrieve the current RuleSet.

Returns:
The current rule-set or null if no rule-set is in scope.

getRule

protected Rule getRule()
Retrieve the current Rule.

Returns:
The current rule.

getAvailableDeclarations

public Declaration[] getAvailableDeclarations()
                                       throws org.apache.commons.jelly.JellyException
Retrieve the array of available Declarations.

Returns:
The array of declarations.
Throws:
org.apache.commons.jelly.JellyException - If no declarations are currently available in scope.

requiredAttribute

protected void requiredAttribute(java.lang.String name,
                                 java.lang.String value)
                          throws org.apache.commons.jelly.MissingAttributeException
Check required attribute.

Parameters:
name - Attribute name.
value - Attribute value.
Throws:
org.apache.commons.jelly.MissingAttributeException - If the value is either null or contains only whitespace.


Copyright © 2001-2003 The Werken Company. All Rights Reserved.