org.apache.commons.jelly.tags.ant
Class SetPropertyTag

java.lang.Object
  extended by org.apache.commons.jelly.TagSupport
      extended by org.apache.commons.jelly.tags.ant.SetPropertyTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class SetPropertyTag
extends org.apache.commons.jelly.TagSupport

Tag which sets an attribute on the parent Ant Task if the given value is not null. This can be useful when setting parameters on Ant tasks, only if they have been specified via some well defined property, otherwise allowing the inbuilt default to be used.

Author:
James Strachan

Field Summary
private  java.lang.Object defaultValue
           
private static org.apache.commons.logging.Log log
          The Log to which logging calls will be made.
private  java.lang.String name
           
private  java.lang.Object value
           
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
SetPropertyTag()
           
 
Method Summary
 void doTag(org.apache.commons.jelly.XMLOutput output)
           
 java.lang.Object getDefault()
          Returns the defaultValue.
 java.lang.String getName()
          Returns the name.
 java.lang.Object getValue()
          Returns the value.
 void setDefault(java.lang.Object defaultValue)
          Sets the default value to be used if the specified value is empty.
 void setName(java.lang.String name)
          Sets the name of the Ant task property to set.
 void setValue(java.lang.Object value)
          Sets the value of the Ant task property to set.
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log
The Log to which logging calls will be made.


name

private java.lang.String name

value

private java.lang.Object value

defaultValue

private java.lang.Object defaultValue
Constructor Detail

SetPropertyTag

public SetPropertyTag()
Method Detail

doTag

public void doTag(org.apache.commons.jelly.XMLOutput output)
           throws org.apache.commons.jelly.MissingAttributeException,
                  org.apache.commons.jelly.JellyTagException
Throws:
org.apache.commons.jelly.MissingAttributeException
org.apache.commons.jelly.JellyTagException

getName

public java.lang.String getName()
Returns the name.

Returns:
String

getValue

public java.lang.Object getValue()
Returns the value.

Returns:
Object

setName

public void setName(java.lang.String name)
Sets the name of the Ant task property to set.

Parameters:
name - The name of the Ant task property to set

setValue

public void setValue(java.lang.Object value)
Sets the value of the Ant task property to set.

Parameters:
value - The value of the Ant task property to set

getDefault

public java.lang.Object getDefault()
Returns the defaultValue.

Returns:
Object

setDefault

public void setDefault(java.lang.Object defaultValue)
Sets the default value to be used if the specified value is empty.