org.drools.tags.rule
Class DeclarationTag

java.lang.Object
  |
  +--org.apache.commons.jelly.TagSupport
        |
        +--org.drools.tags.rule.RuleTagSupport
              |
              +--org.drools.tags.rule.DeclarationTag
All Implemented Interfaces:
ObjectTypeReceptor, org.apache.commons.jelly.Tag
Direct Known Subclasses:
ParameterTag

public class DeclarationTag
extends RuleTagSupport
implements ObjectTypeReceptor

Construct a Declaration for a Rule.

Version:
$Id: DeclarationTag.java,v 1.5 2002/09/27 20:55:32 bob Exp $
Author:
bob mcwhirter
See Also:
Declaration

Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
DeclarationTag()
          Construct.
 
Method Summary
protected  Declaration createDeclaration(org.apache.commons.jelly.XMLOutput output)
          Create the Declaration.
 void doTag(org.apache.commons.jelly.XMLOutput output)
          Perform this tag.
 java.lang.String getIdentifier()
          Retrieve the identifier.
 java.lang.String getVar()
          Retrieve the variable in which to store the Declaration.
 void receiveObjectType(ObjectType objectType)
          Receive the ObjectType.
 void setIdentifier(java.lang.String identifier)
          Set the identifier.
 void setObjectType(ObjectType objectType)
          Set the ObjectType.
 void setVar(java.lang.String var)
          Set the variable in which to store the Declaration.
protected  void verifyAttributes()
          Verify required attributes.
 
Methods inherited from class org.drools.tags.rule.RuleTagSupport
getAvailableDeclarations, getRule, getRuleSet, requiredAttribute
 
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
 

Constructor Detail

DeclarationTag

public DeclarationTag()
Construct.
Method Detail

setIdentifier

public void setIdentifier(java.lang.String identifier)
Set the identifier.
Parameters:
identifier - The identifier.

getIdentifier

public java.lang.String getIdentifier()
Retrieve the identifier.
Returns:
The identifier.

setObjectType

public void setObjectType(ObjectType objectType)
Set the ObjectType.
Parameters:
objectType - The object type.

setVar

public void setVar(java.lang.String var)
Set the variable in which to store the Declaration.
Parameters:
var - The variable name.

getVar

public java.lang.String getVar()
Retrieve the variable in which to store the Declaration.
Returns:
The variable name.

verifyAttributes

protected void verifyAttributes()
                         throws org.apache.commons.jelly.MissingAttributeException
Verify required attributes.
Throws:
org.apache.commons.jelly.MissingAttributeException - If a required attribute is not present.

createDeclaration

protected Declaration createDeclaration(org.apache.commons.jelly.XMLOutput output)
                                 throws java.lang.Exception
Create the Declaration.
Parameters:
output - The output sink.
Returns:
The configured declaration.
Throws:
java.lang.Exception - If an error occurs while attempting to configure the declaration.

receiveObjectType

public void receiveObjectType(ObjectType objectType)
Receive the ObjectType.
Specified by:
receiveObjectType in interface ObjectTypeReceptor
Parameters:
objectType - The object type.

doTag

public void doTag(org.apache.commons.jelly.XMLOutput output)
           throws java.lang.Exception
Perform this tag.
Overrides:
doTag in class org.apache.commons.jelly.TagSupport
Parameters:
output - The output sink.
Throws:
java.lang.Exception - If an error occurs while attempting to perform this tag.


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