User: pathoss 
  Date: 02/05/12 06:53:28

  Modified:    modules/ejb/src/xdoclet/modules/ejb/dd Tag:
                        MODULE_REFACTORING_BRANCH
                        AbstractEjbDeploymentDescriptorSubTask.java
                        EjbDotXmlSubTask.java EjbRefTagsHandler.java
                        RelationTagsHandler.java SecurityTagsHandler.java
  Log:
  Refactored. Fixed compilation errors and warnings.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +34 -33    
xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/AbstractEjbDeploymentDescriptorSubTask.java
  
  Index: AbstractEjbDeploymentDescriptorSubTask.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/AbstractEjbDeploymentDescriptorSubTask.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -w -r1.1.2.2 -r1.1.2.3
  --- AbstractEjbDeploymentDescriptorSubTask.java       27 Apr 2002 13:53:37 -0000     
 1.1.2.2
  +++ AbstractEjbDeploymentDescriptorSubTask.java       12 May 2002 13:53:27 -0000     
 1.1.2.3
  @@ -4,11 +4,12 @@
    */
   package xdoclet.modules.ejb.dd;
   
  -import xjavadoc.XJavaDoc;
   import xjavadoc.XClass;
  +
  +import xjavadoc.XJavaDoc;
   import xjavadoc.XJavaDocException;
  -import xdoclet.XmlSubTask;
   import xdoclet.XDocletException;
  +import xdoclet.XmlSubTask;
   import xdoclet.modules.ejb.entity.CmpTagsHandler;
   
   /**
  @@ -16,19 +17,18 @@
    *
    * @author Ara Abrahamian ([EMAIL PROTECTED])
    * @created Dec 11, 2001
  - * @version $Revision: 1.1.2.2 $
  + * @version   $Revision: 1.1.2.3 $
    */
  -public abstract class AbstractEjbDeploymentDescriptorSubTask extends XmlSubTask {
  +public abstract class AbstractEjbDeploymentDescriptorSubTask extends XmlSubTask
  +{
        /**
         * Describe what the method does
         *
         * @return Describe the return value
  -      * @exception xdoclet.XDocletException Describe the exception
  -      * @todo-javadoc Write javadocs for method
  -      * @todo-javadoc Write javadocs for return value
  -      * @todo-javadoc Write javadocs for exception
  +     * @exception XDocletException
         */
  -     protected boolean atLeastOneCmpEntityBeanExists() throws XDocletException {
  +    protected boolean atLeastOneCmpEntityBeanExists() throws XDocletException
  +    {
                try {
                        XClass[] classes = XJavaDoc.getInstance().sourceClasses();
   
  @@ -41,7 +41,8 @@
                        }
   
                        return false;
  -             } catch (XJavaDocException e) {
  +        }
  +        catch (XJavaDocException e) {
                        throw new XDocletException(e, e.getMessage());
                }
        }
  
  
  
  1.1.2.5   +208 -243  
xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/EjbDotXmlSubTask.java
  
  Index: EjbDotXmlSubTask.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/EjbDotXmlSubTask.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
  --- EjbDotXmlSubTask.java     9 May 2002 16:39:41 -0000       1.1.2.4
  +++ EjbDotXmlSubTask.java     12 May 2002 13:53:27 -0000      1.1.2.5
  @@ -4,212 +4,182 @@
    */
   package xdoclet.modules.ejb.dd;
   
  +import java.io.File;
  +
   import xdoclet.XDocletException;
   import xdoclet.XmlSubTask;
  -import xdoclet.util.Translator;
  -
  -import java.io.File;
   
   import xdoclet.modules.ejb.dd.AbstractEjbDeploymentDescriptorSubTask;
  +import xdoclet.util.Translator;
   
   /**
  - * @xdoclet:subtask name="deploymentdescriptor" 
parent="xdoclet.modules.ejb.EjbDocletTask"
  - *
    * @author Ara Abrahamian ([EMAIL PROTECTED])
    * @created Oct 15, 2001
  - * @version $Revision: 1.1.2.4 $
  - */
  -public class EjbDotXmlSubTask extends AbstractEjbDeploymentDescriptorSubTask {
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  -     protected String description;
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  -     protected String displayname;
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  -     protected String smallicon = "";
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  -     protected String largeicon = "";
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  -     protected String clientjar = "false";
  -     /**
  -      * @todo-javadoc Describe the field
  + * @xdoclet:subtask   name="deploymentdescriptor"
  + *      parent="xdoclet.modules.ejb.EjbDocletTask"
  + * @version           $Revision: 1.1.2.5 $
         */
  +public class EjbDotXmlSubTask extends AbstractEjbDeploymentDescriptorSubTask
  +{
        public final static String SUBTASK_NAME = "deploymentDescriptor";
   
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
        private final static String DEFAULT_TEMPLATE_FILE = 
"resources/ejb-jar_xml.xdt";
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  +
        private final static String DD_FILE_NAME = "ejb-jar.xml";
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  +
        private final static String DD_PUBLICID_11 = "-//Sun Microsystems, Inc.//DTD 
Enterprise JavaBeans 1.1//EN";
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  +
        private final static String DD_SYSTEMID_11 = 
"http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd";;
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  +
        private final static String DTD_FILE_NAME_11 = "resources/ejb11-jar.dtd";
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  +
        private final static String DD_PUBLICID_20 = "-//Sun Microsystems, Inc.//DTD 
Enterprise JavaBeans 2.0//EN";
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  +
        private final static String DD_SYSTEMID_20 = 
"http://java.sun.com/dtd/ejb-jar_2_0.dtd";;
  -     /**
  -      * @todo-javadoc Describe the field
  -      */
  +
        private final static String DTD_FILE_NAME_20 = "resources/ejb20-jar.dtd";
   
  +    protected String description;
  +
  +    protected String displayname;
  +
  +    protected String smallicon = "";
  +
  +    protected String largeicon = "";
  +
  +    protected String clientjar = "false";
   
        /**
         * Describe what the EjbDotXmlSubTask constructor does
         *
  -      * @exception xdoclet.XDocletException Describe the exception
  -      * @todo-javadoc Write javadocs for constructor
  -      * @todo-javadoc Write javadocs for exception
  +     * @exception XDocletException
         */
  -     public EjbDotXmlSubTask() throws XDocletException {
  +    public EjbDotXmlSubTask() throws XDocletException
  +    {
                setTemplateURL(getClass().getResource(DEFAULT_TEMPLATE_FILE));
                setDestinationFile(DD_FILE_NAME);
                setDescription(Translator.getString("no_description"));
                setDisplayname(Translator.getString("generated_by_xdoclet"));
        }
   
  -
        /**
  -      * Sets the Smallicon attribute of the EjbDotXmlSubTask object
  +     * Gets the SubTaskName attribute of the EjbDotXmlSubTask object
         *
  -      * @param smallicon The new Smallicon value
  +     * @return   The SubTaskName value
         */
  -     public void setSmallicon(String smallicon) {
  -             this.smallicon = smallicon;
  +    public String getSubTaskName()
  +    {
  +        return SUBTASK_NAME;
        }
   
  -
        /**
  -      * Sets the Largeicon attribute of the EjbDotXmlSubTask object
  +     * Gets the Smallicon attribute of the EjbDotXmlSubTask object
         *
  -      * @param largeicon The new Largeicon value
  +     * @return   The Smallicon value
         */
  -     public void setLargeicon(String largeicon) {
  -             this.largeicon = largeicon;
  +    public String getSmallicon()
  +    {
  +        return smallicon;
        }
   
  -
        /**
  -      * Sets the Displayname attribute of the EjbDotXmlSubTask object
  +     * Gets the Largeicon attribute of the EjbDotXmlSubTask object
         *
  -      * @param displayname The new Displayname value
  +     * @return   The Largeicon value
         */
  -     public void setDisplayname(String displayname) {
  -             this.displayname = displayname;
  +    public String getLargeicon()
  +    {
  +        return largeicon;
        }
   
   
        /**
  -      * Sets the Description attribute of the EjbDotXmlSubTask object
  +     * Gets the Displayname attribute of the EjbDotXmlSubTask object
         *
  -      * @param description The new Description value
  +     * @return   The Displayname value
         */
  -     public void setDescription(String description) {
  -             this.description = description;
  +    public String getDisplayname()
  +    {
  +        return displayname;
        }
   
  -
        /**
  -      * Sets the Clientjar attribute of the EjbDotXmlSubTask object
  +     * Gets the Description attribute of the EjbDotXmlSubTask object
         *
  -      * @param clientjar The new Clientjar value
  +     * @return   The Description value
         */
  -     public void setClientjar(String clientjar) {
  -             this.clientjar = clientjar;
  +    public String getDescription()
  +    {
  +        return description;
        }
   
  -
        /**
  -      * Gets the SubTaskName attribute of the EjbDotXmlSubTask object
  +     * Gets the Clientjar attribute of the EjbDotXmlSubTask object
         *
  -      * @return The SubTaskName value
  +     * @return   The Clientjar value
         */
  -     public String getSubTaskName() {
  -             return SUBTASK_NAME;
  +    public String getClientjar()
  +    {
  +        return clientjar;
        }
   
  -
        /**
  -      * Gets the Smallicon attribute of the EjbDotXmlSubTask object
  +     * Sets the Smallicon attribute of the EjbDotXmlSubTask object
         *
  -      * @return The Smallicon value
  +     * @param smallicon  The new Smallicon value
         */
  -     public String getSmallicon() {
  -             return smallicon;
  +    public void setSmallicon(String smallicon)
  +    {
  +        this.smallicon = smallicon;
        }
   
  -
        /**
  -      * Gets the Largeicon attribute of the EjbDotXmlSubTask object
  +     * Sets the Largeicon attribute of the EjbDotXmlSubTask object
         *
  -      * @return The Largeicon value
  +     * @param largeicon  The new Largeicon value
         */
  -     public String getLargeicon() {
  -             return largeicon;
  +    public void setLargeicon(String largeicon)
  +    {
  +        this.largeicon = largeicon;
        }
   
  -
        /**
  -      * Gets the Displayname attribute of the EjbDotXmlSubTask object
  +     * Sets the Displayname attribute of the EjbDotXmlSubTask object
         *
  -      * @return The Displayname value
  +     * @param displayname  The new Displayname value
         */
  -     public String getDisplayname() {
  -             return displayname;
  +    public void setDisplayname(String displayname)
  +    {
  +        this.displayname = displayname;
        }
   
  -
        /**
  -      * Gets the Description attribute of the EjbDotXmlSubTask object
  +     * Sets the Description attribute of the EjbDotXmlSubTask object
         *
  -      * @return The Description value
  +     * @param description  The new Description value
         */
  -     public String getDescription() {
  -             return description;
  +    public void setDescription(String description)
  +    {
  +        this.description = description;
        }
   
  -
        /**
  -      * Gets the Clientjar attribute of the EjbDotXmlSubTask object
  +     * Sets the Clientjar attribute of the EjbDotXmlSubTask object
         *
  -      * @return The Clientjar value
  +     * @param clientjar  The new Clientjar value
         */
  -     public String getClientjar() {
  -             return clientjar;
  +    public void setClientjar(String clientjar)
  +    {
  +        this.clientjar = clientjar;
        }
   
  -
        /**
         * Called to validate configuration parameters.
         *
  -      * @exception xdoclet.XDocletException Description of Exception
  +     * @exception XDocletException
         */
  -     public void validateOptions() throws XDocletException {
  +    public void validateOptions() throws XDocletException
  +    {
                super.validateOptions();
   
                if (getDestinationFile() == null || 
getDestinationFile().trim().equals("")) {
  @@ -217,15 +187,13 @@
                }
        }
   
  -
        /**
         * Describe what the method does
         *
  -      * @exception xdoclet.XDocletException Describe the exception
  -      * @todo-javadoc Write javadocs for method
  -      * @todo-javadoc Write javadocs for exception
  +     * @exception XDocletException
         */
  -     public void execute() throws XDocletException {
  +    public void execute() throws XDocletException
  +    {
                if (getContext().getConfigParam("EjbSpec").equals("1.1")) {
                        setPublicId(DD_PUBLICID_11);
                        setSystemId(DD_SYSTEMID_11);
  @@ -240,16 +208,13 @@
                startProcess();
        }
   
  -
        /**
         * Describe what the method does
         *
  -      * @exception xdoclet.XDocletException Describe the exception
  -      * @todo-javadoc Write javadocs for method
  -      * @todo-javadoc Write javadocs for exception
  +     * @exception XDocletException
         */
  -     protected void engineStarted() throws XDocletException {
  +    protected void engineStarted() throws XDocletException
  +    {
                System.out.println(Translator.getString("xdoclet.ejb.Messages", 
"generating_dd"));
        }
  -
   }
  
  
  
  1.1.2.4   +131 -140  
xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/EjbRefTagsHandler.java
  
  Index: EjbRefTagsHandler.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/EjbRefTagsHandler.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -w -r1.1.2.3 -r1.1.2.4
  --- EjbRefTagsHandler.java    28 Apr 2002 22:25:21 -0000      1.1.2.3
  +++ EjbRefTagsHandler.java    12 May 2002 13:53:27 -0000      1.1.2.4
  @@ -4,32 +4,32 @@
    */
   package xdoclet.modules.ejb.dd;
   
  -import xjavadoc.XJavaDoc;
  +import java.util.HashSet;
  +
  +import java.util.Properties;
   import xjavadoc.XClass;
  -import xjavadoc.XTag;
  +
  +import xjavadoc.XJavaDoc;
   import xjavadoc.XJavaDocException;
  +import xjavadoc.XTag;
   
   import xdoclet.XDocletException;
  +
  +import xdoclet.modules.ejb.EjbTagsHandler;
   import xdoclet.tagshandler.IdTagsHandler;
   
   import xdoclet.util.Translator;
   import xdoclet.util.TypeConversionUtil;
   
  -import java.util.Properties;
  -import java.util.HashSet;
  -
  -import xdoclet.modules.ejb.EjbTagsHandler;
  -
   /**
  - * @xdoclet:taghandler namespace="EjbRef"
  - *
    * @author    Ara Abrahamian
    * @created   Oct 16, 2001
  + * @xdoclet:taghandler   namespace="EjbRef"
    * @version   $Revision 1.1 $
  - * @todo      refactor ejbRefId properly to account for ejb:bean - it may not be
  - *      needed anymore.
  - * @todo      refactor storeReferringClassId properly to take ejb:bean into
  - *      account - may not be needed anymore.
  + * @todo                 refactor ejbRefId properly to account for ejb:bean - it
  + *      may not be needed anymore.
  + * @todo                 refactor storeReferringClassId properly to take
  + *      ejb:bean into account - may not be needed anymore.
    */
   public class EjbRefTagsHandler extends EjbTagsHandler
   {
  @@ -48,9 +48,9 @@
         * referring class's id, then a _ and the id of the ejb object.
         *
         * @return                      Description of the Returned Value
  -      * @exception xdoclet.XDocletException  Description of Exception
  -      * @todo                        refactor this properly to account for ejb:bean
  -      *      - it may not be needed anymore.
  +     * @exception XDocletException
  +     * @todo                        refactor this properly to account for
  +     *      ejb:bean - it may not be needed anymore.
         * @doc:tag                     type="content"
         */
        public String ejbRefId() throws XDocletException
  @@ -60,12 +60,12 @@
   
        /**
         * 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.
  +     * 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.
         *
         * @param template              The body of the block tag
         * @param attributes            The attributes of the template tag
  -      * @exception xdoclet.XDocletException  Description of Exception
  +     * @exception XDocletException
         * @doc:tag                     type="block"
         */
        public void forAllEjbRefs( String template, Properties attributes ) throws 
XDocletException
  @@ -77,20 +77,17 @@
                XClass cur_class = getCurrentClass();
                HashSet already = new HashSet();
   
  -             do
  -             {
  +        do {
                        XTag[] tags = cur_class.doc().tags( "ejb:ejb-ref" );
   
  -                     for( int i = 0; i < tags.length; i++ )
  -                     {
  +            for (int i = 0; i < tags.length; i++) {
                                setCurrentClassTag( tags[i] );
   
                                storeReferringClassId();
   
                                String ejbName = getCurrentClassTag().attributeValue( 
"ejb-name" );
   
  -                             if( !already.contains( ejbName ) )
  -                             {
  +                if (!already.contains(ejbName)) {
                                        already.add( ejbName );
                                        pushCurrentClass( findEjb( ejbName ) );
                                        generate( template );
  @@ -100,12 +97,10 @@
                                setCurrentClassTag( null );
                                referringClassId = null;
                        }
  -                     if( superclasses == true )
  -                     {
  +            if (superclasses == true) {
                                cur_class = cur_class.superclass();
                        }
  -                     else
  -                     {
  +            else {
                                break;
                        }
                }while ( cur_class != null );
  @@ -117,7 +112,7 @@
         * Stores the id of current EJB for further use by other tags in
         * referringClassId attribute.
         *
  -      * @exception xdoclet.XDocletException  Description of Exception
  +     * @exception XDocletException
         * @todo                        refactor this properly to take ejb:bean into
         *      account - may not be needed anymore.
         */
  @@ -127,29 +122,25 @@
        }
   
        /**
  -      * Finds and returns the class with the specified ejbName. An XDocletException
  -      * is thrown if not found.
  +     * Finds and returns the class with the specified ejbName. An
  +     * XDocletException is thrown if not found.
         *
         * @param ejbName               Description of Parameter
         * @return                      Description of the Returned Value
  -      * @exception xdoclet.XDocletException  Description of Exception
  +     * @exception XDocletException
         */
        protected XClass findEjb( String ejbName ) throws XDocletException
        {
  -             try
  -             {
  +        try {
                        XClass[] classes = XJavaDoc.getInstance().sourceClasses();
   
  -                     for( int i = 0; i < classes.length; i++ )
  -                     {
  -                             if( isEjb( classes[i] ) && ejbName.equals( 
getEjbNameFor( classes[i] ) ) )
  -                             {
  +            for (int i = 0; i < classes.length; i++) {
  +                if (isEjb(classes[i]) && ejbName.equals(getEjbNameFor(classes[i]))) 
{
                                        return classes[i];
                                }
                        }
                }
  -             catch( XJavaDocException e )
  -             {
  +        catch (XJavaDocException e) {
                        throw new XDocletException( e, e.getMessage() );
                }
   
  
  
  
  1.1.2.4   +1007 
-1159xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/RelationTagsHandler.java
  
  Index: RelationTagsHandler.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/RelationTagsHandler.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -w -r1.1.2.3 -r1.1.2.4
  --- RelationTagsHandler.java  28 Apr 2002 22:25:21 -0000      1.1.2.3
  +++ RelationTagsHandler.java  12 May 2002 13:53:27 -0000      1.1.2.4
  @@ -4,33 +4,33 @@
    */
   package xdoclet.modules.ejb.dd;
   
  -import xjavadoc.XJavaDoc;
  +import java.util.HashMap;
  +import java.util.Iterator;
  +import java.util.Map;
  +
  +import org.apache.commons.logging.Log;
   import xjavadoc.XClass;
  +
  +import xjavadoc.XJavaDoc;
  +import xjavadoc.XJavaDocException;
   import xjavadoc.XMethod;
   import xjavadoc.XTag;
  -import xjavadoc.XJavaDocException;
   
   import xdoclet.XDocletException;
  +import xdoclet.modules.ejb.EjbTagsHandler;
   import xdoclet.tagshandler.MethodTagsHandler;
   
  -import xdoclet.util.Log;
  +import xdoclet.util.LogUtil;
   import xdoclet.util.Translator;
   import xdoclet.util.TypeConversionUtil;
   
  -import java.util.HashMap;
  -import java.util.Iterator;
  -import java.util.Map;
  -
  -import org.apache.log4j.Category;
  -import xdoclet.modules.ejb.EjbTagsHandler;
  -
   /**
  - * @xdoclet:taghandler namespace="EjbRel"
  - *
  - * @author    <a href="mailto:[EMAIL PROTECTED]";>Aslak Helles�y</a>
  + * @author               <a href="mailto:[EMAIL PROTECTED]";>Aslak
  + *      Helles�y</a>
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   Oct 15, 2001
  - * @version   $Revision: 1.1.2.3 $
  + * @xdoclet:taghandler   namespace="EjbRel"
  + * @version              $Revision: 1.1.2.4 $
    */
   public class RelationTagsHandler extends EjbTagsHandler
   {
  @@ -50,15 +50,15 @@
        protected static RelationHolder currentRelation;
   
        /**
  -      * Evaluates the body if the left side of this relation has cascade-delete=yes
  +     * Evaluates the body if the left side of this relation has
  +     * cascade-delete=yes
         *
         * @param template              The body of the block tag
  -      * @exception xdoclet.XDocletException
  +     * @exception XDocletException
         */
        public void ifLeftCascadeDelete( String template ) throws XDocletException
        {
  -             if( currentRelation.isLeftCascadeDelete() )
  -             {
  +        if (currentRelation.isLeftCascadeDelete()) {
                        generate( template );
                }
        }
  @@ -69,12 +69,11 @@
         * cascade-delete="yes"
         *
         * @param template              The body of the block tag
  -      * @exception xdoclet.XDocletException
  +     * @exception XDocletException
         */
        public void ifRightCascadeDelete( String template ) throws XDocletException
        {
  -             if( currentRelation.isRightCascadeDelete() )
  -             {
  +        if (currentRelation.isRightCascadeDelete()) {
                        generate( template );
                }
        }
  @@ -83,16 +82,14 @@
         * Returns the EJB Name of the left side of this relationship
         *
         * @return                      Left side's EJB name
  -      * @exception xdoclet.XDocletException
  +     * @exception XDocletException
         */
        public String leftEJBName() throws XDocletException
        {
  -             if( currentRelation.getLeft() != null )
  -             {
  +        if (currentRelation.getLeft() != null) {
                        return EjbTagsHandler.getEjbNameFor( currentRelation.getLeft() 
);
                }
  -             else
  -             {
  +        else {
                        String name = getTagValue(
                                FOR_METHOD,
                                currentRelation.getRightMethod().doc(),
  @@ -112,16 +109,14 @@
         * Returns the EJB Name of the right side of this relationship
         *
         * @return                      Right side's EJB name
  -      * @exception xdoclet.XDocletException
  +     * @exception XDocletException
         */
        public String rightEJBName() throws XDocletException
        {
  -             if( currentRelation.getRight() != null )
  -             {
  +        if (currentRelation.getRight() != null) {
                        return EjbTagsHandler.getEjbNameFor( 
currentRelation.getRight() );
                }
  -             else
  -             {
  +        else {
                        String name = getTagValue(
                                FOR_METHOD,
                                currentRelation.getLeftMethod().doc(),
  @@ -138,56 +133,49 @@
        }
   
        /**
  -      * Evaluates the body if at least one of the classes has an ejb:relation tag,
  -      * otherwise not.
  +     * Evaluates the body if at least one of the classes has an ejb:relation
  +     * tag, otherwise not.
         *
         * @param template              The body of the block tag
  -      * @exception xdoclet.XDocletException  Description of Exception
  +     * @exception XDocletException
         */
        public void ifHasRelationships( String template ) throws XDocletException
        {
  -             try
  -             {
  +        try {
                        XClass[] classes = XJavaDoc.getInstance().sourceClasses();
                        boolean hasRelationships = false;
   
  -                     for( int i = 0; i < classes.length; i++ )
  -                     {
  +            for (int i = 0; i < classes.length; i++) {
                                setCurrentClass( classes[i] );
   
                                XMethod[] methods = classes[i].methods();
   
  -                             for( int j = 0; j < methods.length; j++ )
  -                             {
  +                for (int j = 0; j < methods.length; j++) {
                                        setCurrentMethod( methods[j] );
   
                                        XTag relation = methods[j].doc().tag( 
"ejb:relation" );
   
  -                                     if( relation != null )
  -                                     {
  +                    if (relation != null) {
                                                hasRelationships = true;
                                                break;
                                        }
                                }
  -                             if( hasRelationships )
  -                             {
  +                if (hasRelationships) {
                                        break;
                                }
                        }
  -                     if( hasRelationships )
  -                     {
  +            if (hasRelationships) {
                                generate( template );
                        }
                }
  -             catch( XJavaDocException e )
  -             {
  +        catch (XJavaDocException e) {
                        throw new XDocletException( e, e.getMessage() );
                }
        }
   
        /**
         * @return                      the name of the current relation
  -      * @exception xdoclet.XDocletException
  +     * @exception XDocletException
         */
        public String relationName() throws XDocletException
        {
  @@ -199,7 +187,7 @@
         * ejb:relation for the getter method of the cmr-field.
         *
         * @param template              The body of the block tag
  -      * @exception xdoclet.XDocletException  Description of Exception
  +     * @exception XDocletException
         * @see                         
src.xdoclet.modules.ejb.entity.CmpTagsHandler#isEntityCmp(xjavadoc.XClass)
         * @see                         
src.xdoclet.modules.ejb.entity.PersistentTagsHandler#isPersistentField(xjavadoc.XMethod)
         * @see                         
xdoclet.tagshandler.MethodTagsHandler#isGetter(java.lang.String)
  @@ -208,47 +196,40 @@
         */
        public void forAllRelationships( String template ) throws XDocletException
        {
  -             Category cat = Log.getCategory( RelationTagsHandler.class, 
"forAllRelationships" );
  +        Log log = LogUtil.getLog(RelationTagsHandler.class, "forAllRelationships");
   
                XClass[] classes = null;
   
  -             try
  -             {
  +        try {
                        classes = XJavaDoc.getInstance().sourceClasses();
                }
  -             catch( XJavaDocException e )
  -             {
  +        catch (XJavaDocException e) {
                        throw new XDocletException( e, e.getMessage() );
                }
   
                relationMap.clear();
   
  -             for( int i = 0; i < classes.length; i++ )
  -             {
  +        for (int i = 0; i < classes.length; i++) {
                        setCurrentClass( classes[i] );
   
                        XMethod[] methods = classes[i].methods();
   
  -                     for( int j = 0; j < methods.length; j++ )
  -                     {
  +            for (int j = 0; j < methods.length; j++) {
                                setCurrentMethod( methods[j] );
   
                                XTag relationTag = methods[j].doc().tag( 
"ejb:relation" );
   
  -                             if( relationTag != null )
  -                             {
  +                if (relationTag != null) {
                                        String relationName = 
relationTag.attributeValue( "name" );
   
  -                                     if( relationName == null )
  -                                     {
  +                    if (relationName == null) {
                                                throw new XDocletException( 
Translator.getString( "xdoclet.ejb.Messages",
                                                        "relation_must_have_name", new 
String[]{getCurrentClass().name()} ) );
                                        }
   
                                        RelationHolder relationHolder = ( 
RelationHolder ) relationMap.get( relationName );
   
  -                                     if( relationHolder != null && 
relationHolder.getLeft() != null && relationHolder.getRight() != null )
  -                                     {
  +                    if (relationHolder != null && relationHolder.getLeft() != null 
&& relationHolder.getRight() != null) {
                                                String leftSignature = 
relationHolder.getLeftMethod().containingClass().qualifiedName() + "." + 
relationHolder.getLeftMethod();
                                                String rightSignature = 
relationHolder.getRightMethod().containingClass().qualifiedName() + "." + 
relationHolder.getRightMethod();
                                                String currentSignature = 
methods[j].containingClass().qualifiedName() + "." + methods[j];
  @@ -262,11 +243,9 @@
                                                        } ) );
                                        }
   
  -                                     if( relationHolder == null )
  -                                     {
  -                                             if( cat.isDebugEnabled() )
  -                                             {
  -                                                     cat.debug( "Created new 
relationship for " + classes[i] + "." + methods[j] );
  +                    if (relationHolder == null) {
  +                        if (log.isDebugEnabled()) {
  +                            log.debug("Created new relationship for " + classes[i] 
+ "." + methods[j]);
                                                }
   
                                                relationHolder = new RelationHolder();
  @@ -274,11 +253,9 @@
                                                relationHolder.leftMethod = methods[j];
                                                relationMap.put( relationName, 
relationHolder );
                                        }
  -                                     else
  -                                     {
  -                                             if( cat.isDebugEnabled() )
  -                                             {
  -                                                     cat.debug( "Added " + 
classes[i] + " to relationship: " + relationHolder );
  +                    else {
  +                        if (log.isDebugEnabled()) {
  +                            log.debug("Added " + classes[i] + " to relationship: " 
+ relationHolder);
                                                }
                                                relationHolder.right = classes[i];
                                                relationHolder.rightMethod = 
methods[j];
  @@ -304,17 +281,14 @@
                // N<--1
                Iterator relations = relationMap.entrySet().iterator();
   
  -             while( relations.hasNext() )
  -             {
  +        while (relations.hasNext()) {
                        Map.Entry entry = ( Map.Entry ) relations.next();
                        RelationHolder relationHolder = ( RelationHolder ) 
entry.getValue();
   
  -                     if( relationHolder.isLeftMany() && 
!relationHolder.isRightMany() )
  -                     {
  +            if (relationHolder.isLeftMany() && !relationHolder.isRightMany()) {
                                // swap
  -                             if( cat.isDebugEnabled() )
  -                             {
  -                                     cat.debug( "Swapping left -> right in attempt 
to make 1-n be 1-n (rather than n-1)" );
  +                if (log.isDebugEnabled()) {
  +                    log.debug("Swapping left -> right in attempt to make 1-n be 1-n 
(rather than n-1)");
                                }
                                relationHolder.swap();
                        }
  @@ -323,8 +297,7 @@
                // Loop over all relations
                Iterator relationNameIterator = relationMap.keySet().iterator();
   
  -             while( relationNameIterator.hasNext() )
  -             {
  +        while (relationNameIterator.hasNext()) {
                        // The name is only needed to provide potential error messages.
                        String relationName = ( String ) relationNameIterator.next();
   
  @@ -360,9 +333,8 @@
   //                           }
   //                   }
   
  -                     if( cat.isDebugEnabled() )
  -                     {
  -                             cat.debug( "Generating template for Relation: " + 
currentRelation );
  +            if (log.isDebugEnabled()) {
  +                log.debug("Generating template for Relation: " + currentRelation);
                        }
                        generate( template );
                }
  @@ -372,15 +344,11 @@
         * Describe what the method does
         *
         * @param template              Describe what the parameter does
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public void ifIsLeftMany( String template ) throws XDocletException
        {
  -             if( currentRelation.isLeftMany() )
  -             {
  +        if (currentRelation.isLeftMany()) {
                        generate( template );
                }
        }
  @@ -389,15 +357,11 @@
         * Describe what the method does
         *
         * @param template              Describe what the parameter does
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public void ifIsRightMany( String template ) throws XDocletException
        {
  -             if( currentRelation.isRightMany() )
  -             {
  +        if (currentRelation.isRightMany()) {
                        generate( template );
                }
        }
  @@ -406,10 +370,7 @@
         * Describe what the method does
         *
         * @return                      Describe the return value
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for return value
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public String leftFieldName() throws XDocletException
        {
  @@ -420,10 +381,7 @@
         * Describe what the method does
         *
         * @return                      Describe the return value
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for return value
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public String rightFieldName() throws XDocletException
        {
  @@ -434,10 +392,7 @@
         * Describe what the method does
         *
         * @return                      Describe the return value
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for return value
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public String leftFieldType() throws XDocletException
        {
  @@ -448,10 +403,7 @@
         * Describe what the method does
         *
         * @return                      Describe the return value
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for return value
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public String rightFieldType() throws XDocletException
        {
  @@ -463,14 +415,13 @@
         * java.util.Collection or java.util.Set. Used by forAllRelationships.
         *
         * @param template              The body of the block tag
  -      * @exception xdoclet.XDocletException  Description of Exception
  +     * @exception XDocletException
         * @see                         #forAllRelationships(java.lang.String)
         * @doc:tag                     type="block"
         */
        public void ifIsNotACollection( String template ) throws XDocletException
        {
  -             if( !isSetOrCollection( MethodTagsHandler.getMethodTypeFor( 
getCurrentMethod() ) ) )
  -             {
  +        if 
(!isSetOrCollection(MethodTagsHandler.getMethodTypeFor(getCurrentMethod()))) {
                        generate( template );
                }
        }
  @@ -479,8 +430,6 @@
         * Describe what the method does
         *
         * @return         Describe the return value
  -      * @todo-javadoc   Write javadocs for method
  -      * @todo-javadoc   Write javadocs for return value
         */
        public String relationComment()
        {
  @@ -488,19 +437,18 @@
        }
   
        /**
  -      * Evaluates the body block if the current relationship is a one to one type,
  -      * meaning, neither side of the relation returns java.util.Collection or
  -      * java.util.Set. Used by forAllRelationships.
  +     * Evaluates the body block if the current relationship is a one to one
  +     * type, meaning, neither side of the relation returns java.util.Collection
  +     * or java.util.Set. Used by forAllRelationships.
         *
         * @param template              The body of the block tag
  -      * @exception xdoclet.XDocletException  Description of Exception
  +     * @exception XDocletException
         * @see                         #forAllRelationships(java.lang.String)
         * @doc:tag                     type="block"
         */
        public void ifIsOne2One( String template ) throws XDocletException
        {
  -             if( currentRelation.isOne2One() )
  -             {
  +        if (currentRelation.isOne2One()) {
                        generate( template );
                }
        }
  @@ -511,32 +459,30 @@
         * java.util.Collection or java.util.Set. Used by forAllRelationships.
         *
         * @param template              The body of the block tag
  -      * @exception xdoclet.XDocletException  Description of Exception
  +     * @exception XDocletException
         * @see                         #forAllRelationships(java.lang.String)
         * @doc:tag                     type="block"
         */
        public void ifNotIsOne2One( String template ) throws XDocletException
        {
  -             if( !currentRelation.isOne2One() )
  -             {
  +        if (!currentRelation.isOne2One()) {
                        generate( template );
                }
        }
   
        /**
  -      * Evaluates the body block if the current relationship is a one to many type,
  -      * meaning, ONLY ONE side of the relation returns java.util.Collection or
  -      * java.util.Set. Used by forAllRelationships.
  +     * Evaluates the body block if the current relationship is a one to many
  +     * type, meaning, ONLY ONE side of the relation returns java.util.Collection
  +     * or java.util.Set. Used by forAllRelationships.
         *
         * @param template              The body of the block tag
  -      * @exception xdoclet.XDocletException  Description of Exception
  +     * @exception XDocletException
         * @see                         #forAllRelationships(java.lang.String)
         * @doc:tag                     type="block"
         */
        public void ifIsOne2Many( String template ) throws XDocletException
        {
  -             if( currentRelation.isOne2Many() )
  -             {
  +        if (currentRelation.isOne2Many()) {
                        generate( template );
                }
        }
  @@ -547,50 +493,47 @@
         * java.util.Collection or java.util.Set. Used by forAllRelationships.
         *
         * @param template              The body of the block tag
  -      * @exception xdoclet.XDocletException  Description of Exception
  +     * @exception XDocletException
         * @see                         #forAllRelationships(java.lang.String)
         * @doc:tag                     type="block"
         */
        public void ifNotIsOne2Many( String template ) throws XDocletException
        {
  -             if( !currentRelation.isOne2Many() )
  -             {
  +        if (!currentRelation.isOne2Many()) {
                        generate( template );
                }
        }
   
        /**
  -      * Evaluates the body block if the current relationship is a many to many type,
  -      * meaning, both sides of the relation returns java.util.Collection or
  +     * Evaluates the body block if the current relationship is a many to many
  +     * type, meaning, both sides of the relation returns java.util.Collection or
         * java.util.Set. Used by forAllRelationships.
         *
         * @param template              The body of the block tag
  -      * @exception xdoclet.XDocletException  Description of Exception
  +     * @exception XDocletException
         * @see                         #forAllRelationships(java.lang.String)
         * @doc:tag                     type="block"
         */
        public void ifIsMany2Many( String template ) throws XDocletException
        {
  -             if( currentRelation.isMany2Many() )
  -             {
  +        if (currentRelation.isMany2Many()) {
                        generate( template );
                }
        }
   
        /**
  -      * Evaluates the body block if the current relationship IS NOT a many to many
  -      * type, meaning, at least one side of the relation does not return
  +     * Evaluates the body block if the current relationship IS NOT a many to
  +     * many type, meaning, at least one side of the relation does not return
         * java.util.Collection or java.util.Set. Used by forAllRelationships.
         *
         * @param template              The body of the block tag
  -      * @exception xdoclet.XDocletException  Description of Exception
  +     * @exception XDocletException
         * @see                         #forAllRelationships(java.lang.String)
         * @doc:tag                     type="block"
         */
        public void ifNotIsMany2Many( String template ) throws XDocletException
        {
  -             if( !currentRelation.isMany2Many() )
  -             {
  +        if (!currentRelation.isMany2Many()) {
                        generate( template );
                }
        }
  @@ -599,15 +542,11 @@
         * Describe what the method does
         *
         * @param template              Describe what the parameter does
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public void ifIsBidirectional( String template ) throws XDocletException
        {
  -             if( currentRelation.isBidirectional() )
  -             {
  +        if (currentRelation.isBidirectional()) {
                        generate( template );
                }
        }
  @@ -616,15 +555,11 @@
         * Describe what the method does
         *
         * @param template              Describe what the parameter does
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public void ifIsUnidirectional( String template ) throws XDocletException
        {
  -             if( !currentRelation.isBidirectional() )
  -             {
  +        if (!currentRelation.isBidirectional()) {
                        generate( template );
                }
        }
  @@ -633,15 +568,11 @@
         * Describe what the method does
         *
         * @param template              Describe what the parameter does
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public void ifHasLeftRoleName( String template ) throws XDocletException
        {
  -             if( leftRoleName() != null )
  -             {
  +        if (leftRoleName() != null) {
                        generate( template );
                }
        }
  @@ -650,15 +581,11 @@
         * Describe what the method does
         *
         * @param template              Describe what the parameter does
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public void ifHasRightRoleName( String template ) throws XDocletException
        {
  -             if( rightRoleName() != null )
  -             {
  +        if (rightRoleName() != null) {
                        generate( template );
                }
        }
  @@ -667,15 +594,11 @@
         * Describe what the method does
         *
         * @param template              Describe what the parameter does
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public void ifLeftNavigable( String template ) throws XDocletException
        {
  -             if( currentRelation.isLeftNavigable() )
  -             {
  +        if (currentRelation.isLeftNavigable()) {
                        generate( template );
                }
        }
  @@ -684,15 +607,11 @@
         * Describe what the method does
         *
         * @param template              Describe what the parameter does
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for method parameter
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public void ifRightNavigable( String template ) throws XDocletException
        {
  -             if( currentRelation.isRightNavigable() )
  -             {
  +        if (currentRelation.isRightNavigable()) {
                        generate( template );
                }
        }
  @@ -701,10 +620,7 @@
         * Describe what the method does
         *
         * @return                      Describe the return value
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for return value
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public String leftRoleName() throws XDocletException
        {
  @@ -715,10 +631,7 @@
         * Describe what the method does
         *
         * @return                      Describe the return value
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for return value
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public String rightRoleName() throws XDocletException
        {
  @@ -729,10 +642,7 @@
         * Describe what the method does
         *
         * @return                      Describe the return value
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for return value
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public String leftMultiplicity() throws XDocletException
        {
  @@ -743,10 +653,7 @@
         * Describe what the method does
         *
         * @return                      Describe the return value
  -      * @exception xdoclet.XDocletException  Describe the exception
  -      * @todo-javadoc                Write javadocs for method
  -      * @todo-javadoc                Write javadocs for return value
  -      * @todo-javadoc                Write javadocs for exception
  +     * @exception XDocletException
         */
        public String rightMultiplicity() throws XDocletException
        {
  @@ -773,30 +680,16 @@
         */
        public class RelationHolder
        {
  -             /**
  -              * @todo-javadoc   Describe the field
  -              */
                private final static String ONE = "One";
  -             /**
  -              * @todo-javadoc   Describe the field
  -              */
  +
                private final static String MANY = "Many";
   
  -             /**
  -              * @todo-javadoc   Describe the field
  -              */
                private XClass    left;
  -             /**
  -              * @todo-javadoc   Describe the field
  -              */
  +
                private XMethod   leftMethod;
  -             /**
  -              * @todo-javadoc   Describe the field
  -              */
  +
                private XClass    right;
  -             /**
  -              * @todo-javadoc   Describe the field
  -              */
  +
                private XMethod   rightMethod;
   
                /**
  @@ -813,8 +706,7 @@
                 * Gets the One2One attribute of the RelationHolder object
                 *
                 * @return                      The One2One value
  -              * @exception xdoclet.XDocletException  Describe the exception
  -              * @todo-javadoc                Write javadocs for exception
  +         * @exception XDocletException
                 */
                public boolean isOne2One() throws XDocletException
                {
  @@ -825,8 +717,7 @@
                 * Gets the One2Many attribute of the RelationHolder object
                 *
                 * @return                      The One2Many value
  -              * @exception xdoclet.XDocletException  Describe the exception
  -              * @todo-javadoc                Write javadocs for exception
  +         * @exception XDocletException
                 */
                public boolean isOne2Many() throws XDocletException
                {
  @@ -837,8 +728,7 @@
                 * Gets the Many2Many attribute of the RelationHolder object
                 *
                 * @return                      The Many2Many value
  -              * @exception xdoclet.XDocletException  Describe the exception
  -              * @todo-javadoc                Write javadocs for exception
  +         * @exception XDocletException
                 */
                public boolean isMany2Many() throws XDocletException
                {
  @@ -849,8 +739,7 @@
                 * Gets the LeftMultiplicity attribute of the RelationHolder object
                 *
                 * @return                      The LeftMultiplicity value
  -              * @exception xdoclet.XDocletException  Describe the exception
  -              * @todo-javadoc                Write javadocs for exception
  +         * @exception XDocletException
                 */
                public String getLeftMultiplicity() throws XDocletException
                {
  @@ -861,8 +750,7 @@
                 * Gets the RightMultiplicity attribute of the RelationHolder object
                 *
                 * @return                      The RightMultiplicity value
  -              * @exception xdoclet.XDocletException  Describe the exception
  -              * @todo-javadoc                Write javadocs for exception
  +         * @exception XDocletException
                 */
                public String getRightMultiplicity() throws XDocletException
                {
  @@ -933,19 +821,16 @@
                 * Gets the LeftRoleName attribute of the RelationHolder object
                 *
                 * @return                      The LeftRoleName value
  -              * @exception xdoclet.XDocletException  Describe the exception
  -              * @todo-javadoc                Write javadocs for exception
  +         * @exception XDocletException
                 */
                public String getLeftRoleName() throws XDocletException
                {
                        String result = null;
   
  -                     if( getLeftMethod() != null )
  -                     {
  +            if (getLeftMethod() != null) {
                                result = getLeftMethod().doc().tagAttributeValue( 
"ejb:relation", "role-name", false );
                        }
  -                     else
  -                     {
  +            else {
                                result = getRightMethod().doc().tagAttributeValue( 
"ejb:relation", "target-role-name", false );
                        }
                        return result;
  @@ -955,19 +840,16 @@
                 * Gets the RightRoleName attribute of the RelationHolder object
                 *
                 * @return                      The RightRoleName value
  -              * @exception xdoclet.XDocletException  Describe the exception
  -              * @todo-javadoc                Write javadocs for exception
  +         * @exception XDocletException
                 */
                public String getRightRoleName() throws XDocletException
                {
                        String result = null;
   
  -                     if( getRightMethod() != null )
  -                     {
  +            if (getRightMethod() != null) {
                                result = getRightMethod().doc().tagAttributeValue( 
"ejb:relation", "role-name", false );
                        }
  -                     else
  -                     {
  +            else {
                                result = getLeftMethod().doc().tagAttributeValue( 
"ejb:relation", "target-role-name", false );
                        }
                        return result;
  @@ -977,19 +859,16 @@
                 * Gets the LeftMany attribute of the RelationHolder object
                 *
                 * @return                      The LeftMany value
  -              * @exception xdoclet.XDocletException  Describe the exception
  -              * @todo-javadoc                Write javadocs for exception
  +         * @exception XDocletException
                 */
                public boolean isLeftMany() throws XDocletException
                {
                        boolean result;
   
  -                     if( getLeftMethod() != null )
  -                     {
  +            if (getLeftMethod() != null) {
                                result = isSetOrCollection( 
getLeftMethod().returnType().qualifiedName() );
                        }
  -                     else
  -                     {
  +            else {
                                String targetMultiple = 
getRightMethod().doc().tagAttributeValue( "ejb:relation", "target-multiple", false );
   
                                result = TypeConversionUtil.stringToBoolean( 
targetMultiple, false );
  @@ -1001,19 +880,16 @@
                 * Gets the RightMany attribute of the RelationHolder object
                 *
                 * @return                      The RightMany value
  -              * @exception xdoclet.XDocletException  Describe the exception
  -              * @todo-javadoc                Write javadocs for exception
  +         * @exception XDocletException
                 */
                public boolean isRightMany() throws XDocletException
                {
                        boolean result;
   
  -                     if( getRightMethod() != null )
  -                     {
  +            if (getRightMethod() != null) {
                                result = isSetOrCollection( 
getRightMethod().returnType().qualifiedName() );
                        }
  -                     else
  -                     {
  +            else {
                                String targetMultiple = 
getLeftMethod().doc().tagAttributeValue( "ejb:relation", "target-multiple", false );
   
                                result = TypeConversionUtil.stringToBoolean( 
targetMultiple, false );
  @@ -1025,19 +901,16 @@
                 * Gets the LeftCascadeDelete attribute of the RelationHolder object
                 *
                 * @return                      The LeftCascadeDelete value
  -              * @exception xdoclet.XDocletException  Describe the exception
  -              * @todo-javadoc                Write javadocs for exception
  +         * @exception XDocletException
                 */
                public boolean isLeftCascadeDelete() throws XDocletException
                {
                        boolean result;
   
  -                     if( getLeftMethod() != null )
  -                     {
  +            if (getLeftMethod() != null) {
                                result = isCascadeDelete( getLeftMethod(), 
"cascade-delete" );
                        }
  -                     else
  -                     {
  +            else {
                                result = isCascadeDelete( getRightMethod(), 
"target-cascade-delete" );
                        }
                        return result;
  @@ -1047,19 +920,16 @@
                 * Gets the RightCascadeDelete attribute of the RelationHolder object
                 *
                 * @return                      The RightCascadeDelete value
  -              * @exception xdoclet.XDocletException  Describe the exception
  -              * @todo-javadoc                Write javadocs for exception
  +         * @exception XDocletException
                 */
                public boolean isRightCascadeDelete() throws XDocletException
                {
                        boolean result;
   
  -                     if( getRightMethod() != null )
  -                     {
  +            if (getRightMethod() != null) {
                                result = isCascadeDelete( getRightMethod(), 
"cascade-delete" );
                        }
  -                     else
  -                     {
  +            else {
                                result = isCascadeDelete( getLeftMethod(), 
"target-cascade-delete" );
                        }
                        return result;
  @@ -1067,18 +937,16 @@
   
                /**
                 * @return                      the name of the relation
  -              * @exception xdoclet.XDocletException
  +         * @exception XDocletException
                 */
                public String getName() throws XDocletException
                {
                        String result = null;
   
  -                     if( getRightMethod() != null )
  -                     {
  +            if (getRightMethod() != null) {
                                result = getRightMethod().doc().tagAttributeValue( 
"ejb:relation", "name", false );
                        }
  -                     else
  -                     {
  +            else {
                                result = getLeftMethod().doc().tagAttributeValue( 
"ejb:relation", "name", false );
                        }
                        return result;
  @@ -1086,8 +954,6 @@
   
                /**
                 * Describe what the method does
  -              *
  -              * @todo-javadoc   Write javadocs for method
                 */
                public void swap()
                {
  @@ -1104,27 +970,21 @@
                 * Describe what the method does
                 *
                 * @return         Describe the return value
  -              * @todo-javadoc   Write javadocs for method
  -              * @todo-javadoc   Write javadocs for return value
                 */
                public int hashCode()
                {
                        int result = 17;
   
  -                     if( getLeft() != null )
  -                     {
  +            if (getLeft() != null) {
                                result = 37 * result + getLeft().hashCode();
                        }
  -                     if( getLeftMethod() != null )
  -                     {
  +            if (getLeftMethod() != null) {
                                result = 37 * result + getLeftMethod().hashCode();
                        }
  -                     if( getRight() != null )
  -                     {
  +            if (getRight() != null) {
                                result = 37 * result + getRight().hashCode();
                        }
  -                     if( getRightMethod() != null )
  -                     {
  +            if (getRightMethod() != null) {
                                result = 37 * result + getRightMethod().hashCode();
                        }
   
  @@ -1135,8 +995,6 @@
                 * Describe what the method does
                 *
                 * @return         Describe the return value
  -              * @todo-javadoc   Write javadocs for method
  -              * @todo-javadoc   Write javadocs for return value
                 */
                public String toString()
                {
  @@ -1148,19 +1006,14 @@
                 *
                 * @param o        Describe what the parameter does
                 * @return         Describe the return value
  -              * @todo-javadoc   Write javadocs for method
  -              * @todo-javadoc   Write javadocs for method parameter
  -              * @todo-javadoc   Write javadocs for return value
                 */
                public boolean equals( Object o )
                {
  -                     if( o == this )
  -                     {
  +            if (o == this) {
                                return true;
                        }
   
  -                     if( !( o instanceof RelationHolder ) )
  -                     {
  +            if (!(o instanceof RelationHolder)) {
                                return false;
                        }
   
  @@ -1179,10 +1032,7 @@
                 * @param method                Describe what the parameter does
                 * @param tag                   Describe what the parameter does
                 * @return                      The CascadeDelete value
  -              * @exception xdoclet.XDocletException  Describe the exception
  -              * @todo-javadoc                Write javadocs for method parameter
  -              * @todo-javadoc                Write javadocs for method parameter
  -              * @todo-javadoc                Write javadocs for exception
  +         * @exception XDocletException
                 */
                private boolean isCascadeDelete( XMethod method, String tag ) throws 
XDocletException
                {
  @@ -1200,7 +1050,5 @@
                                 );
                        return TypeConversionUtil.stringToBoolean( cd, false );
                }
  -
        }
  -
   }
  
  
  
  1.1.2.3   +151 -146  
xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/SecurityTagsHandler.java
  
  Index: SecurityTagsHandler.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/SecurityTagsHandler.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -w -r1.1.2.2 -r1.1.2.3
  --- SecurityTagsHandler.java  27 Apr 2002 13:53:37 -0000      1.1.2.2
  +++ SecurityTagsHandler.java  12 May 2002 13:53:27 -0000      1.1.2.3
  @@ -4,35 +4,35 @@
    */
   package xdoclet.modules.ejb.dd;
   
  -import xjavadoc.XJavaDoc;
  +import java.util.Arrays;
  +import java.util.HashSet;
  +import java.util.Iterator;
  +import java.util.Set;
   import xjavadoc.XClass;
  -import xjavadoc.XMethod;
  -import xjavadoc.XTag;
   import xjavadoc.XDoc;
  +
  +import xjavadoc.XJavaDoc;
   import xjavadoc.XJavaDocException;
  +import xjavadoc.XMethod;
  +import xjavadoc.XTag;
   
   import xdoclet.XDocletException;
  -import xdoclet.util.DocletUtil;
  -
  -import java.util.Arrays;
  -import java.util.HashSet;
  -import java.util.Iterator;
  -import java.util.Set;
   
   import xdoclet.modules.ejb.EjbTagsHandler;
   import xdoclet.modules.ejb.intf.InterfaceTagsHandler;
  +import xdoclet.util.DocletUtil;
   
   /**
  - * @xdoclet:taghandler namespace="EjbSec"
  - *
    * @author Ara Abrahamian ([EMAIL PROTECTED])
    * @created Oct 15, 2001
  - * @version $Revision: 1.1.2.2 $
  + * @xdoclet:taghandler   namespace="EjbSec"
  + * @version              $Revision: 1.1.2.3 $
    */
  -public class SecurityTagsHandler extends EjbTagsHandler {
  +public class SecurityTagsHandler extends EjbTagsHandler
  +{
        /**
  -      * The current security role name, set by forAllSecurityRoles and returned by
  -      * securityRoleName. It somehow is like the current index for the
  +     * The current security role name, set by forAllSecurityRoles and returned
  +     * by securityRoleName. It somehow is like the current index for the
         * forAllSecurityRoles loop.
         *
         * @see #forAllSecurityRoles(java.lang.String)
  @@ -46,31 +46,34 @@
         * forAllSecurityRoles.
         *
         * @return Current security role name
  -      * @exception xdoclet.XDocletException Description of Exception
  +     * @exception XDocletException
         * @see #forAllSecurityRoles(java.lang.String)
         * @doc:tag type="content"
         */
  -     public String securityRoleName() throws XDocletException {
  +    public String securityRoleName() throws XDocletException
  +    {
                return currentSecurityRoleName;
        }
   
   
        /**
  -      * Evaluates the body block for each ejb:permission defined in class level or
  -      * method level.
  +     * Evaluates the body block for each ejb:permission defined in class level
  +     * or method level.
         *
         * @param template The body of the block tag
  -      * @exception xdoclet.XDocletException Description of Exception
  +     * @exception XDocletException
         * @see #hasPermission(xjavadoc.XDoc)
         * @see #securityRoleName()
         * @doc:tag type="block"
         */
  -     public void forAllSecurityRoles(String template) throws XDocletException {
  +    public void forAllSecurityRoles(String template) throws XDocletException
  +    {
                XClass[] classes = null;
   
                try {
                        classes = XJavaDoc.getInstance().sourceClasses();
  -             } catch (XJavaDocException e) {
  +        }
  +        catch (XJavaDocException e) {
                        throw new XDocletException(e, e.getMessage());
                }
   
  @@ -152,12 +155,14 @@
         * Returns true if class/method denoted by doc has ejb:permission tag, false
         * otherwise.
         *
  -      * @todo Shouldn't this method rather be in SecurityTagsHandler?
         * @param doc Description of Parameter
         * @return Description of the Returned Value
  -      * @exception xdoclet.XDocletException Description of Exception
  +     * @exception XDocletException
  +     * @todo                        Shouldn't this method rather be in
  +     *      SecurityTagsHandler?
         */
  -     private boolean hasPermission(XDoc doc) throws XDocletException {
  +    private boolean hasPermission(XDoc doc) throws XDocletException
  +    {
                return doc.hasTag("ejb:permission");
        }
   }
  
  
  

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to