User: rinkrank
Date: 02/05/30 11:39:04
Modified: modules/ejb/src/xdoclet/modules/ejb/session
SessionSubTask.java SessionTagsHandler.java
Log:
Refactoring which removes redundant subtask names (both in @xdoclet.subtask
name="blabla" and in code)
-Removed the static SUBTASK_NAME and overridden getSubTaskName() from all SubTasks
(it's final now in SubTask)
-DocletTask stores all subtask names in a Class->String Map, using the name from
xdoclet.xml (which in turn comes from @xdoclet.subtask name="blabla"
-All references to SomeSubTask.SUBTASK_NAME replaced by a call to
DocletTask.getSubTaskName(Class subTaskClass)
-Improved error reporting in DocletTask
-Reverted the ejbjarxml/webxml to deploymentdescriptor
-Added omit.docs flag in xdoclet/build.xml set it to true in ANT_OPTS for faster
build
Revision Changes Path
1.4 +1 -15
xdoclet/modules/ejb/src/xdoclet/modules/ejb/session/SessionSubTask.java
Index: SessionSubTask.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/session/SessionSubTask.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- SessionSubTask.java 29 May 2002 01:51:29 -0000 1.3
+++ SessionSubTask.java 30 May 2002 18:39:04 -0000 1.4
@@ -25,12 +25,10 @@
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created Oct 15, 2001
* @xdoclet:subtask display-name="Session Bean" name="session"
parent="xdoclet.modules.ejb.EjbDocletTask"
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class SessionSubTask extends AbstractEjbCodeGeneratorSubTask
{
- public final static String SUBTASK_NAME = "session";
-
public static String DEFAULT_SESSION_CLASS_PATTERN = "{0}Session";
protected static String DEFAULT_TEMPLATE_FILE = "resources/session.xdt";
@@ -55,18 +53,6 @@
addOfType("javax.ejb.SessionBean");
setPackageSubstitutionInheritanceSupported(false);
}
-
-
- /**
- * Gets the SubTaskName attribute of the SessionSubTask object
- *
- * @return The SubTaskName value
- */
- public String getSubTaskName()
- {
- return SUBTASK_NAME;
- }
-
/**
* Returns the configuration parameter for specifying the concrete session bean
class name pattern. By default the
1.3 +5 -4
xdoclet/modules/ejb/src/xdoclet/modules/ejb/session/SessionTagsHandler.java
Index: SessionTagsHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/session/SessionTagsHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- SessionTagsHandler.java 28 May 2002 22:19:00 -0000 1.2
+++ SessionTagsHandler.java 30 May 2002 18:39:04 -0000 1.3
@@ -10,9 +10,10 @@
import xjavadoc.XJavaDoc;
import xjavadoc.XJavaDocException;
import xjavadoc.XMethod;
-
import xdoclet.DocletContext;
import xdoclet.DocletSupport;
+
+import xdoclet.DocletTask;
import xdoclet.XDocletException;
import xdoclet.modules.ejb.EjbTagsHandler;
import xdoclet.modules.ejb.entity.EntityPkSubTask;
@@ -23,7 +24,7 @@
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created Oct 16, 2001
* @xdoclet:taghandler namespace="EjbSession"
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class SessionTagsHandler extends EjbTagsHandler
{
@@ -41,7 +42,7 @@
String session_name = MessageFormat.format(getSessionClassPattern(), new
Object[]{getShortEjbNameFor(clazz)});
// Fix package name
- fileName = choosePackage(fileName, null, SessionSubTask.SUBTASK_NAME);
+ fileName = choosePackage(fileName, null,
DocletTask.getSubTaskName(SessionSubTask.class));
if (fileName.length() > 0) {
fileName += ".";
}
@@ -72,7 +73,7 @@
*/
protected static String getSessionClassPattern()
{
- SessionSubTask session_subtask = ((SessionSubTask)
DocletContext.getInstance().getSubTaskBy(SessionSubTask.SUBTASK_NAME));
+ SessionSubTask session_subtask = ((SessionSubTask)
DocletContext.getInstance().getSubTaskBy(DocletTask.getSubTaskName(SessionSubTask.class)));
if (session_subtask != null) {
return session_subtask.getSessionClassPattern();
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel