xdoclet.modules.ejb.dd

Class EjbRefTagsHandler

public class EjbRefTagsHandler extends EjbTagsHandler

Deprecated: please use EnvEjbRefTagsHandler

Version: $Revision 1.1 $

Author: Ara Abrahamian

UNKNOWN: Oct 16, 2001 namespace = "EjbRef" refactor ejbRefId properly to account for ejb:bean - it may not be needed anymore. refactor storeReferringClassId properly to take ejb:bean into account - may not be needed anymore.

Field Summary
protected StringreferringClassId
The id of the EJB referencing another EJB, used for setting up a correct unique id for the ejb-ref.
Method Summary
StringejbRefId()
Returns unique id for the specified ejb-ref.
StringejbRefJndiName()
Returns the global JNDI name for the current EJB ref.
protected XClassfindEjb(String ejbName)
Finds and returns the class with the specified ejbName.
voidforAllEjbRefs(String template, Properties attributes)
Evaluates the body block for each ejb:ejb-ref defined for the EJB.
voidifLocalEjbRef(String template)
Generates code if the ejb-ref is local
voidifRemoteEjbRef(String template)
Generates code if the ejb-ref is local
protected booleanisLocalEjbRef(XTag ejbRefTag)
Return true if the ejb-ref is local
protected booleanisRemoteEjbRef(XTag ejbRefTag)
Return true if the ejb-ref is remote
protected voidstoreReferringClassId()
Stores the id of current EJB for further use by other tags in referringClassId attribute.

Field Detail

referringClassId

protected transient String referringClassId
The id of the EJB referencing another EJB, used for setting up a correct unique id for the ejb-ref.

See Also: ejbRefId EjbRefTagsHandler storeReferringClassId

Method Detail

ejbRefId

public String ejbRefId()
Returns unique id for the specified ejb-ref. It prefixes it with the referring class's id, then a _ and the id of the ejb object.

Returns: Description of the Returned Value

Throws: XDocletException

UNKNOWN: refactor this properly to account for ejb:bean - it may not be needed anymore. type = "content"

ejbRefJndiName

public String ejbRefJndiName()
Returns the global JNDI name for the current EJB ref.

Returns: The JNDI name of current EJB ref.

Throws: XDocletException

UNKNOWN: type = "content"

findEjb

protected XClass findEjb(String ejbName)
Finds and returns the class with the specified ejbName. An XDocletException is thrown if not found.

Parameters: ejbName Description of Parameter

Returns: Description of the Returned Value

Throws: XDocletException

forAllEjbRefs

public void forAllEjbRefs(String template, Properties attributes)
Evaluates the body block for each ejb:ejb-ref defined for the EJB. One of the useful things is does is to lookup the EJB using the ejb-name parameter of ejb:ejb-ref and fill in other required info.

Parameters: template The body of the block tag attributes The attributes of the template tag

Throws: XDocletException

UNKNOWN: type = "block"

ifLocalEjbRef

public void ifLocalEjbRef(String template)
Generates code if the ejb-ref is local

Parameters: template

Throws: XDocletException

UNKNOWN: type = "block"

ifRemoteEjbRef

public void ifRemoteEjbRef(String template)
Generates code if the ejb-ref is local

Parameters: template

Throws: XDocletException

UNKNOWN: type = "block"

isLocalEjbRef

protected boolean isLocalEjbRef(XTag ejbRefTag)
Return true if the ejb-ref is local

Parameters: ejbRefTag

Returns: true if the ejb-ref is local otherwise false

Throws: XDocletException

isRemoteEjbRef

protected boolean isRemoteEjbRef(XTag ejbRefTag)
Return true if the ejb-ref is remote

Parameters: ejbRefTag

Returns: true if the ejb-ref is remote otherwise false

Throws: XDocletException

storeReferringClassId

protected void storeReferringClassId()
Stores the id of current EJB for further use by other tags in referringClassId attribute.

Throws: XDocletException

UNKNOWN: refactor this properly to take ejb:bean into account - may not be needed anymore.