| xdoclet.modules.ejb.EjbTagsHandler
All known Subclasses: xdoclet.modules.ejb.home.HomeTagsHandler, xdoclet.modules.ejb.intf.InterfaceTagsHandler,
EjbTagsHandler | public class EjbTagsHandler extends XDocletTagSupport (Code) | | author: Ara Abrahamian (ara_e@email.com) author: Adrian Price version: $Revision: 1.1 $ |
Method Summary | |
public String | beanType() Returns Bean type : "Entity", "Session" or "Message Driven". | public static String | choosePackage(String packageName, String packagePattern, String subtask) Returns modified package name for a package name. | public String | concreteFullClassName() Returns the full-qualified name of the current class's concrete class. | public String | ejbExternalRefName() Returns the name of EJB ref. | public String | ejbName(Properties attributes) Returns the name of current EJB bean. | public static String | ejbRefName() Returns the name of EJB ref. | protected String | extendsFromFor(XClass clazz, String tagName, String type, String extendsParamName, String defaultBaseClassName) Returns the name of the class pk/etc class extends. | public void | forAllBeans(String template) Evaluates the body block for each EJBean derived from one of the three EJB types: EntityBean, SessionBean or
MessageDrivenBean. | protected String | getDependentClassFor(XClass clazz, String type) | protected String | getDependentClassTagName() | public static XClass | getEjb(String name) | public static String | getEjbIdFor(XClass clazz) | public static String | getEjbNameFor(XClass clazz) Returns the EJB name of the clazz by seaching for ejb:bean's name parameter. | public static String | getEjbSpec() Returns the EJB specification version used. | protected String | getInterfaceMethodName(String name) Returns the interface method name depending on its type. | public static String | getShortEjbNameFor(XClass clazz) Returns short version of the EJB name of the clazz. | protected boolean | hasTransaction(XDoc doc) Returns true if class/method denoted by doc has ejb:transaction tag, false otherwise. | public String | id() Returns unique id for current ejb. | public void | ifIsAConcreteEJBean(String template, Properties attributes) 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. | public void | ifLocalEjb(String template) | public void | ifNotLocalEjb(String template) | public void | ifNotRemoteEjb(String template) | public void | ifRemoteEjb(String template) | public static boolean | isAConcreteEJBean(XClass clazz) | protected boolean | isEjb(XClass clazz) Returns true of clazz is an EJB (derived from an EJB type), false otherwise. | protected boolean | isInheritedIntfMethod(XClass clazz, XMethod method, String tagName, String type, String extendsParamName, String defaultBaseClassName) | protected boolean | isInheritedIntfMethod(XClass clazz, String methodNameWithSignature, String tagName, String type, String extendsParamName, String defaultBaseClassName) Checks whether the specified interface method is inherited from a super-interface.
Parameters: clazz - The class being processed. Parameters: methodNameWithSignature - The normalized method name with parameters (i.e., comma-separated, no spaces,return type or parameter names). Parameters: tagName - The tag name which indicates whether to check the home interface (ejb:home) or acomponent interface (ejb:interface). Parameters: type - The interface type, "local" or "remote". Parameters: extendsParamName - The name of the attribute that indicates the super-interface extended by the homeor component interface in question. Parameters: defaultBaseClassName - The name of the default super-interface. | protected boolean | isIntfMethod(String tagName, String type) | public static boolean | isLocalEjb(XClass clazz) | public static boolean | isOnlyLocalEjb(XClass clazz) Returns true if clazz is only a local EJB by looking at ejb:bean's view-type parameter. | public static boolean | isOnlyRemoteEjb(XClass clazz) Returns true if clazz is only a remote EJB by looking at ejb:bean's view-type parameter. | public static boolean | isRemoteEjb(XClass clazz) | protected String | normalizeSignature(String signature) Strips any return type and parameter names from a method signature.
Parameters: signature - Method signature to normalize. | protected static String | prefixWithEjbSlash(String ejbName) Replace "." by "/" and add "ejb/" to the parameter. | public String | shortEjbName() Returns short version of ejbName(). | protected boolean | shouldTraverseSuperclassForDependentClass(XClass clazz, String tagName) | public String | symbolicClassName() Returns the symbolic name of the current class. |
LOCAL_SUFFIX | final protected static String LOCAL_SUFFIX(Code) | | |
beanType | public String beanType() throws XDocletException(Code) | | Returns Bean type : "Entity", "Session" or "Message Driven".
"Entity", "Session" or "Message Driven". exception: XDocletException - See Also: xdoclet.modules.ejb.entity.EntityTagsHandler.isEntity(xjavadoc.XClass) See Also: xdoclet.modules.ejb.session.SessionTagsHandler.isSession(xjavadoc.XClass) See Also: xdoclet.modules.ejb.mdb.MdbTagsHandler.isMessageDriven(xjavadoc.XClass) |
choosePackage | public static String choosePackage(String packageName, String packagePattern, String subtask)(Code) | | 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.
Parameters: packageName - The name of the package name the new package name will be derived from Parameters: packagePattern - The package pattern to use. Can be null Parameters: subtask - Description of the Returned Value |
concreteFullClassName | public String concreteFullClassName() throws XDocletException(Code) | | 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 exception: XDocletException - See Also: xdoclet.modules.ejb.session.SessionTagsHandler.sessionClass See Also: xdoclet.modules.ejb.entity.BmpTagsHandler.entityBmpClass See Also: xdoclet.modules.ejb.entity.CmpTagsHandler.entityCmpClass See Also: xdoclet.modules.ejb.mdb.MdbTagsHandler.messageDrivenClass |
ejbExternalRefName | public String ejbExternalRefName() throws XDocletException(Code) | | Returns the name of EJB ref.
The name of current EJB bean. exception: XDocletException - |
ejbRefName | public static String ejbRefName() throws XDocletException(Code) | | Returns the name of EJB ref.
The name of current EJB bean. exception: XDocletException - |
extendsFromFor | protected String extendsFromFor(XClass clazz, String tagName, String type, String extendsParamName, String defaultBaseClassName) throws XDocletException(Code) | | Returns the name of the class pk/etc class extends.
Parameters: clazz - the class Parameters: tagName - name of the tag (ejb:bean for example, used for getting generate parameter) Parameters: type - type value used for view type of remote/local Parameters: extendsParamName - extends parameter name (is "extends" for ejb:bean but is "local-extends" for local) Parameters: defaultBaseClassName - default base class name, returned when not deriving from another base class correct value for the extends statement of a generated class exception: XDocletException - |
forAllBeans | public void forAllBeans(String template) throws XDocletException(Code) | | Evaluates the body block for each EJBean derived from one of the three EJB types: EntityBean, SessionBean or
MessageDrivenBean.
Parameters: template - The body of the block tag exception: XDocletException - See Also: xdoclet.modules.ejb.entity.EntityTagsHandler.isEntity(xjavadoc.XClass) See Also: xdoclet.modules.ejb.session.SessionTagsHandler.isSession(xjavadoc.XClass) See Also: xdoclet.modules.ejb.mdb.MdbTagsHandler.isMessageDriven(xjavadoc.XClass) |
getDependentClassFor | protected String getDependentClassFor(XClass clazz, String type) throws XDocletException(Code) | | sub-classes which deal with patternized class names return a reasonable value
Parameters: clazz - the class Parameters: type - type value used for view-type of remote/local dependent class name for the class and type exception: XDocletException - |
getDependentClassTagName | protected String getDependentClassTagName()(Code) | | Gets the DependentClassTagName attribute of the EjbTagsHandler object
The DependentClassTagName value |
getEjb | public static XClass getEjb(String name) throws XDocletException(Code) | | Returns the class with the specified ejb name
Parameters: name - exception: XDocletException - |
getEjbIdFor | public static String getEjbIdFor(XClass clazz)(Code) | | Parameters: clazz - Description of Parameter a unique id for clazz |
getEjbNameFor | public static String getEjbNameFor(XClass clazz)(Code) | | 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).
Parameters: clazz - The EJB bean class for which we want the EJB name The EjbName value See Also: EjbTagsHandler.ejbName(java.util.Properties) |
getEjbSpec | public static String getEjbSpec()(Code) | | Returns the EJB specification version used. The generated files will be compatible with the version specified.
The Ejbspec value |
getInterfaceMethodName | protected String getInterfaceMethodName(String name) throws XDocletException(Code) | | Returns the interface method name depending on its type.
Parameters: name - Description of Parameter "create" if ejbCreate, "remote" if ejbRemove, find if ejbFind, home if ejbHome. exception: XDocletException - |
getShortEjbNameFor | public static String getShortEjbNameFor(XClass clazz)(Code) | | Returns short version of the EJB name of the clazz.
Parameters: clazz - the class we want its short EJB name The shortEjbName value See Also: EjbTagsHandler.shortEjbName() |
hasTransaction | protected boolean hasTransaction(XDoc doc) throws XDocletException(Code) | | Returns true if class/method denoted by doc has ejb:transaction tag, false otherwise.
Parameters: doc - Description of Parameter Description of the Returned Value exception: XDocletException - |
id | public String id() throws XDocletException(Code) | | Returns unique id for current ejb.
Description of the Returned Value exception: XDocletException - |
ifIsAConcreteEJBean | public void ifIsAConcreteEJBean(String template, Properties attributes) throws XDocletException(Code) | | 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.
Parameters: template - The body of the block tag Parameters: attributes - The attributes of the template tag exception: XDocletException - |
ifLocalEjb | public void ifLocalEjb(String template) throws XDocletException(Code) | | Parameters: template - Description of Parameter exception: XDocletException - |
ifNotLocalEjb | public void ifNotLocalEjb(String template) throws XDocletException(Code) | | Parameters: template - exception: XDocletException - |
ifNotRemoteEjb | public void ifNotRemoteEjb(String template) throws XDocletException(Code) | | Parameters: template - exception: XDocletException - |
ifRemoteEjb | public void ifRemoteEjb(String template) throws XDocletException(Code) | | Parameters: template - Description of Parameter exception: XDocletException - |
isAConcreteEJBean | public static boolean isAConcreteEJBean(XClass clazz) throws XDocletException(Code) | | Gets the AConcreteEJBean attribute of the EjbTagsHandler class
Parameters: clazz - Describe what the parameter does The AConcreteEJBean value exception: XDocletException - |
isEjb | protected boolean isEjb(XClass clazz) throws XDocletException(Code) | | Returns true of clazz is an EJB (derived from an EJB type), false otherwise.
Parameters: clazz - Description of Parameter The Ejb value exception: XDocletException - |
isInheritedIntfMethod | protected boolean isInheritedIntfMethod(XClass clazz, XMethod method, String tagName, String type, String extendsParamName, String defaultBaseClassName) throws XDocletException(Code) | | |
isInheritedIntfMethod | protected boolean isInheritedIntfMethod(XClass clazz, String methodNameWithSignature, String tagName, String type, String extendsParamName, String defaultBaseClassName) throws XDocletException(Code) | | Checks whether the specified interface method is inherited from a super-interface.
Parameters: clazz - The class being processed. Parameters: methodNameWithSignature - The normalized method name with parameters (i.e., comma-separated, no spaces,return type or parameter names). Parameters: tagName - The tag name which indicates whether to check the home interface (ejb:home) or acomponent interface (ejb:interface). Parameters: type - The interface type, "local" or "remote". Parameters: extendsParamName - The name of the attribute that indicates the super-interface extended by the homeor component interface in question. Parameters: defaultBaseClassName - The name of the default super-interface. true if the specified method is defined in the super-interface,otherwise false . throws: XDocletException - |
isIntfMethod | protected boolean isIntfMethod(String tagName, String type) throws XDocletException(Code) | | |
isLocalEjb | public static boolean isLocalEjb(XClass clazz) throws XDocletException(Code) | | |
isOnlyLocalEjb | public static boolean isOnlyLocalEjb(XClass clazz) throws XDocletException(Code) | | Returns true if clazz is only a local EJB by looking at ejb:bean's view-type parameter.
Parameters: clazz - Description of Parameter The OnlyLocalEjb value exception: XDocletException - |
isOnlyRemoteEjb | public static boolean isOnlyRemoteEjb(XClass clazz) throws XDocletException(Code) | | Returns true if clazz is only a remote EJB by looking at ejb:bean's view-type parameter.
Parameters: clazz - Description of Parameter The OnlyRemoteEjb value exception: XDocletException - |
isRemoteEjb | public static boolean isRemoteEjb(XClass clazz) throws XDocletException(Code) | | |
normalizeSignature | protected String normalizeSignature(String signature)(Code) | | Strips any return type and parameter names from a method signature.
Parameters: signature - Method signature to normalize. Normalized signature. |
prefixWithEjbSlash | protected static String prefixWithEjbSlash(String ejbName)(Code) | | Replace "." by "/" and add "ejb/" to the parameter.
Parameters: ejbName - The string to parse The parsed String |
shouldTraverseSuperclassForDependentClass | protected boolean shouldTraverseSuperclassForDependentClass(XClass clazz, String tagName) throws XDocletException(Code) | | Describe what the method does
Parameters: clazz - Describe what the parameter does Parameters: tagName - Describe what the parameter does Describe the return value exception: XDocletException - |
symbolicClassName | public String symbolicClassName() throws XDocletException(Code) | | 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 exception: XDocletException - See Also: EjbTagsHandler.shortEjbName() |
|
|