Update of 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-xwork/src/main/java/org/xdoclet/plugin/xwork
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30549/src/main/java/org/xdoclet/plugin/xwork

Modified Files:
        XWorkXMLPlugin.java 
Log Message:
fixed docmentation


Index: XWorkXMLPlugin.java
===================================================================
RCS file: 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-xwork/src/main/java/org/xdoclet/plugin/xwork/XWorkXMLPlugin.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** XWorkXMLPlugin.java 12 Apr 2006 18:18:11 -0000      1.6
--- XWorkXMLPlugin.java 12 Apr 2006 18:45:19 -0000      1.7
***************
*** 76,132 ****
        }
  
-       void processEntity(AbstractInheritableJavaEntity entity) {
-               DocletTag tag;
-               Object currentConfigObject = null;
-               Action currentAction = null;
-               for (int i = 0; i < entity.getTags().length; i++) {
-                       tag = entity.getTags()[i];
-                       // in this case we initialize action config
-                       // and wire it to package
-                       if (tag instanceof XworkActionTag) {
- 
-                               currentAction = new 
Action(entity,(XworkActionTag) tag);
- 
-                               // check whether we like this action in our 
package
-                               // we take it if package matches ( or not 
specified )
-                               if (currentAction.getPackageName() == null
-                                               || 
currentAction.getPackageName().equals(
-                                                               getPackage())) {
-                                       // fine, we take this action
-                                       actions.add(currentAction);
-                               }
-                               currentConfigObject = currentAction;
-                       } else if (tag instanceof XworkResultTag) {
-                               // result applies to an action
-                               if (currentAction != null) {
-                                       Result result = new 
Result((XworkResultTag) tag);
-                                       currentAction.addResult(result);
-                                       currentConfigObject = result;
-                               }
-                       } else if (tag instanceof XworkParamTag) {
-                               // param tag generally applies to current 
paramtetrizable
-                               // object
-                               if (currentConfigObject instanceof 
Parametrizable) {
-                                       ((Parametrizable) 
currentConfigObject).addParam(
-                                                       ((XworkParamTag) 
tag).getName_(),
-                                                       ((XworkParamTag) 
tag).getValue_());
-                               }
-                       } else if( tag instanceof XworkInterceptorRefTag ){
-                               if(currentAction  != null) {
-                                       
-                                       InterceptorRef ref = new 
InterceptorRef((XworkInterceptorRefTag) tag);
-                                       currentAction.addInterceptorRef(ref);
-                                       currentConfigObject = ref;
-                               }
-                       } else if( tag instanceof XworkExceptionMappingTag ){
-                               if(currentAction  != null) {
-                                       ExceptionMapping mapping = new 
ExceptionMapping((XworkExceptionMappingTag) tag);
-                                       
currentAction.addExceptionMapping(mapping);
-                                       currentConfigObject = mapping;
-                               }
-                       }
- 
-               }
-       }
        /**
         * create package model from metadata provider
--- 76,79 ----
***************
*** 140,149 ****
                        clazz = (JavaClass) iter.next();
                        processEntity(clazz);
!                       
!                       for(int i = 0; i < clazz.getMethods().length; i++) {
                                method = clazz.getMethods()[i];
!                               
System.err.println(method.getReturns().getJavaClass().getName());
!                               
if(method.getReturns().getJavaClass().getName().equals("String") && 
method.getParameters().length == 0)  {
!                                       // our candidate methods return string 
and have no parameters
                                        processEntity(method);
                                }
--- 87,100 ----
                        clazz = (JavaClass) iter.next();
                        processEntity(clazz);
! 
!                       for (int i = 0; i < clazz.getMethods().length; i++) {
                                method = clazz.getMethods()[i];
!                               System.err
!                                               
.println(method.getReturns().getJavaClass().getName());
!                               if 
(method.getReturns().getJavaClass().getName().equals(
!                                               "String")
!                                               && 
method.getParameters().length == 0) {
!                                       // our candidate methods return string 
and have no
!                                       // parameters
                                        processEntity(method);
                                }
***************
*** 152,155 ****
--- 103,114 ----
        }
  
+       /**
+        * whether generated package shall be declared as abstract
+        * @return
+        */
+       public boolean getAbstract() {
+               return _abstract;
+       }
+ 
        public List getActions() {
                return actions;
***************
*** 158,161 ****
--- 117,121 ----
        /**
         * parent of this package
+        * 
         * @return
         */
***************
*** 175,178 ****
--- 135,139 ----
        /**
         * merge file for basic setings
+        * 
         * @return
         */
***************
*** 183,186 ****
--- 144,148 ----
        /**
         * namespace of pckage
+        * 
         * @return
         */
***************
*** 191,194 ****
--- 153,157 ----
        /**
         * package name
+        * 
         * @return
         */
***************
*** 197,231 ****
        }
  
        /**
         * whether generated package shall be declared as abstract 
!        * @return
         */
-       public boolean getAbstract() {
-               return _abstract;
-       }
        public void setAbstract(boolean _abstract) {
                this._abstract = _abstract;
        }
  
!       public void setActions(List actions) {
                this.actions = actions;
        }
  
        public void setExtends(String _extends) {
                this._extends = _extends;
        }
  
        public void setFilename(String value) {
                this.fileName = value;
        }
  
        public void setMergefile(File value) {
                this.mergeFile = value;
        }
  
        public void setNamespace(String namespace) {
                this.namespace = namespace;
        }
  
        public void setPackage(String _package) {
                this._package = _package;
--- 160,272 ----
        }
  
+       void processEntity(AbstractInheritableJavaEntity entity) {
+               DocletTag tag;
+               Object currentConfigObject = null;
+               Action currentAction = null;
+               for (int i = 0; i < entity.getTags().length; i++) {
+                       tag = entity.getTags()[i];
+                       // in this case we initialize action config
+                       // and wire it to package
+                       if (tag instanceof XworkActionTag) {
+ 
+                               currentAction = new Action(entity, 
(XworkActionTag) tag);
+ 
+                               // check whether we like this action in our 
package
+                               // we take it if package matches ( or not 
specified )
+                               if (currentAction.getPackageName() == null
+                                               || 
currentAction.getPackageName().equals(getPackage())) {
+                                       // fine, we take this action
+                                       actions.add(currentAction);
+                               }
+                               currentConfigObject = currentAction;
+                       } else if (tag instanceof XworkResultTag) {
+                               // result applies to an action
+                               if (currentAction != null) {
+                                       Result result = new 
Result((XworkResultTag) tag);
+                                       currentAction.addResult(result);
+                                       currentConfigObject = result;
+                               }
+                       } else if (tag instanceof XworkParamTag) {
+                               // param tag generally applies to current 
paramtetrizable
+                               // object
+                               if (currentConfigObject instanceof 
Parametrizable) {
+                                       ((Parametrizable) 
currentConfigObject).addParam(
+                                                       ((XworkParamTag) 
tag).getName_(),
+                                                       ((XworkParamTag) 
tag).getValue_());
+                               }
+                       } else if (tag instanceof XworkInterceptorRefTag) {
+                               if (currentAction != null) {
+ 
+                                       InterceptorRef ref = new InterceptorRef(
+                                                       
(XworkInterceptorRefTag) tag);
+                                       currentAction.addInterceptorRef(ref);
+                                       currentConfigObject = ref;
+                               }
+                       } else if (tag instanceof XworkExceptionMappingTag) {
+                               if (currentAction != null) {
+                                       ExceptionMapping mapping = new 
ExceptionMapping(
+                                                       
(XworkExceptionMappingTag) tag);
+                                       
currentAction.addExceptionMapping(mapping);
+                                       currentConfigObject = mapping;
+                               }
+                       }
+ 
+               }
+       }
+ 
        /**
         * whether generated package shall be declared as abstract 
!        * @generama.property
!        * @param _abstract
         */
        public void setAbstract(boolean _abstract) {
                this._abstract = _abstract;
        }
  
!        void setActions(List actions) {
                this.actions = actions;
        }
  
+        /**
+         * which package shall be extendet
+         * @generama.property
+         * @param _extends
+         */
        public void setExtends(String _extends) {
                this._extends = _extends;
        }
  
+       /**
+        * destination file name
+        * @generama.property default="xwork.xml"
+        * @param value
+        */
        public void setFilename(String value) {
                this.fileName = value;
        }
  
+       /**
+        * contents of this file will be merged. shall be relative to basedir
+        * @generama.property
+        * @param value
+        */
        public void setMergefile(File value) {
                this.mergeFile = value;
        }
  
+       /**
+        * plugin namespace
+        * @generama.property
+        * @param namespace
+        */
        public void setNamespace(String namespace) {
                this.namespace = namespace;
        }
  
+       /**
+        * specifies package name
+        * @generama.property
+        * @param _package
+        */
        public void setPackage(String _package) {
                this._package = _package;



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
xdoclet-plugins-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-commits

Reply via email to