Update of /cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16879/modules/ejb/src/xdoclet/modules/ejb
Modified Files:
EjbTagsHandler.java
Log Message:
added easier environment handling (XDT-1325)
Index: EjbTagsHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/EjbTagsHandler.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** EjbTagsHandler.java 30 Mar 2005 21:46:37 -0000 1.29
--- EjbTagsHandler.java 6 Apr 2005 21:50:35 -0000 1.30
***************
*** 289,292 ****
--- 289,306 ----
/**
+ * Returns true of clazz is an EJB (derived from an EJB type), false
otherwise.
+ *
+ * @param clazz Description of Parameter
+ * @return The Ejb value
+ * @exception XDocletException
+ */
+ public static boolean isEjb(XClass clazz) throws XDocletException
+ {
+ return clazz.isA("javax.ejb.SessionBean")
+ || clazz.isA("javax.ejb.EntityBean")
+ || clazz.isA("javax.ejb.MessageDrivenBean");
+ }
+
+ /**
* 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.
***************
*** 351,357 ****
public static String ejbRefName() throws XDocletException
{
String ejbRefName = null;
! String refName = getCurrentClassTag().getAttributeValue("ref-name");
if (refName != null) {
--- 365,385 ----
public static String ejbRefName() throws XDocletException
{
+ return ejbRefName(getCurrentClassTag(), getCurrentClass());
+ }
+
+ /**
+ * Returns the name of EJB ref.
+ *
+ * @param tag
+ * @param clazz
+ * @return The name of current EJB bean.
+ * @exception XDocletException
+ * @doc.tag type="content"
+ */
+ public static String ejbRefName(XTag tag, XClass clazz) throws
XDocletException
+ {
String ejbRefName = null;
! String refName = tag.getAttributeValue("ref-name");
if (refName != null) {
***************
*** 359,373 ****
}
else {
! ejbRefName = prefixWithEjbSlash(getEjbNameFor(getCurrentClass()));
! String type = getCurrentClassTag().getAttributeValue("view-type");
if (type != null) {
! if (type.equals("local") && isLocalEjb(getCurrentClass())) {
ejbRefName = ejbRefName + LOCAL_SUFFIX;
}
}
else {
! if (isLocalEjb(getCurrentClass()) &&
!isRemoteEjb(getCurrentClass())) {
ejbRefName = ejbRefName + LOCAL_SUFFIX;
}
--- 387,401 ----
}
else {
! ejbRefName = prefixWithEjbSlash(getEjbNameFor(clazz));
! String type = tag.getAttributeValue("view-type");
if (type != null) {
! if (type.equals("local") && isLocalEjb(clazz)) {
ejbRefName = ejbRefName + LOCAL_SUFFIX;
}
}
else {
! if (isLocalEjb(getCurrentClass()) && !isRemoteEjb(clazz)) {
ejbRefName = ejbRefName + LOCAL_SUFFIX;
}
***************
*** 787,805 ****
}
-
- /**
- * Returns true of clazz is an EJB (derived from an EJB type), false
otherwise.
- *
- * @param clazz Description of Parameter
- * @return The Ejb value
- * @exception XDocletException
- */
- protected boolean isEjb(XClass clazz) throws XDocletException
- {
- return clazz.isA("javax.ejb.SessionBean")
- || clazz.isA("javax.ejb.EntityBean")
- || clazz.isA("javax.ejb.MessageDrivenBean");
- }
-
/**
* sub-classes which deal with patternized class names return a
reasonable value
--- 815,818 ----
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
xdoclet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel