beanType
public String beanType()
throws xdoclet.XDocletException
Returns Bean type : "Entity", "Session" or "Message Driven".
- "Entity", "Session" or "Message Driven".
xdoclet.XDocletException
-
xdoclet.modules.ejb.entity.EntityTagsHandler.isEntity(xjavadoc.XClass)
, xdoclet.modules.ejb.session.SessionTagsHandler.isSession(xjavadoc.XClass)
, xdoclet.modules.ejb.mdb.MdbTagsHandler.isMessageDriven(xjavadoc.XClass)
choosePackage
public static String choosePackage(String packageName,
String packagePattern,
String subtask)
Returns modified package name for a package name. If package name ends with one of the toReplace Strings, then
it's substituted by the replaceWith String. If packagePattern not null then it's roughly used.
packageName
- The name of the package name the new package name will be derived frompackagePattern
- The package pattern to use. Can be nullsubtask
-
- Description of the Returned Value
- this method is really an utility method that should be deprecated here and moved to
PackageTagsHandler or even somewhere else
concreteFullClassName
public String concreteFullClassName()
throws xdoclet.XDocletException
Returns the full-qualified name of the current class's concrete class. This is the class that is generated and is
derived from current class.
- The full-qualified name of the current class's concrete class
xdoclet.XDocletException
-
ejbExternalRefName
public String ejbExternalRefName()
throws xdoclet.XDocletException
Returns the name of EJB ref.
- The name of current EJB bean.
xdoclet.XDocletException
-
ejbName
public String ejbName(Properties attributes)
throws xdoclet.XDocletException
Returns the name of current EJB bean.
attributes
- The attributes of the template tag
- The name of current EJB bean.
xdoclet.XDocletException
-
getEjbNameFor(xjavadoc.XClass)
- name = "prefixWithEjbSlash"
optional = "true"
values = "true,false"
description = "Specifies
whether to prefix it with ejb/ or not. False by default."
ejbRefName
public static String ejbRefName()
throws xdoclet.XDocletException
Returns the name of EJB ref.
- The name of current EJB bean.
xdoclet.XDocletException
-
ejbRefName
public static String ejbRefName(XTag tag,
XClass clazz)
throws xdoclet.XDocletException
Returns the name of EJB ref.
- The name of current EJB bean.
xdoclet.XDocletException
-
extendsFromFor
protected String extendsFromFor(XClass clazz,
String tagName,
String type,
String extendsParamName,
String defaultBaseClassName)
throws xdoclet.XDocletException
Returns the name of the class pk/etc class extends.
clazz
- the classtagName
- name of the tag (ejb:bean for example, used for getting generate parameter)type
- type value used for view type of remote/localextendsParamName
- extends parameter name (is "extends" for ejb:bean but is "local-extends" for local)defaultBaseClassName
- default base class name, returned when not deriving from another base class
- correct value for the extends statement of a generated class
xdoclet.XDocletException
-
forAllBeans
public void forAllBeans(String template)
throws xdoclet.XDocletException
Evaluates the body block for each EJBean derived from one of the three EJB types: EntityBean, SessionBean or
MessageDrivenBean.
template
- The body of the block tag
xdoclet.XDocletException
-
xdoclet.modules.ejb.entity.EntityTagsHandler.isEntity(xjavadoc.XClass)
, xdoclet.modules.ejb.session.SessionTagsHandler.isSession(xjavadoc.XClass)
, xdoclet.modules.ejb.mdb.MdbTagsHandler.isMessageDriven(xjavadoc.XClass)
getDependentClassFor
protected String getDependentClassFor(XClass clazz,
String type)
throws xdoclet.XDocletException
sub-classes which deal with patternized class names return a reasonable value
clazz
- the classtype
- type value used for view-type of remote/local
- dependent class name for the class and type
xdoclet.XDocletException
-
getDependentClassTagName
protected String getDependentClassTagName()
Gets the DependentClassTagName attribute of the EjbTagsHandler object
- The DependentClassTagName value
getEjb
public static XClass getEjb(String name)
throws xdoclet.XDocletException
Returns the class with the specified ejb name
xdoclet.XDocletException
-
getEjbIdFor
public static String getEjbIdFor(XClass clazz)
clazz
- Description of Parameter
getEjbNameFor
public static String getEjbNameFor(XClass clazz)
Returns the EJB name of the clazz by seaching for ejb:bean's name parameter. If that is not found, it uses the
class' name minus any suffix from the list in the 'ejbClassNameSuffix' config parameter ("Bean,EJB,Ejb" by
default).
clazz
- The EJB bean class for which we want the EJB name
ejbName(java.util.Properties)
getEjbSpec
public static String getEjbSpec()
Returns the EJB specification version used. The generated files will be compatible with the version specified.
getShortEjbNameFor
public static String getShortEjbNameFor(XClass clazz)
Returns short version of the EJB name of the clazz.
clazz
- the class we want its short EJB name
hasTransaction
protected boolean hasTransaction(XDoc doc)
throws xdoclet.XDocletException
Returns true if class/method denoted by doc has ejb:transaction tag, false otherwise.
doc
- Description of Parameter
- Description of the Returned Value
xdoclet.XDocletException
-
id
public String id()
throws xdoclet.XDocletException
Returns unique id for current ejb.
- Description of the Returned Value
xdoclet.XDocletException
-
ifIsAConcreteEJBean
public void ifIsAConcreteEJBean(String template,
Properties attributes)
throws xdoclet.XDocletException
Evaluates the body block if current bean is a concrete bean meaning the generate parameter of ejb:bean is either
not specified or equals to "true", otherwise the bean is just an abstract base class bean not meant to be used as
a EJBean but serve as the base for other EJBeans.
template
- The body of the block tagattributes
- The attributes of the template tag
xdoclet.XDocletException
-
ifLocalEjb
public void ifLocalEjb(String template)
throws xdoclet.XDocletException
template
- Description of Parameter
xdoclet.XDocletException
-
ifNotLocalEjb
public void ifNotLocalEjb(String template)
throws xdoclet.XDocletException
xdoclet.XDocletException
-
ifNotRemoteEjb
public void ifNotRemoteEjb(String template)
throws xdoclet.XDocletException
xdoclet.XDocletException
-
ifNotServiceEndpointEjb
public void ifNotServiceEndpointEjb(String template)
throws xdoclet.XDocletException
xdoclet.XDocletException
-
ifRemoteEjb
public void ifRemoteEjb(String template)
throws xdoclet.XDocletException
template
- Description of Parameter
xdoclet.XDocletException
-
ifServiceEndpointEjb
public void ifServiceEndpointEjb(String template)
throws xdoclet.XDocletException
template
- Description of Parameter
xdoclet.XDocletException
-
isAConcreteEJBean
public static boolean isAConcreteEJBean(XClass clazz)
throws xdoclet.XDocletException
Gets the AConcreteEJBean attribute of the EjbTagsHandler class
clazz
- Describe what the parameter does
- The AConcreteEJBean value
xdoclet.XDocletException
-
isEjb
public static boolean isEjb(XClass clazz)
throws xdoclet.XDocletException
Returns true of clazz is an EJB (derived from an EJB type), false otherwise.
clazz
- Description of Parameter
xdoclet.XDocletException
-
isLocalEjb
public static boolean isLocalEjb(XClass clazz)
throws xdoclet.XDocletException
isOnlyLocalEjb
public static boolean isOnlyLocalEjb(XClass clazz)
throws xdoclet.XDocletException
Returns true if clazz is only a local EJB by looking at ejb:bean's view-type parameter.
clazz
- Description of Parameter
xdoclet.XDocletException
-
isOnlyRemoteEjb
public static boolean isOnlyRemoteEjb(XClass clazz)
throws xdoclet.XDocletException
Returns true if clazz is only a remote EJB by looking at ejb:bean's view-type parameter.
clazz
- Description of Parameter
xdoclet.XDocletException
-
isOnlyServiceEndpointEjb
public static boolean isOnlyServiceEndpointEjb(XClass clazz)
throws xdoclet.XDocletException
Returns true if clazz is only a service endpoint EJB by looking at ejb:bean's view-type parameter.
clazz
- Description of Parameter
xdoclet.XDocletException
-
isRemoteEjb
public static boolean isRemoteEjb(XClass clazz)
throws xdoclet.XDocletException
isServiceEndpointEjb
public static boolean isServiceEndpointEjb(XClass clazz)
throws xdoclet.XDocletException
prefixWithEjbSlash
protected static String prefixWithEjbSlash(String ejbName)
Replace "." by "/" and add "ejb/" to the parameter.
ejbName
- The string to parse
shortEjbName
public String shortEjbName()
throws xdoclet.XDocletException
Returns short version of ejbName(). Example: "foo.bar.MyBean" ->"MyBean", "foo/bar/MyBean" ->"MyBean"
- Description of the Returned Value
xdoclet.XDocletException
-
getShortEjbNameFor(xjavadoc.XClass)
shouldTraverseSuperclassForDependentClass
protected boolean shouldTraverseSuperclassForDependentClass(XClass clazz,
String tagName)
throws xdoclet.XDocletException
Describe what the method does
clazz
- Describe what the parameter doestagName
- Describe what the parameter does
- Describe the return value
xdoclet.XDocletException
-
symbolicClassName
public String symbolicClassName()
throws xdoclet.XDocletException
Returns the symbolic name of the current class. For an EJBean it's the value of ejb:bean's name parameter.
- The symbolic name of the current class
xdoclet.XDocletException
-