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.intf
Class InterfaceTagsHandler

    java.lang.Object
      xdoclet.template.TemplateTagHandler
          xdoclet.XDocletTagSupport
              xdoclet.modules.ejb.EjbTagsHandler
                  xdoclet.modules.ejb.intf.InterfaceTagsHandler

public class InterfaceTagsHandler
extends EjbTagsHandler

Version:
  $Revision: 1.21 $
Author:
  Ara Abrahamian (ara_e@email.com), Christoph G. Jung (christoph.jung@infor.de)
xdoclet.taghandler
  namespace="EjbIntf"
created
  Oct 15, 2001

Field Summary
`static String` | `SERVICE_ENDPOINT_EXTENDS_PARAM`
`static String` | `SERVICE_ENDPOINT_INTERFACE`

Fields inherited from class xdoclet.modules.ejb.EjbTagsHandler
`ALL, LOCAL_SUFFIX, SERVICE_ENDPOINT, SERVICE_ENDPOINT_SUFFIX`

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

Constructor Summary
`InterfaceTagsHandler()`

Method Summary
`String` | `beanClassNameFromInterfaceName(Properties attributes)` Returns the bean implementation class name for the interface name specified as the return type of current method or the method specified by parameter interface if any.
`String` | `classTagIntf()` Returns the current interface inside a forAllClassTagIntf block
`String` | `componentInterface(Properties attributes)` Returns the full qualified local or remote interface name for the bean, depending on the value of type parameter.
`String` | `extendsFrom(Properties attributes)` Returns the name of the class home interface extends.
`void` | `forAllClassTagIntf(String template, Properties attributes)` Evaluates the body for all interfaces which are compatible to the view-type which is set on the current class tag.
`void` | `forAllInterfaceViewTypes(String template, Properties attributes)` Evaluates the body block for each view-type of current method.
`protected String` | `fromInterfaceToBean(String value)` Loops over all classes and if value equals to local or remote or service-endpoint interface name of an EJBean full qualified name of that EJB is returned.
`static String` | `getBeanClassNameFromInterfaceNameFor(String return_type)` Gets the BeanClassNameFromInterfaceNameFor attribute of the InterfaceTagsHandler class
`static String` | `getComponentInterface(String type, xjavadoc.XClass clazz)` Return the fully qualified name of the component interface of type specified.
`protected String` | `getDependentClassFor(xjavadoc.XClass clazz, String type)` Gets the DependentClassFor attribute of the InterfaceTagsHandler object
`protected String` | `getInterfaceMethodName(String name)` Returns the interface method name depending on its type.
`protected static String` | `getLocalClassPattern()` Gets the LocalClassPattern attribute of the InterfaceTagsHandler class
`protected static String` | `getRemoteClassPattern()` Gets the RemoteClassPattern attribute of the InterfaceTagsHandler class
`protected static String` | `getServiceEndpointClassPattern()` Gets the LocalClassPattern attribute of the InterfaceTagsHandler class
`void` | `ifCurrentMethodViewTypeEquals(String template, Properties attributes)` Evaluates the body if the view-type of the current method is compatible with the value of the current method tag's parameter with the passed name.
`void` | `ifHasClassTagIntf(String template)` Evaluates the body if a current interface is available inside a forAllClassTagIntf block
`void` | `ifIsInterfaceMethod(String template)` Evaluates the body block if ejb:interface-method defined for current method.
`void` | `ifIsInterfaceMethod(String template, Properties attributes)` Evaluate the body block if the current method is an EJB local or remote interface method.
`void` | `ifIsNotInterfaceMethod(String template, Properties attributes)` Evaluate the body block if the current method is not an EJB local or remote interface method.
`String` | `interfaceMethodName()` Returns interface method name for the current interface method.
`static boolean` | `isComponentInterfaceMethod(xjavadoc.XMethod method)` Returns true if method is a component interface method, false otherwise.
`protected boolean` | `isInterfaceMethod(String intFace)` Implements functionality required by `ifIsInterfaceMethod(java.lang.String, java.util.Properties)` and `ifIsNotInterfaceMethod(java.lang.String, java.util.Properties)`.
`static boolean` | `isInterfaceMethod(xjavadoc.XMethod method)` Returns true if method is an interface method, false otherwise.
`static boolean` | `isLocalMethod(xjavadoc.XMethod method)` Returns true if method is a local interface method by looking at view-type parameter.
`static boolean` | `isRemoteMethod(xjavadoc.XMethod method)` Returns true if method is a remote interface method by looking at view-type parameter.
`static boolean` | `isServiceEndpointMethod(xjavadoc.XMethod method)` Returns true if method is a local interface method by looking at view-type parameter.
`String` | `methodIntf(Properties attributes)` Returns "Remote" is current method has ejb:remote-method defined, "Home" otherwise.

Methods inherited from class xdoclet.modules.ejb.EjbTagsHandler
`beanType, choosePackage, concreteFullClassName, ejbExternalRefName, ejbName, ejbRefName, ejbRefName, extendsFromFor, forAllBeans, getDependentClassTagName, getEjb, getEjbIdFor, getEjbNameFor, getEjbSpec, getShortEjbNameFor, hasTransaction, id, ifIsAConcreteEJBean, ifLocalEjb, ifNotLocalEjb, ifNotRemoteEjb, ifNotServiceEndpointEjb, ifRemoteEjb, ifServiceEndpointEjb, isAConcreteEJBean, isEjb, isLocalEjb, isOnlyLocalEjb, isOnlyRemoteEjb, isOnlyServiceEndpointEjb, isRemoteEjb, isServiceEndpointEjb, prefixWithEjbSlash, shortEjbName, shouldTraverseSuperclassForDependentClass, symbolicClassName`

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

### SERVICE_ENDPOINT_INTERFACE

    public static final String SERVICE_ENDPOINT_INTERFACE

See Also:
  Constant Field Values

### SERVICE_ENDPOINT_EXTENDS_PARAM

    public static final String SERVICE_ENDPOINT_EXTENDS_PARAM

See Also:
  Constant Field Values

Constructor Detail

### InterfaceTagsHandler

    public InterfaceTagsHandler()

Method Detail

### getComponentInterface

    public static String getComponentInterface(String type,
                                               xjavadoc.XClass clazz)
                                        throws XDocletException

  Return the fully qualified name of the component interface of type specified. Works based on the `ejb:interface` class level tag. Relevant parameters for the `ejb:interface` tag are:
  - remote-class: The fully qualified name of the remote class - overrides all set patterns
  - local-class: The fully qualified name of the local class - overrides all set patterns
  - service-endpoint-class: The fully qualified name of the service endpoint class - overrides all set patterns
  - remote-pattern: The pattern to be used to determine the unqualified name of the remote class
  - local-pattern: The pattern to be used to determine the unqualified name of the local class
  - service-endpoint-pattern: The pattern to be used to determine the unqualified name of the service-endpoint class
  - pattern: The pattern to be used in determining the unqualified remote and/or local and/or service-endpoint interface name - used where remote- or local- or service-endpoint-pattern are not specified.
  - remote-package: The package the remote interface is to be placed in
  - local-package: The package the local interface is to be placed in
  - service-endpoint-package: The package the service-endpoint interface is to be placed in
  - package: The package the remote and/or local and/or service-endpoint interface is to be placed in - used where remote- or local- or service-endpoint-package are not specified.

  Parameters:
    `type` - Can be remote or local. Defaults to remote.
    `clazz` - Description of Parameter
  Returns:
    The fully qualified name of the interface.
  Throws:
    `XDocletException`

### isInterfaceMethod

    public static boolean isInterfaceMethod(xjavadoc.XMethod method)

  Returns true if method is an interface method, false otherwise. Interface methods are remote/create/remove/finder/home methods.

  Parameters:
    `method` - Description of Parameter
  Returns:
    The InterfaceMethod value

### isComponentInterfaceMethod

    public static boolean isComponentInterfaceMethod(xjavadoc.XMethod method)

  Returns true if method is a component interface method, false otherwise. Component interface methods are marked with a ejb:interface-method tag.

  Parameters:
    `method` - Description of Parameter
  Returns:
    The RemoteMethod value

