User: pathoss 
  Date: 02/05/20 04:03:04

  Modified:    modules/mvcsoft/src/xdoclet/modules/mvcsoft/ejb Tag:
                        MODULE_REFACTORING_BRANCH MVCSoftSubTask.java
                        MVCSoftTagsHandler.java
  Log:
  Cleanup.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.5   +114 -129  
xdoclet/modules/mvcsoft/src/xdoclet/modules/mvcsoft/ejb/Attic/MVCSoftSubTask.java
  
  Index: MVCSoftSubTask.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/modules/mvcsoft/src/xdoclet/modules/mvcsoft/ejb/Attic/MVCSoftSubTask.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -w -r1.1.2.4 -r1.1.2.5
  --- MVCSoftSubTask.java       9 May 2002 16:42:53 -0000       1.1.2.4
  +++ MVCSoftSubTask.java       20 May 2002 11:03:04 -0000      1.1.2.5
  @@ -10,135 +10,120 @@
   import xdoclet.modules.ejb.dd.AbstractEjbDeploymentDescriptorSubTask;
   
   /**
  - * @xdoclet:subtask name="mvcsoft" parent="xdoclet.modules.ejb.EjbDocletTask"
  - *
    * Generates MVCSoft's xml.
    *
    * @author Daniel OConnor ([EMAIL PROTECTED])
    * @created November 1, 2001
  + * @xdoclet:subtask   name="mvcsoft" parent="xdoclet.modules.ejb.EjbDocletTask"
    */
  -public class MVCSoftSubTask extends AbstractEjbDeploymentDescriptorSubTask {
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  -     private String deploymentVersion = "1.0.0";
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  -     private String connectionJndiName = "false";
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  -     private String loggingType = "false";
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  +public class MVCSoftSubTask extends AbstractEjbDeploymentDescriptorSubTask
  +{
        public final static String SUBTASK_NAME = "mvcsoft";
   
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
        private static String DEFAULT_TEMPLATE_FILE = "resources/mvcsoft.xdt";
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  +
        private static String DD_FILE_NAME = "mvcsoft-pm.xml";
   
  +    private String  deploymentVersion = "1.0.0";
  +
  +    private String  connectionJndiName = "false";
  +
  +    private String  loggingType = "false";
   
        /**
         * Describe what the MVCSoftSubTask constructor does
  -      *
  -      * @todo-javadoc Write javadocs for constructor
         */
  -     public MVCSoftSubTask() {
  +    public MVCSoftSubTask()
  +    {
                setTemplateURL(getClass().getResource(DEFAULT_TEMPLATE_FILE));
                setDestinationFile(DD_FILE_NAME);
                setValidateXML(false);
        }
   
  -
        /**
  -      * Sets the DeploymentVersion attribute of the MVCSoftSubTask object
  +     * Gets the SubTaskName attribute of the MVCSoftSubTask object
         *
  -      * @param deployment_version The new DeploymentVersion value
  +     * @return   The SubTaskName value
         */
  -     public void setDeploymentVersion(MVCSoftVersionTypes deployment_version) {
  -             this.deploymentVersion = deployment_version.getValue();
  +    public String getSubTaskName()
  +    {
  +        return SUBTASK_NAME;
        }
   
  -
        /**
  -      * Sets the Connectionjndiname attribute of the MVCSoftSubTask object
  +     * Gets the DeploymentVersion attribute of the MVCSoftSubTask object
         *
  -      * @param jndiName The new Connectionjndiname value
  +     * @return   The DeploymentVersion value
         */
  -     public void setConnectionjndiname(String jndiName) {
  -             connectionJndiName = jndiName;
  +    public String getDeploymentVersion()
  +    {
  +        return this.deploymentVersion;
        }
   
  -
        /**
  -      * Sets the Loggingtype attribute of the MVCSoftSubTask object
  +     * Gets the Connectionjndiname attribute of the MVCSoftSubTask object
         *
  -      * @param loggingType The new Loggingtype value
  +     * @return   The Connectionjndiname value
         */
  -     public void setLoggingtype(String loggingType) {
  -             this.loggingType = loggingType;
  +    public String getConnectionjndiname()
  +    {
  +        return connectionJndiName;
        }
   
  -
        /**
  -      * Gets the SubTaskName attribute of the MVCSoftSubTask object
  +     * Gets the Loggingtype attribute of the MVCSoftSubTask object
         *
  -      * @return The SubTaskName value
  +     * @return   The Loggingtype value
         */
  -     public String getSubTaskName() {
  -             return SUBTASK_NAME;
  +    public String getLoggingtype()
  +    {
  +        return loggingType;
        }
   
  -
        /**
  -      * Gets the DeploymentVersion attribute of the MVCSoftSubTask object
  +     * Sets the DeploymentVersion attribute of the MVCSoftSubTask object
         *
  -      * @return The DeploymentVersion value
  +     * @param deploymentVersion  The new DeploymentVersion value
         */
  -     public String getDeploymentVersion() {
  -             return this.deploymentVersion;
  +    public void setDeploymentVersion(MVCSoftVersionTypes deploymentVersion)
  +    {
  +        this.deploymentVersion = deploymentVersion.getValue();
        }
   
  -
        /**
  -      * Gets the Connectionjndiname attribute of the MVCSoftSubTask object
  +     * Sets the Connectionjndiname attribute of the MVCSoftSubTask object
         *
  -      * @return The Connectionjndiname value
  +     * @param jndiName  The new Connectionjndiname value
         */
  -     public String getConnectionjndiname() {
  -             return connectionJndiName;
  +    public void setConnectionjndiname(String jndiName)
  +    {
  +        connectionJndiName = jndiName;
        }
   
  -
        /**
  -      * Gets the Loggingtype attribute of the MVCSoftSubTask object
  +     * Sets the Loggingtype attribute of the MVCSoftSubTask object
         *
  -      * @return The Loggingtype value
  +     * @param loggingType  The new Loggingtype value
         */
  -     public String getLoggingtype() {
  -             return loggingType;
  +    public void setLoggingtype(String loggingType)
  +    {
  +        this.loggingType = loggingType;
        }
   
  -
        /**
         * @author Daniel OConnor ([EMAIL PROTECTED])
         * @created November 1, 2001
         */
  -     public static class MVCSoftVersionTypes extends 
org.apache.tools.ant.types.EnumeratedAttribute {
  +    public static class MVCSoftVersionTypes extends 
org.apache.tools.ant.types.EnumeratedAttribute
  +    {
                /**
  -              * Gets the Values attribute of the MVCSoftVersionTypes object
  +         * Gets the Values attribute of the MVCSoftVersionTypes object.
                 *
                 * @return The Values value
                 */
  -             public String[] getValues() {
  -                     return (new String[]{"1.0.0"});
  +        public String[] getValues()
  +        {
  +            return (new String[]{"1.0.0", "1.1"});
                }
        }
   }
  
  
  
  1.1.2.6   +235 -305  
xdoclet/modules/mvcsoft/src/xdoclet/modules/mvcsoft/ejb/Attic/MVCSoftTagsHandler.java
  
  Index: MVCSoftTagsHandler.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/modules/mvcsoft/src/xdoclet/modules/mvcsoft/ejb/Attic/MVCSoftTagsHandler.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -w -r1.1.2.5 -r1.1.2.6
  --- MVCSoftTagsHandler.java   12 May 2002 15:21:18 -0000      1.1.2.5
  +++ MVCSoftTagsHandler.java   20 May 2002 11:03:04 -0000      1.1.2.6
  @@ -4,46 +4,34 @@
    */
   package xdoclet.modules.mvcsoft.ejb;
   
  -import xjavadoc.XParameter;
  +import java.util.Properties;
  +import java.util.StringTokenizer;
   
   import org.apache.commons.logging.Log;
   
  +import xjavadoc.XParameter;
  +
   import xdoclet.XDocletException;
   import xdoclet.tagshandler.ClassTagsHandler;
   
   import xdoclet.util.LogUtil;
   import xdoclet.util.Translator;
   
  -import java.util.StringTokenizer;
  -import java.util.Properties;
  -
   /**
  - * @xdoclet:taghandler namespace="MVCSoft"
  - *
    * @author    Daniel OConnor ([EMAIL PROTECTED])
    * @created   November 1, 2001
  + * @xdoclet:taghandler   namespace="MVCSoft"
    */
   public class MVCSoftTagsHandler extends ClassTagsHandler
   {
  -     /**
  -      * @todo-javadoc   Describe the field
  -      */
        protected static XParameter currentQueryMethodParameter;
  -     /**
  -      * @todo-javadoc   Describe the field
  -      */
  +
        protected static StringTokenizer currentAliases;
  -     /**
  -      * @todo-javadoc   Describe the field
  -      */
  +
        protected static String currentRoleName;
  -     /**
  -      * @todo-javadoc   Describe the field
  -      */
  +
        protected static String currentFieldName;
  -     /**
  -      * @todo-javadoc   Describe the field
  -      */
  +
        protected static String currentColName;
   
        /**
  @@ -51,9 +39,6 @@
         *
         * @return                      Describe the return value
         * @exception XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for return value
  -      * @todo-javadoc                Write javadocs for exception
         */
        public String methodParamType() throws XDocletException
        {
  @@ -65,17 +50,13 @@
         *
         * @param template              Describe what the parameter does
         * @exception XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for exception
         */
        public void forAllQueryMethodParams( String template ) throws XDocletException
        {
                XParameter[] parameters = getCurrentMethod().parameters();
   
  -             for( int k = 0; k < ( parameters.length - 2 ); k++ )
  -             {
  -                     currentQueryMethodParameter = parameters[k];
  +        for (int i = 0; i < (parameters.length - 2); i++) {
  +            currentQueryMethodParameter = parameters[i];
   
                        generate( template );
                }
  @@ -86,21 +67,16 @@
         *
         * @return                      Describe the return value
         * @exception XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for return value
  -      * @todo-javadoc                Write javadocs for exception
         */
        public String fieldName() throws XDocletException
        {
                String token = currentToken( new Properties() );
                int idx = token.indexOf( ' ' );
   
  -             if( idx == -1 )
  -             {
  +        if (idx == -1) {
                        return token;
                }
  -             else
  -             {
  +        else {
                        return token.substring( 0, idx ).trim();
                }
        }
  @@ -110,32 +86,22 @@
         *
         * @return                      Describe the return value
         * @exception XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for return value
  -      * @todo-javadoc                Write javadocs for exception
         */
        public String sortDirection() throws XDocletException
        {
  -             String token = currentToken( new Properties() );
  -
  -             token = token.trim();
  -
  +        String token = currentToken(new Properties()).trim();
                int idx = token.indexOf( ' ' );
   
  -             if( idx == -1 )
  -             {
  +        if (idx == -1) {
                        return "";
                }
  -             else
  -             {
  +        else {
                        String sort = token.substring( idx, token.length() ).trim();
   
  -                     if( sort.equalsIgnoreCase( "desc" ) )
  -                     {
  +            if (sort.equalsIgnoreCase("desc")) {
                                return "Descending";
                        }
  -                     else
  -                     {
  +            else {
                                return "Ascending";
                        }
                }
  @@ -146,14 +112,10 @@
         *
         * @param template              Describe what the parameter does
         * @exception XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for exception
         */
        public void ifHasSortDirection( String template ) throws XDocletException
        {
  -             if( !sortDirection().equals( "" ) )
  -             {
  +        if (!sortDirection().equals("")) {
                        generate( template );
                }
        }
  @@ -163,16 +125,12 @@
         *
         * @param template              Describe what the parameter does
         * @exception XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for exception
         */
        public void forEachRoleMapping( String template ) throws XDocletException
        {
                String aliases = getKeyAliases();
   
  -             if( aliases == null )
  -             {
  +        if (aliases == null) {
                        return;
                }
   
  @@ -180,18 +138,15 @@
                String rightRole = null;
                int idx = aliases.indexOf( ";" );
   
  -             if( idx == -1 )
  -             {
  +        if (idx == -1) {
                        leftRole = aliases;
                }
  -             else
  -             {
  +        else {
                        leftRole = aliases.substring( 0, idx );
                        rightRole = aliases.substring( idx + 1 );
                }
                doForExtendedRole( leftRole, template );
  -             if( rightRole != null )
  -             {
  +        if (rightRole != null) {
                        doForExtendedRole( rightRole, template );
                }
        }
  @@ -201,16 +156,12 @@
         *
         * @param template              Describe what the parameter does
         * @exception XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for exception
         */
        public void forSingleRoleMapping( String template ) throws XDocletException
        {
                String aliases = getKeyAliases();
   
  -             if( aliases == null )
  -             {
  +        if (aliases == null) {
                        return;
                }
                currentAliases = new StringTokenizer( aliases, ",", false );
  @@ -222,19 +173,14 @@
         *
         * @param template              Describe what the parameter does
         * @exception XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for exception
         */
        public void forAllAliases( String template ) throws XDocletException
        {
  -             while( currentAliases.hasMoreTokens() )
  -             {
  +        while (currentAliases.hasMoreTokens()) {
                        String token = currentAliases.nextToken();
                        int idx = token.indexOf( '=' );
   
  -                     if( idx == -1 )
  -                     {
  +            if (idx == -1) {
                                throw new XDocletException( Translator.getString( 
"xdoclet.ejb.vendor.MVCSoftMessages", "alias_form" ) );
                        }
                        currentFieldName = token.substring( 0, idx ).trim();
  @@ -248,9 +194,6 @@
         *
         * @return                      Describe the return value
         * @exception XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for return value
  -      * @todo-javadoc                Write javadocs for exception
         */
        public String roleName() throws XDocletException
        {
  @@ -262,9 +205,6 @@
         *
         * @return                      Describe the return value
         * @exception XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for return value
  -      * @todo-javadoc                Write javadocs for exception
         */
        public String keyFieldName() throws XDocletException
        {
  @@ -276,9 +216,6 @@
         *
         * @return                      Describe the return value
         * @exception XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for return value
  -      * @todo-javadoc                Write javadocs for exception
         */
        public String colName() throws XDocletException
        {
  @@ -290,7 +227,6 @@
         *
         * @return                      The KeyAliases value
         * @exception XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for exception
         */
        private String getKeyAliases() throws XDocletException
        {
  @@ -303,17 +239,12 @@
         * @param token                 Describe what the parameter does
         * @param template              Describe what the parameter does
         * @exception XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for exception
         */
        private void doForExtendedRole( String token, String template ) throws 
XDocletException
        {
                int idx = token.indexOf( ':' );
   
  -             if( idx == -1 )
  -             {
  +        if (idx == -1) {
                        throw new XDocletException( Translator.getString( 
"xdoclet.modules.mvcsoft.ejb.resources.Messages", "key_alias_form" ) );
                }
   
  @@ -321,5 +252,4 @@
                currentAliases = new StringTokenizer( token.substring( idx + 1 ), ",", 
false );
                generate( template );
        }
  -
   }
  
  
  

_______________________________________________________________
Hundreds of nodes, one monster rendering program.
Now that's a super model! Visit http://clustering.foundries.sf.net/

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to