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 EnvEjbRefTagsHandler

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

Direct Known Subclasses:
  WebSphereEjbRefTagsHandler

public class EnvEjbRefTagsHandler
extends EnvTagsHandler

Version:
  $Revision 1.1 $
Author:
  Matthias Germann
xdoclet.taghandler
  namespace="EjbEnvEjbRef"
created
  April 5, 2005
To do:
  refactor ejbRefId properly to account for ejb:bean - it may not be needed anymore., refactor storeReferringClassId properly to take ejb:bean into account - may not be needed anymore.

Field Summary

Fields inherited from class xdoclet.modules.ejb.env.EnvTagsHandler
`currentMember, currentTag, currentTagType`

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

Constructor Summary
`EnvEjbRefTagsHandler()`

Method Summary
`String` | `componentInterface()` Returns the component interface for the current ejb reference
`protected void` | `doGenerate(String template)` Called for each tag in the `forTags` loop.
`String` | `ejbRefId()` Returns unique id for the specified ejb-ref.
`String` | `ejbRefJndiName()` Returns the global JNDI name for the current EJB ref.
`protected xjavadoc.XClass` | `findEjb(String ejbName)` Finds and returns the class with the specified ejbName.
`void` | `forAllEjbRefMembers(String template, Properties attributes)` Evaluates the body block for each method- and field-level ejb reference.
`void` | `forAllEjbRefMethods(String template, Properties attributes)` Evaluates the body block for each method-level ejb reference.
`void` | `forAllEjbRefs(String template, Properties attributes)` Evaluates the body block for each ejb reference.
`String` | `homeInterface()` Returns the home interface for the current ejb reference
`void` | `ifLocalEjbRef(String template)` Generates code if the ejb-ref is local
`void` | `ifRemoteEjbRef(String template)` Generates code if the ejb-ref is local
`protected boolean` | `isLocalEjbRef(xjavadoc.XTag ejbRefTag)` Return true if the ejb-ref is local
`protected boolean` | `isRemoteEjbRef(xjavadoc.XTag ejbRefTag)` Return true if the ejb-ref is remote
`String` | `name(Properties attributes)` Returns the name parameter value for the current tag.
`protected void` | `storeReferringClassId()` Stores the id of current EJB for further use by other tags in referringClassId attribute.

Methods inherited from class xdoclet.modules.ejb.env.EnvTagsHandler
`forAllMemberTags, forAllMethodTags, forAllTags, forTags, ifHasParam, ifHasTag, ifHasType, ifNotPrimitiveMember, ifParamValueEquals, ifParamValueNotEquals, ifPrimitiveMember, memberName, memberType, methodSignature, paramValue, type`

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`

Constructor Detail

### EnvEjbRefTagsHandler

    public EnvEjbRefTagsHandler()

Method Detail

### ejbRefId

    public String ejbRefId()
                    throws XDocletException

  Returns unique id for the specified ejb-ref. It prefixes it with the referring class's id, then a _ and the id of the ejb object.

  Returns:
    Description of the Returned Value
  Throws:
    `XDocletException`
  doc.tag
    type="content"
  To do:
    refactor this properly to account for ejb:bean - it may not be needed anymore.

### forAllEjbRefs

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

  Evaluates the body block for each ejb reference.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"
  doc.param
    name="tagName" description="the ejb-ref tag" default="ejb.ejb-ref"

### forAllEjbRefMembers

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

  Evaluates the body block for each method- and field-level ejb reference.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"
  doc.param
    name="tagName" description="the ejb-ref tag" default="ejb.ejb-ref"

### forAllEjbRefMethods

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

  Evaluates the body block for each method-level ejb reference.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"
  doc.param
    name="tagName" description="the ejb-ref tag" default="ejb.ejb-ref"

### ejbRefJndiName

    public String ejbRefJndiName()
                          throws XDocletException

  Returns the global JNDI name for the current EJB ref.

  Returns:
    The JNDI name of current EJB ref.
  Throws:
    `XDocletException`
  doc.tag
    type="content"

### ifLocalEjbRef

    public void ifLocalEjbRef(String template)
                       throws XDocletException

  Generates code if the ejb-ref is local

  Parameters:
    `template` -
  Throws:
    `XDocletException`
  doc.tag
    type="block"

### ifRemoteEjbRef

    public void ifRemoteEjbRef(String template)
                        throws XDocletException

  Generates code if the ejb-ref is local

  Parameters:
    `template` -
  Throws:
    `XDocletException`
  doc.tag
    type="block"

### name

    public String name(Properties attributes)
                throws XDocletException

  Description copied from class: `EnvTagsHandler`
  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.

  Overrides:
    `name` in class `EnvTagsHandler`
  Parameters:
    `attributes` - the attributes
  Returns:
    the name
  Throws:
    `XDocletException` - if an error occures

### homeInterface

    public String homeInterface()
                         throws XDocletException

  Returns the home interface for the current ejb reference

  Returns:
    the fully qualified class name
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="content"

### componentInterface

    public String componentInterface()
                              throws XDocletException

  Returns the component interface for the current ejb reference

  Returns:
    the fully qualified class name
  Throws:
    `XDocletException` - if an error occures
  doc.tag
    type="content"

### isLocalEjbRef

    protected boolean isLocalEjbRef(xjavadoc.XTag ejbRefTag)
                             throws XDocletException

  Return true if the ejb-ref is local

  Parameters:
    `ejbRefTag` -
  Returns:
    true if the ejb-ref is local otherwise false
  Throws:
    `XDocletException`

### isRemoteEjbRef

    protected boolean isRemoteEjbRef(xjavadoc.XTag ejbRefTag)
                              throws XDocletException

  Return true if the ejb-ref is remote

  Parameters:
    `ejbRefTag` -
  Returns:
    true if the ejb-ref is remote otherwise false
  Throws:
    `XDocletException`

### doGenerate

    protected void doGenerate(String template)
                       throws XDocletException

  Description copied from class: `EnvTagsHandler`
  Called for each tag in the `forTags` loop. The default behaviour is to call `generate(template)`

  Overrides:
    `doGenerate` in class `EnvTagsHandler`
  Parameters:
    `template` - the template
  Throws:
    `XDocletException` - if an error occures

### storeReferringClassId

    protected void storeReferringClassId()
                                  throws XDocletException

  Stores the id of current EJB for further use by other tags in referringClassId attribute.

  Throws:
    `XDocletException`
  To do:
    refactor this properly to take ejb:bean into account - may not be needed anymore.

### findEjb

    protected xjavadoc.XClass findEjb(String ejbName)
                               throws XDocletException

  Finds and returns the class with the specified ejbName. An XDocletException is thrown if not found.

  Parameters:
    `ejbName` - Description of Parameter
  Returns:
    Description of the Returned Value
  Throws:
    `XDocletException`

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