compName
public String compName(Properties attributes)
throws xdoclet.XDocletException
attributes
- The attributes of the template tag
- Description of the Returned Value
xdoclet.XDocletException
-
- name = "prefixWithEjbSlash"
optional = "true"
values = "true,false"
description = "Specifies
whether to prefix it with ejb/ or not. False by default."
- name = "type"
optional = "false"
values = "remote,local"
description = "Specifies if we want
the jndi name value for local or remote lookup."
currentExceptions
public String currentExceptions()
throws xdoclet.XDocletException
Return exceptions for current home method.
xdoclet.XDocletException
-
currentMethod
public String currentMethod()
throws xdoclet.XDocletException
Return name of current home method.
xdoclet.XDocletException
-
currentPermission
public String currentPermission()
throws xdoclet.XDocletException
Return permission for current home method.
xdoclet.XDocletException
-
currentSignature
public String currentSignature()
throws xdoclet.XDocletException
Return signature of current home method.
- Describe the return value
xdoclet.XDocletException
-
currentType
public String currentType()
throws xdoclet.XDocletException
Return type of current home method.
xdoclet.XDocletException
-
ejbPostCreateSignature
public String ejbPostCreateSignature(Properties attributes)
Returns the appropriate ejbPostCreate method name for the current ejbCreate method.
attributes
- The attributes of the template tag
- Equivalent ejbPostCreate method name
extendsFrom
public String extendsFrom(Properties attributes)
throws xdoclet.XDocletException
Returns the name of the class home interface extends.
- The name of generated PK class.
xdoclet.XDocletException
-
findFirstCreateMethodFor
public static XMethod findFirstCreateMethodFor(XClass clazz)
Describe what the method does
clazz
- Describe what the parameter does
- Describe the return value
finderClass
public String finderClass()
throws xdoclet.XDocletException
generates name for finder utility class backing current finder
xdoclet.XDocletException
-
finderSignatureFunger
public static String finderSignatureFunger(String s,
XClass clazz,
String type)
throws xdoclet.XDocletException
Describe what the method does
s
- Describe what the parameter doesclazz
- type
-
- Describe the return value
xdoclet.XDocletException
-
forAllHomeMethods
public void forAllHomeMethods(String template,
Properties attributes)
throws xdoclet.XDocletException
Iterates over all home methods of specified type (finder or create method) defined in a class and super classes.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
- name = "tagName"
optional = "false"
description = "The tag name for the method type to
iterate over."
values = "ejb:finder,ejb:create-method"
- name = "superclasses"
values = "true,false"
description = "If true then traverse
superclasses also, otherwise look up the tag in current concrete class only."
- name = "tagKey"
description = "A tag property that will be used as a unique key. This is
used to avoid duplicate code due to similar tags in superclasses."
fullPackageChange
public static String fullPackageChange(String s)
Convert various collection types within a string to their fully qualified forms.
s
- String to be converted.
- String with fully qualified collection types.
getCompNameFor
public static String getCompNameFor(XClass clazz,
String type)
Returns a suitable component name (which could be used, for example, in JNDI lookups) for a class.
clazz
- the classtype
- interface view type, \"local\" or \"remote\"
getDependentClassFor
protected String getDependentClassFor(XClass clazz,
String type)
throws xdoclet.XDocletException
Gets the DependentClassFor attribute of the HomeTagsHandler object
clazz
- Describe what the parameter doestype
- Describe what the parameter does
- The DependentClassFor value
xdoclet.XDocletException
-
getHomeClassPattern
protected static String getHomeClassPattern()
Gets the HomeClassPattern attribute of the HomeTagsHandler class.
- The HomeClassPattern value
getHomeDefinition
public static String getHomeDefinition(XClass clazz,
XMethod method,
String tagType,
String type)
throws xdoclet.XDocletException
Gets the HomeDefinition attribute of the HomeTagsHandler class
clazz
- Describe what the parameter doesmethod
- Describe what the parameter doestagType
- Describe what the parameter doestype
- Describe what the parameter does
xdoclet.XDocletException
-
getHomeInterface
public static String getHomeInterface(String type,
XClass clazz)
throws xdoclet.XDocletException
Similar to
InterfaceTagsHandler.getComponentInterface(String,XClass)
. Relies on the ejb:home
tag, which has the following relevant properties:
- 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
- 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
- pattern: The pattern to be used in determining the unqualified remote and/or local home interface name -
used where remote- or local- pattern are not specified.
- remote-package: The package the remote home interface is to be placed in
- local-package: The package the local home interface is to be placed in
- package: The package the remote and/or local home interface is to be placed in - used where remote- or
local- package are not specified.
type
- The type of home interface - can be remote or local.clazz
- Description of Parameter
xdoclet.XDocletException
-
getJndiNameOfTypeFor
public static String getJndiNameOfTypeFor(String type,
XClass clazz)
getLocalHomeClassPattern
protected static String getLocalHomeClassPattern()
Gets the LocalHomeClassPattern attribute of the HomeTagsHandler class.
- The LocalHomeClassPattern value
homeInterface
public String homeInterface(Properties attributes)
throws xdoclet.XDocletException
Returns the full qualified local or remote home interface name for the bean, depending on the value of type
parameter.
attributes
- The attributes of the template tag
- Description of the Returned Value
xdoclet.XDocletException
-
- name = "type"
optional = "false"
values = "remote,local"
description = "Specifies the type
of component home interface."
ifDoesntHavePostCreateMethod
public void ifDoesntHavePostCreateMethod(String template,
Properties attributes)
throws xdoclet.XDocletException
Evaluates the body block if current create method's ejbPostCreate method does not exist.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
ifIsCollectionType
public void ifIsCollectionType(String template,
Properties param)
throws xdoclet.XDocletException
Whether current finder return collection.
xdoclet.XDocletException
-
ifIsCreateMethod
public void ifIsCreateMethod(String template,
Properties attributes)
throws xdoclet.XDocletException
Evaluates the body block if current method is a create method. Create methods should have ejb:create-method
defined.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
isCreateMethod(xjavadoc.XMethod)
- name = "superclasses"
optional = "true"
description = "Traverse superclasses too. With
false value used in remote/local home interface templates. Default is False."
ifIsEnumerationType
public void ifIsEnumerationType(String template,
Properties param)
throws xdoclet.XDocletException
Whether current finder return enumeration.
xdoclet.XDocletException
-
ifIsFinderMethod
public void ifIsFinderMethod(String template,
Properties attributes)
throws xdoclet.XDocletException
Evaluates the body block if current method is a ejbFind method.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
- Description of Exception
isFinderMethod(xjavadoc.XMethod)
- name = "superclasses"
optional = "true"
description = "Traverse superclasses too. With
false value used in remote/local home interface templates. Default is False."
ifIsHomeMethod
public void ifIsHomeMethod(String template,
Properties attributes)
throws xdoclet.XDocletException
Evaluates the body block if current method is a home method. Home methods should have ejb:home-method defined.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
isHomeMethod(xjavadoc.XMethod)
- name = "superclasses"
optional = "true"
description = "Traverse superclasses too. With
false value used in remote/local home interface templates. Default is False."
ifIsInterfaceType
public void ifIsInterfaceType(String template,
Properties param)
throws xdoclet.XDocletException
Whether current finder return interface.
xdoclet.XDocletException
-
ifNotRemoveMethod
public void ifNotRemoveMethod(String template)
throws xdoclet.XDocletException
Evaluates the body block if current method is not an ejbRemove method.
template
- The body of the block tag
xdoclet.XDocletException
-
isRemoveMethod(xjavadoc.XMethod)
isCreateMethod
public static boolean isCreateMethod(XMethod method)
Returns true if method is a create method marked with a \@ejb.create-method tag, false otherwise.
method
- The method to test
- true if ejb.create-method tag found
isFinderMethod
public static boolean isFinderMethod(XMethod method)
Returns true if method is an ejbFind method, false otherwise.
method
- The method to test
- true if name starts with ejbFind
isHomeMethod
public static boolean isHomeMethod(XMethod method)
Returns true if method is a home method marked with a \@ejb.home-method tag, false otherwise.
method
- The method to test
- true if ejb.home-method tag found
isRemoveMethod
public static boolean isRemoveMethod(XMethod method)
Returns true if method is an ejbRemove method, false otherwise.
method
- The method to test
jndiName
public String jndiName(Properties attributes)
throws xdoclet.XDocletException
- Description of the Returned Value
xdoclet.XDocletException
-
- name = "type"
optional = "false"
values = "remote,local"
description = "Specifies if we want
the jndi name value for local or remote lookup."
matchesViewType
protected boolean matchesViewType(Collection tags,
String type)
Check every XTag in a collection and return true if they all have a view-type compatible with the specified type.
A view-type is compatible if it is the same as type or \"both\". A missing or empty view-type is assumed to be
compatible.
tags
- Collection of XTag to be checked.type
- The desired view-type
- true if all tags' view-type parameters are compatible
matchesViewType
protected boolean matchesViewType(XTag tag,
String type)
Returns true if an XTag has a view-type compatible with the specified type. A view-type is compatible if it is
the same as type or \"both\". A missing or empty view-type is assumed to be compatible.
tag
- The XTag to checktype
- The desired view-type
- true if the tag's view-type is compatible
parameterList
public String parameterList()
throws xdoclet.XDocletException
Return parameter list (names only) for current home method.
- comma-separated parameter list
xdoclet.XDocletException
-
parameterListDefinition
public String parameterListDefinition()
throws xdoclet.XDocletException
Return parameter list definition (types and names) for current home method.
- comma-separated parameter list
xdoclet.XDocletException
-
setCurrentExceptions
protected void setCurrentExceptions(String es)
Sets the CurrentExceptions attribute of the HomeTagsHandler object.
es
- The new CurrentExceptions value
setCurrentPermission
public void setCurrentPermission(String permission)
setCurrentSignature
protected void setCurrentSignature(String cs)
Sets the CurrentSignature attribute of the HomeTagsHandler object.
cs
- The new CurrentSignature value
shouldTraverseSuperclassForDependentClass
protected boolean shouldTraverseSuperclassForDependentClass(XClass clazz,
String tag_name)
throws xdoclet.XDocletException
Describe what the method does
clazz
- Describe what the parameter doestag_name
- Describe what the parameter does
- Describe the return value
xdoclet.XDocletException
-
toCreateMethod
public static String toCreateMethod(String methodName)
Converts ejbCreateblabla to createblabla , the one that should appear in home interface.
methodName
- Method name to be converted.
- Equivalent home interface method name.
toFinderMethod
public static String toFinderMethod(String methodName)
Converts ejbFindblabla to findblabla , the one that should appear in home interface.
methodName
- Method name to be converted.
- Equivalent home interface method name.
toHomeMethod
public static String toHomeMethod(String methodName)
Converts ejbHomeblabla to homeblabla , the one that should appear in home interface.
methodName
- Method name to be converted.
- Equivalent home interface method name.