### getBeanClassNameFromInterfaceNameFor

    public static String getBeanClassNameFromInterfaceNameFor(String return_type)
                                                       throws XDocletException

  Gets the BeanClassNameFromInterfaceNameFor attribute of the InterfaceTagsHandler class

  Parameters:
    `return_type` - Describe what the parameter does
  Returns:
    The BeanClassNameFromInterfaceNameFor value
  Throws:
    `XDocletException`

### isRemoteMethod

    public static boolean isRemoteMethod(xjavadoc.XMethod method)
                                  throws XDocletException

  Returns true if method is a remote interface method by looking at view-type parameter.

  Parameters:
    `method` - Description of Parameter
  Returns:
    The isRemoteMethod value
  Throws:
    `XDocletException`

### isLocalMethod

    public static boolean isLocalMethod(xjavadoc.XMethod method)
                                 throws XDocletException

  Returns true if method is a local interface method by looking at view-type parameter.

  Parameters:
    `method` - Description of Parameter
  Returns:
    The isRemoteMethod value
  Throws:
    `XDocletException`

### isServiceEndpointMethod

    public static boolean isServiceEndpointMethod(xjavadoc.XMethod method)
                                           throws XDocletException

  Returns true if method is a local interface method by looking at view-type parameter.

  Parameters:
    `method` - Description of Parameter
  Returns:
    The isRemoteMethod value
  Throws:
    `XDocletException`

### getRemoteClassPattern

    protected static String getRemoteClassPattern()

  Gets the RemoteClassPattern attribute of the InterfaceTagsHandler class

  Returns:
    The RemoteClassPattern value

### getLocalClassPattern

    protected static String getLocalClassPattern()

  Gets the LocalClassPattern attribute of the InterfaceTagsHandler class

  Returns:
    The LocalClassPattern value

### getServiceEndpointClassPattern

    protected static String getServiceEndpointClassPattern()

  Gets the LocalClassPattern attribute of the InterfaceTagsHandler class

  Returns:
    The LocalClassPattern value

### componentInterface

    public String componentInterface(Properties attributes)
                              throws XDocletException

  Returns the full qualified local or remote interface name for the bean, depending on the value of type parameter.

  Parameters:
    `attributes` - The attributes of the template tag
  Returns:
    Description of the Returned Value
  Throws:
    `XDocletException`
  doc.tag
    type="content"
  doc.param
    name="type" optional="false" values="remote,local" description="Specifies the type of component interface."

### ifIsNotInterfaceMethod

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

  Evaluate the body block if the current method is not an EJB local or remote interface method.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"
  doc.param
    name="interface" optional="false" description="The type of interface to check for the methods validity in. Can be either \"local\" or \"remote\"."

### ifIsInterfaceMethod

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

  Evaluate the body block if the current method is an EJB local or remote interface method.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"
  doc.param
    name="interface" optional="false" description="The type of interface to check for the methods validity in. Can be either \"local\" or \"remote\".", name="superclasses" optional="true" description="Traverse superclasses too. With false value used in remote/local. Default is True."

### forAllInterfaceViewTypes

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

  Evaluates the body block for each view-type of current method. Sets currentMethodViewType internal variable of tag handler class, used by nested methodIntf.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException`
  doc.tag
    type="block"

### ifIsInterfaceMethod

    public void ifIsInterfaceMethod(String template)
                             throws XDocletException

  Evaluates the body block if ejb:interface-method defined for current method.

  Parameters:
    `template` - The body of the block tag
  Throws:
    `XDocletException`
  See Also:
    `isInterfaceMethod(xjavadoc.XMethod)`
  doc.tag
    type="block"

### methodIntf

    public String methodIntf(Properties attributes)
                      throws XDocletException

  Returns "Remote" is current method has ejb:remote-method defined, "Home" otherwise.

  Parameters:
    `attributes` - The attributes of the template tag
  Returns:
    "Remote" or "Home".
  Throws:
    `XDocletException`
  See Also:
    `isRemoteMethod(xjavadoc.XMethod)`
  doc.tag
    type="content"

### interfaceMethodName

    public String interfaceMethodName()
                               throws XDocletException

  Returns interface method name for the current interface method.

  Returns:
    "Remote" or "Home".
  Throws:
    `XDocletException`
  See Also:
    `getInterfaceMethodName(java.lang.String)`
  doc.tag
    type="content"

### beanClassNameFromInterfaceName

    public String beanClassNameFromInterfaceName(Properties attributes)
                                          throws XDocletException

  Returns the bean implementation class name for the interface name specified as the return type of current method or the method specified by parameter interface if any.

  Parameters:
    `attributes` -
  Returns:
    Bean class name
  Throws:
    `XDocletException`
  doc.tag
    type="content"

### extendsFrom

    public String extendsFrom(Properties attributes)
                       throws XDocletException

  Returns the name of the class home interface extends.

  Parameters:
    `attributes` -
  Returns:
    The name of generated PK class.
  Throws:
    `XDocletException`
  doc.tag
    type="content"

### ifCurrentMethodViewTypeEquals

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

  Evaluates the body if the view-type of the current method is compatible with the value of the current method tag's parameter with the passed name.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException` - Description of Exception
  doc.tag
    type="block"
  doc.param
    name="paramName" optional="false" description=+The param name for the view-type on the current method tag"

### forAllClassTagIntf

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

  Evaluates the body for all interfaces which are compatible to the view-type which is set on the current class tag. The body of this tag is also evaluated once, if no view-type attribute is set on the current class tag.

  Parameters:
    `template` - The body of the block tag
    `attributes` - The attributes of the template tag
  Throws:
    `XDocletException` - Description of Exception
  doc.tag
    type="block"
  doc.param
    name="paramName" optional="false" description="The param name for the view-type on the current class tag."

### classTagIntf

    public String classTagIntf()
                        throws XDocletException

  Returns the current interface inside a forAllClassTagIntf block

  Returns:
  Throws:
    `XDocletException` - Description of Exception
  See Also:
    `forAllClassTagIntf(String, Properties)`
  doc.tag
    type="content"

### ifHasClassTagIntf

    public void ifHasClassTagIntf(String template)
                           throws XDocletException

  Evaluates the body if a current interface is available inside a forAllClassTagIntf block

  Parameters:
    `template` - The body of the block tag
  Throws:
    `XDocletException` - Description of Exception
  See Also:
    `forAllClassTagIntf(String, Properties)`
  doc.tag
    type="block"

### isInterfaceMethod

    protected boolean isInterfaceMethod(String intFace)
                                 throws XDocletException

  Implements functionality required by `ifIsInterfaceMethod(java.lang.String, java.util.Properties)` and `ifIsNotInterfaceMethod(java.lang.String, java.util.Properties)`. To determine what interfaces the method should appear in, check the first for a `view-type` parameter to the method level `ejb:interface-method` tag. If that is absent use the `view-type` tag from `ejb:bean` .

  Parameters:
    `intFace` - The type of interface to test the method for.
  Returns:
    true if the method should occur in the specified interface.
  Throws:
    `XDocletException`

### getInterfaceMethodName

    protected String getInterfaceMethodName(String name)
                                     throws XDocletException

  Returns the interface method name depending on its type.

  Parameters:
    `name` - Description of Parameter
  Returns:
    "create" if ejbCreate, "remote" if ejbRemove, find if ejbFind, home if ejbHome.
  Throws:
    `XDocletException`

### getDependentClassFor

    protected String getDependentClassFor(xjavadoc.XClass clazz,
                                          String type)
                                   throws XDocletException

  Gets the DependentClassFor attribute of the InterfaceTagsHandler object

  Overrides:
    `getDependentClassFor` in class `EjbTagsHandler`
  Parameters:
    `clazz` - Describe what the parameter does
    `type` - Describe what the parameter does
  Returns:
    The DependentClassFor value
  Throws:
    `XDocletException`

### fromInterfaceToBean

    protected String fromInterfaceToBean(String value)
                                  throws XDocletException

  Loops over all classes and if value equals to local or remote or service-endpoint interface name of an EJBean full qualified name of that EJB is returned.

  Parameters:
    `value` - 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