|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxdoclet.template.TemplateTagHandler
xdoclet.XDocletTagSupport
xdoclet.modules.ejb.EjbTagsHandler
xdoclet.modules.ejb.home.HomeTagsHandler
public class HomeTagsHandler
Field Summary |
---|
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 | |
---|---|
HomeTagsHandler()
|
Method Summary | |
---|---|
java.lang.String |
compName(java.util.Properties attributes)
|
java.lang.String |
currentExceptions()
Return exceptions for current home method. |
java.lang.String |
currentMethod()
Return name of current home method. |
java.lang.String |
currentPermission()
Return permission for current home method. |
java.lang.String |
currentSignature()
Return signature of current home method. |
java.lang.String |
currentType()
Return type of current home method. |
java.lang.String |
ejbPostCreateSignature(java.util.Properties attributes)
Returns the appropriate ejbPostCreate method name for the current ejbCreate method. |
java.lang.String |
extendsFrom(java.util.Properties attributes)
Returns the name of the class home interface extends. |
java.lang.String |
finderClass()
generates name for finder utility class backing current finder |
static java.lang.String |
finderSignatureFunger(java.lang.String s,
xjavadoc.XClass clazz,
java.lang.String type)
Describe what the method does |
static xjavadoc.XMethod |
findFirstCreateMethodFor(xjavadoc.XClass clazz)
Describe what the method does |
void |
forAllHomeMethods(java.lang.String template,
java.util.Properties attributes)
Iterates over all home methods of specified type (finder or create method) defined in a class and super classes. |
static java.lang.String |
fullPackageChange(java.lang.String s)
Convert various collection types within a string to their fully qualified forms. |
static java.lang.String |
getCompNameFor(xjavadoc.XClass clazz,
java.lang.String type)
Returns a suitable component name (which could be used, for example, in JNDI lookups) for a class. |
protected java.lang.String |
getDependentClassFor(xjavadoc.XClass clazz,
java.lang.String type)
Gets the DependentClassFor attribute of the HomeTagsHandler object |
protected static java.lang.String |
getHomeClassPattern()
Gets the HomeClassPattern attribute of the HomeTagsHandler class. |
static java.lang.String |
getHomeDefinition(xjavadoc.XClass clazz,
xjavadoc.XMethod method,
java.lang.String tagType,
java.lang.String type)
Gets the HomeDefinition attribute of the HomeTagsHandler class |
static java.lang.String |
getHomeInterface(java.lang.String type,
xjavadoc.XClass clazz)
Similar to InterfaceTagsHandler.getComponentInterface(java.lang.String, xjavadoc.XClass) . |
static java.lang.String |
getJndiNameOfTypeFor(java.lang.String type,
xjavadoc.XClass clazz)
|
protected static java.lang.String |
getLocalHomeClassPattern()
Gets the LocalHomeClassPattern attribute of the HomeTagsHandler class. |
java.lang.String |
homeInterface(java.util.Properties attributes)
Returns the full qualified local or remote home interface name for the bean, depending on the value of type parameter. |
void |
ifDoesntHavePostCreateMethod(java.lang.String template,
java.util.Properties attributes)
Evaluates the body block if current create method's ejbPostCreate method does not exist. |
void |
ifIsCollectionType(java.lang.String template,
java.util.Properties param)
Whether current finder return collection. |
void |
ifIsCreateMethod(java.lang.String template,
java.util.Properties attributes)
Evaluates the body block if current method is a create method. |
void |
ifIsEnumerationType(java.lang.String template,
java.util.Properties param)
Whether current finder return enumeration. |
void |
ifIsFinderMethod(java.lang.String template,
java.util.Properties attributes)
Evaluates the body block if current method is a ejbFind method. |
void |
ifIsHomeMethod(java.lang.String template,
java.util.Properties attributes)
Evaluates the body block if current method is a home method. |
void |
ifIsInterfaceType(java.lang.String template,
java.util.Properties param)
Whether current finder return interface. |
void |
ifNotRemoveMethod(java.lang.String template)
Evaluates the body block if current method is not an ejbRemove method. |
static boolean |
isCreateMethod(xjavadoc.XMethod method)
Returns true if method is a create method marked with a \@ejb.create-method tag, false otherwise. |
static boolean |
isFinderMethod(xjavadoc.XMethod method)
Returns true if method is an ejbFind method, false otherwise. |
static boolean |
isHomeMethod(xjavadoc.XMethod method)
Returns true if method is a home method marked with a \@ejb.home-method tag, false otherwise. |
static boolean |
isRemoveMethod(xjavadoc.XMethod method)
Returns true if method is an ejbRemove method, false otherwise. |
java.lang.String |
jndiName(java.util.Properties attributes)
|
protected boolean |
matchesViewType(java.util.Collection tags,
java.lang.String type)
Check every XTag in a collection and return true if they all have a view-type compatible with the specified type. |
protected boolean |
matchesViewType(xjavadoc.XTag tag,
java.lang.String type)
Returns true if an XTag has a view-type compatible with the specified type. |
java.lang.String |
parameterList()
Return parameter list (names only) for current home method. |
java.lang.String |
parameterListDefinition()
Return parameter list definition (types and names) for current home method. |
protected void |
setCurrentExceptions(java.lang.String es)
Sets the CurrentExceptions attribute of the HomeTagsHandler object. |
void |
setCurrentPermission(java.lang.String permission)
|
protected void |
setCurrentSignature(java.lang.String cs)
Sets the CurrentSignature attribute of the HomeTagsHandler object. |
protected boolean |
shouldTraverseSuperclassForDependentClass(xjavadoc.XClass clazz,
java.lang.String tag_name)
Describe what the method does |
static java.lang.String |
toCreateMethod(java.lang.String methodName)
Converts ejbCreateblabla to createblabla , the one that should appear in home interface. |
static java.lang.String |
toFinderMethod(java.lang.String methodName)
Converts ejbFindblabla to findblabla , the one that should appear in home interface. |
static java.lang.String |
toHomeMethod(java.lang.String methodName)
Converts ejbHomeblabla to homeblabla , the one that should appear in home interface. |
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 |
---|
public HomeTagsHandler()
Method Detail |
---|
public static java.lang.String getHomeInterface(java.lang.String type, xjavadoc.XClass clazz) throws XDocletException
InterfaceTagsHandler.getComponentInterface(java.lang.String, xjavadoc.XClass)
. Relies on the ejb:home
tag, which has the following relevant properties:
type
- The type of home interface - can be remote or local.clazz
- Description of Parameter
XDocletException
public static boolean isRemoveMethod(xjavadoc.XMethod method)
method
- The method to test
public static boolean isCreateMethod(xjavadoc.XMethod method)
method
- The method to test
public static boolean isHomeMethod(xjavadoc.XMethod method)
method
- The method to test
public static java.lang.String getCompNameFor(xjavadoc.XClass clazz, java.lang.String type)
clazz
- the classtype
- interface view type, \"local\" or \"remote\"
public static boolean isFinderMethod(xjavadoc.XMethod method)
method
- The method to test
public static java.lang.String getHomeDefinition(xjavadoc.XClass clazz, xjavadoc.XMethod method, java.lang.String tagType, java.lang.String type) throws XDocletException
clazz
- Describe what the parameter doesmethod
- Describe what the parameter doestagType
- Describe what the parameter doestype
- Describe what the parameter does
XDocletException
public static java.lang.String getJndiNameOfTypeFor(java.lang.String type, xjavadoc.XClass clazz)
public static java.lang.String toHomeMethod(java.lang.String methodName)
methodName
- Method name to be converted.
public static java.lang.String toCreateMethod(java.lang.String methodName)
methodName
- Method name to be converted.
public static xjavadoc.XMethod findFirstCreateMethodFor(xjavadoc.XClass clazz)
clazz
- Describe what the parameter does
public static java.lang.String toFinderMethod(java.lang.String methodName)
methodName
- Method name to be converted.
public static java.lang.String fullPackageChange(java.lang.String s)
s
- String to be converted.
public static java.lang.String finderSignatureFunger(java.lang.String s, xjavadoc.XClass clazz, java.lang.String type) throws XDocletException
s
- Describe what the parameter doesclazz
- type
-
XDocletException
protected static java.lang.String getLocalHomeClassPattern()
protected static java.lang.String getHomeClassPattern()
public void setCurrentPermission(java.lang.String permission)
public java.lang.String homeInterface(java.util.Properties attributes) throws XDocletException
attributes
- The attributes of the template tag
XDocletException
public void ifIsCreateMethod(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
isCreateMethod(xjavadoc.XMethod)
public void ifDoesntHavePostCreateMethod(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
public java.lang.String ejbPostCreateSignature(java.util.Properties attributes)
attributes
- The attributes of the template tag
public void ifIsHomeMethod(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
isHomeMethod(xjavadoc.XMethod)
public void ifNotRemoveMethod(java.lang.String template) throws XDocletException
template
- The body of the block tag
XDocletException
isRemoveMethod(xjavadoc.XMethod)
public void ifIsFinderMethod(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
- Description of ExceptionisFinderMethod(xjavadoc.XMethod)
public java.lang.String compName(java.util.Properties attributes) throws XDocletException
attributes
- The attributes of the template tag
XDocletException
public java.lang.String jndiName(java.util.Properties attributes) throws XDocletException
attributes
-
XDocletException
public java.lang.String extendsFrom(java.util.Properties attributes) throws XDocletException
attributes
-
XDocletException
public void forAllHomeMethods(java.lang.String template, java.util.Properties attributes) throws XDocletException
template
- The body of the block tagattributes
- The attributes of the template tag
XDocletException
public java.lang.String currentSignature() throws XDocletException
XDocletException
public java.lang.String currentPermission() throws XDocletException
XDocletException
public java.lang.String currentType() throws XDocletException
XDocletException
public java.lang.String finderClass() throws XDocletException
XDocletException
public void ifIsCollectionType(java.lang.String template, java.util.Properties param) throws XDocletException
template
- param
-
XDocletException
public void ifIsEnumerationType(java.lang.String template, java.util.Properties param) throws XDocletException
template
- param
-
XDocletException
public void ifIsInterfaceType(java.lang.String template, java.util.Properties param) throws XDocletException
template
- param
-
XDocletException
public java.lang.String currentMethod() throws XDocletException
XDocletException
public java.lang.String parameterListDefinition() throws XDocletException
XDocletException
public java.lang.String parameterList() throws XDocletException
XDocletException
public java.lang.String currentExceptions() throws XDocletException
XDocletException
protected java.lang.String getDependentClassFor(xjavadoc.XClass clazz, java.lang.String type) throws XDocletException
getDependentClassFor
in class EjbTagsHandler
clazz
- Describe what the parameter doestype
- Describe what the parameter does
XDocletException
protected void setCurrentSignature(java.lang.String cs)
cs
- The new CurrentSignature valueprotected void setCurrentExceptions(java.lang.String es)
es
- The new CurrentExceptions valueprotected boolean shouldTraverseSuperclassForDependentClass(xjavadoc.XClass clazz, java.lang.String tag_name) throws XDocletException
shouldTraverseSuperclassForDependentClass
in class EjbTagsHandler
clazz
- Describe what the parameter doestag_name
- Describe what the parameter does
XDocletException
protected boolean matchesViewType(xjavadoc.XTag tag, java.lang.String type)
tag
- The XTag to checktype
- The desired view-type
protected boolean matchesViewType(java.util.Collection tags, java.lang.String type)
tags
- Collection of XTag to be checked.type
- The desired view-type
|
http://xdoclet.sourceforge.net/ | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |