Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## xdoclet.modules.ejb.env
Class EnvTagsHandler

    java.lang.Object
      xdoclet.template.TemplateTagHandler
          xdoclet.XDocletTagSupport
              xdoclet.modules.ejb.env.EnvTagsHandler

Direct Known Subclasses:
  EnvEjbRefTagsHandler, WebSphereTagsHandler

public class EnvTagsHandler
extends XDocletTagSupport

Handles field level tag's for configuring a bean's environment.

Version:
  $Revision: 1.3 $
Author:
  Matthias Germann
xdoclet.taghandler
  namespace="EjbEnv"
created
  March 31, 2005

Field Summary
`protected xjavadoc.XMember` | `currentMember`
`protected xjavadoc.XTag` | `currentTag`
`protected int` | `currentTagType`

Fields inherited from class xdoclet.XDocletTagSupport
`FOR_CLASS, FOR_CONSTRUCTOR, FOR_FIELD, FOR_METHOD, PARAMETER_DELIMITER`

Constructor Summary
`EnvTagsHandler()`

Method Summary
`protected void` | `doGenerate(String template)` Called for each tag in the `forTags` loop.
`void` | `forAllMemberTags(String template, Properties attributes)` Executes the template for all method- and field-level tags with the passed name
`void` | `forAllMethodTags(String template, Properties attributes)` Executes the template for all method-level tags with the passed name
`void` | `forAllTags(String template, Properties attributes)` Executes the template for all class-, method- and field-level tags with the passed name
`protected void` | `forTags(String template, Properties attributes, boolean forClass, boolean forMethod, boolean forField)` Executes the passed template for the passed
`void` | `ifHasParam(String template, Properties attributes)` Executes the body only if the current tag has a specified parameter
`void` | `ifHasTag(String template, Properties attributes)` Executes the body only if the current class has at least one ot the passed tags at field- or method-level
`void` | `ifHasType(String template, Properties attributes)` Executes the body only if the current tag is either a method- or fiel-level tag or has a type parameter.
`void` | `ifNotPrimitiveMember(String template, Properties attributes)` Executes the body only if the current field type or method return type is not a primitive.
`void` | `ifParamValueEquals(String template, Properties attributes)` Executes the body only if the specified tag's value is equal to the specified value
`void` | `ifParamValueNotEquals(String template, Properties attributes)` Executes the body only if the specified tag's value is equal to the specified value
`void` | `ifPrimitiveMember(String template, Properties attributes)` Executes the body only if the current field type or method return type is primitive.
`String` | `memberName(Properties attributes)` Returns the method or field name.
`String` | `memberType()` Returns the method's return type or the field's type.
`String` | `methodSignature()` Returns the method signature for the current method.
`String` | `name(Properties attributes)` Returns the name parameter value for the current tag.
`String` | `paramValue(Properties attributes)` Returns the value of a parameter.
`String` | `type(Properties attributes)` Returns the type parameter value for the current tag.

Methods inherited from class xdoclet.XDocletTagSupport
`delimit, expandClassName, generate, getCurrentClass, getCurrentClassTag, getCurrentConstructor, getCurrentField, getCurrentFieldTag, getCurrentMethod, getCurrentMethodTag, getCurrentPackage, getDocletContext, getEngine, getExpandedDelimitedTagValue, getTagValue, getTagValue, getTagValue, hasHavingClassTag, hasTag, isTagValueEqual, mandatoryParamNotFound, mandatoryTemplateTagParamNotFound, modifiers, popCurrentClass, pushCurrentClass, setCurrentClass, setCurrentClassTag, setCurrentConstructor, setCurrentField, setCurrentFieldTag, setCurrentMethod, setCurrentMethodTag, setCurrentPackage`

Methods inherited from class xdoclet.template.TemplateTagHandler
`getXJavaDoc, setXJavaDoc`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### currentTag

    protected xjavadoc.XTag currentTag

### currentMember

    protected xjavadoc.XMember currentMember

### currentTagType

    protected int currentTagType

Constructor Detail

### EnvTagsHandler

    public EnvTagsHandler()

Method Detail

### forAllTags

    public void forAllTags(String template,
                           Properties attributes)
                    throws XDocletException

  Executes the template for all class-, method- and field-level tags with the passed name

  Parameters:
    `template` - the template
    `attributes` - the attributes
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="block"
  doc.param
    name="tagName" optional="false" description="the tag name", name="paramName" optional="true" description="the required parameter", name="paramValue" optional="true" description="the value for the required parameter"

### forAllMemberTags

    public void forAllMemberTags(String template,
                                 Properties attributes)
                          throws XDocletException

  Executes the template for all method- and field-level tags with the passed name

  Parameters:
    `template` - the template
    `attributes` - the attributes
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="block"
  doc.param
    name="tagName" optional="false" description="the tag name", name="paramName" optional="true" description="the required parameter", name="paramValue" optional="true" description="the value for the required parameter"

### forAllMethodTags

    public void forAllMethodTags(String template,
                                 Properties attributes)
                          throws XDocletException

  Executes the template for all method-level tags with the passed name

  Parameters:
    `template` - the template
    `attributes` - the attributes
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="block"
  doc.param
    name="tagName" optional="false" description="the tag name", name="paramName" optional="true" description="the required parameter", name="paramValue" optional="true" description="the value for the required parameter"

### name

    public String name(Properties attributes)
                throws XDocletException

  Returns the name parameter value for the current tag. If the name parameter is not specified for a method- or field-level tag, the member's name is returned. If the name parameter is not specified for a class level tag, an error is generated.

  Parameters:
    `attributes` - the attributes
  Returns:
    the name
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="content"
  doc.param
    name="paramName" optional="false" description="the name of the name parameter"

### type

    public String type(Properties attributes)
                throws XDocletException

  Returns the type parameter value for the current tag. Returns the field type for field-level tags and the return value for method-level tags. For class-level tags, the value of the type parameter is returned. The wrapper class is returned for primitive fields an methods with primitive return values.

  Parameters:
    `attributes` - the attributes
  Returns:
    the type
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="content"
  doc.param
    name="paramName" optional="false" description="the name of the type parameter", name="values" description="The valid values for the parameter, comma separated. An error message is printed if the parameter value is not one of the values.", name="default" description="The default value is returned if parameter not specified by user for the tag.", name="mandatory" values="true,false" description="Generate an error if parameter not

### ifHasType

    public void ifHasType(String template,
                          Properties attributes)
                   throws XDocletException

  Executes the body only if the current tag is either a method- or fiel-level tag or has a type parameter.

  Parameters:
    `template` - the template
    `attributes` - the attributes
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="block"
  doc.param
    name="paramName" optional="false" description="the name of the name parameter"

### memberName

    public String memberName(Properties attributes)
                      throws XDocletException

  Returns the method or field name. Can only be used inside `forAllMemberTags` or `forAllMethodTags` .

  Parameters:
    `attributes` - the attributes
  Returns:
    the memeber's name
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="content"
  doc.param
    name="prefix" optional="true" description="the prefix for the name"

### memberType

    public String memberType()
                      throws XDocletException

  Returns the method's return type or the field's type. Can only be used inside `forAllMemberTags` or `forAllMethodTags`.

  Returns:
    the member's type
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="content"

### methodSignature

    public String methodSignature()
                           throws XDocletException

  Returns the method signature for the current method. Can only be used inside `forAllMethodTags`.

  Returns:
    the current method's signature
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="content"

### paramValue

    public String paramValue(Properties attributes)
                      throws XDocletException

  Returns the value of a parameter.

  Parameters:
    `attributes` - the attributes
  Returns:
    the value
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="content"
  doc.param
    name="paramName" optional="false" description="the name of the parameter", name="values" description="The valid values for the parameter, comma separated. An error message is printed if the parameter value is not one of the values.", name="default" description="The default value is returned if parameter not specified by user for the tag.", name="mandatory" values="true,false" description="Generate an error if parameter not

### ifHasParam

    public void ifHasParam(String template,
                           Properties attributes)
                    throws XDocletException

  Executes the body only if the current tag has a specified parameter

  Parameters:
    `template` - the template
    `attributes` - the attributes
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="body"
  doc.param
    name="paramName" optional="false" description="the name of the parameter"

### ifParamValueEquals

    public void ifParamValueEquals(String template,
                                   Properties attributes)
                            throws XDocletException

  Executes the body only if the specified tag's value is equal to the specified value

  Parameters:
    `template` - the template
    `attributes` - the attributes
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="body"
  doc.param
    name="paramName" optional="false" description="the name of the parameter", name="value" optional="false" description="the value of the parameter"

### ifParamValueNotEquals

    public void ifParamValueNotEquals(String template,
                                      Properties attributes)
                               throws XDocletException

  Executes the body only if the specified tag's value is equal to the specified value

  Parameters:
    `template` - the template
    `attributes` - the attributes
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="body"
  doc.param
    name="paramName" optional="false" description="the name of the parameter", name="value" optional="false" description="the value of the parameter"

### ifPrimitiveMember

    public void ifPrimitiveMember(String template,
                                  Properties attributes)
                           throws XDocletException

  Executes the body only if the current field type or method return type is primitive.

  Parameters:
    `template` - the template
    `attributes` - the attributes
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="block"

### ifNotPrimitiveMember

    public void ifNotPrimitiveMember(String template,
                                     Properties attributes)
                              throws XDocletException

  Executes the body only if the current field type or method return type is not a primitive.

  Parameters:
    `template` - the template
    `attributes` - the attributes
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="block"

### ifHasTag

    public void ifHasTag(String template,
                         Properties attributes)
                  throws XDocletException

  Executes the body only if the current class has at least one ot the passed tags at field- or method-level

  Parameters:
    `template` - the template
    `attributes` - the attributes
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="block"
  doc.param
    name="tagName" optional="false" description="the tag names (comma separated)", name="paramName" optional="true" description="tags must have this parameter", name="paramValue" optional="true" description="tags must have this value for the parameter with 'paramName'"

### forTags

    protected void forTags(String template,
                           Properties attributes,
                           boolean forClass,
                           boolean forMethod,
                           boolean forField)
                    throws XDocletException

  Executes the passed template for the passed

  Parameters:
    `template` - the template
    `attributes` - the parameters
    `forClass` - indicates whether the template should be excuted for class level tags
    `forMethod` - indicates whether the template should be excuted for method level tags
    `forField` - indicates whether the template should be excuted for field level tags
  Throws:
    `XDocletException` - if an error occures

### doGenerate

    protected void doGenerate(String template)
                       throws XDocletException

  Called for each tag in the `forTags` loop. The default behaviour is to call `generate(template)`

  Parameters:
    `template` - the template
  Throws:
    `XDocletException` - if an error occures

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| http://xdoclet.sourceforge.net/
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD