User: vharcq
Date: 02/04/02 23:50:54
Modified: core/src/xdoclet/ejb/tags HomeTagsHandler.java
Log:
Bug 535221 : create-method view-type="..."
Correct an inversion in ClassComparator message
Revision Changes Path
1.23 +19 -6 xdoclet/core/src/xdoclet/ejb/tags/HomeTagsHandler.java
Index: HomeTagsHandler.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/ejb/tags/HomeTagsHandler.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -w -r1.22 -r1.23
--- HomeTagsHandler.java 3 Apr 2002 06:39:12 -0000 1.22
+++ HomeTagsHandler.java 3 Apr 2002 07:50:53 -0000 1.23
@@ -23,7 +23,7 @@
/**
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created Oct 15, 2001
- * @version $Revision: 1.22 $
+ * @version $Revision: 1.23 $
*/
public class HomeTagsHandler extends EjbTagsHandler
{
@@ -502,7 +502,7 @@
if (! isFinderMethod(method))
continue;
}
- else if ( tagType.equals("ejb:create") )
+ else if ( tagType.equals("ejb:create-method") )
{
if (! isCreateMethod(method))
continue;
@@ -542,10 +542,23 @@
if (cat.isDebugEnabled()) cat.debug("Finder Method = "+signature);
}
- else if (tagType.equals("ejb:create"))
+ else if (tagType.equals("ejb:create-method"))
{
if ( ! isCreateMethod(method))
continue;
+
+ String viewType = null;
+ XTag[] tags = method.doc().tags( tagType, superclasses );
+ for( int k = 0; k < tags.length; k++ )
+ {
+ String attr = tags[k].attributeValue("view-type");
+ if (attr != null)
+ viewType = attr;
+ }
+
+ if (viewType != null && ! viewType.equals("both") && !
viewType.equals(type))
+ continue;
+
signature =
getHomeDefinition(getCurrentClass(),method,tagType,type);
if ( !already.add(signature) )
@@ -567,7 +580,7 @@
}
if (exc.length() == 0){
if (tagType.equals("ejb:finder"))
exc.append("javax.ejb.FinderException");
- else if (tagType.equals("ejb:create"))
exc.append("javax.ejb.CreateException");
+ else if (tagType.equals("ejb:create-method"))
exc.append("javax.ejb.CreateException");
}
if (type.equalsIgnoreCase("remote"))
exc.append(",java.rmi.RemoteException");
@@ -625,7 +638,7 @@
}
// Add mandatory create() method for stateless beans
- if (SessionTagsHandler.isSession(getCurrentClass()) &&
tagType.equals("ejb:create"))
+ if (SessionTagsHandler.isSession(getCurrentClass()) &&
tagType.equals("ejb:create-method"))
{
if (already.size() == 0)
{
@@ -721,7 +734,7 @@
StringBuffer homeMethodName = new StringBuffer();
if (tagType.equals("ejb:finder"))
homeMethodName.append(method.returnType());
- else if (tagType.equals("ejb:create"))
+ else if (tagType.equals("ejb:create-method"))
homeMethodName.append(InterfaceTagsHandler.getComponentInterface(type,clazz));
homeMethodName.append(" ");
homeMethodName.append(methodName.substring(0,1).toLowerCase());
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel