Update of /cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12666/modules/ejb/src/xdoclet/modules/ejb/dd

Modified Files:
        EjbRefTagsHandler.java 
Log Message:
Set the same default value for the view-type parameter of ejb-ref and 
ejb-external-ref (XDT-1264). Removed code dupplication for default view type in 
ejb-ref.xdt

Index: EjbRefTagsHandler.java
===================================================================
RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/EjbRefTagsHandler.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** EjbRefTagsHandler.java      22 Aug 2004 11:48:00 -0000      1.16
--- EjbRefTagsHandler.java      4 Feb 2005 17:50:36 -0000       1.17
***************
*** 172,175 ****
--- 172,229 ----
  
      /**
+      * Generates code if the ejb-ref is local
+      *
+      * @param template
+      * @exception XDocletException
+      * @doc.tag                     type="block"
+      */
+     public void ifLocalEjbRef(String template) throws XDocletException
+     {
+         if (isLocalEjbRef(getCurrentClassTag())) {
+             generate(template);
+         }
+     }
+ 
+     /**
+      * Generates code if the ejb-ref is local
+      *
+      * @param template
+      * @exception XDocletException
+      * @doc.tag                     type="block"
+      */
+     public void ifRemoteEjbRef(String template) throws XDocletException
+     {
+         if (isRemoteEjbRef(getCurrentClassTag())) {
+             generate(template);
+         }
+     }
+ 
+     /**
+      * Return true if the ejb-ref is local
+      *
+      * @param ejbRefTag
+      * @return                      true if the ejb-ref is local otherwise 
false
+      * @exception XDocletException
+      */
+     protected boolean isLocalEjbRef(XTag ejbRefTag) throws XDocletException
+     {
+         String viewTypeParameter = ejbRefTag.getAttributeValue("view-type");
+ 
+         return "local".equals(viewTypeParameter);
+     }
+ 
+     /**
+      * Return true if the ejb-ref is remote
+      *
+      * @param ejbRefTag
+      * @return                      true if the ejb-ref is remote otherwise 
false
+      * @exception XDocletException
+      */
+     protected boolean isRemoteEjbRef(XTag ejbRefTag) throws XDocletException
+     {
+         return !isLocalEjbRef(ejbRefTag);
+     }
+ 
+     /**
       * Stores the id of current EJB for further use by other tags in 
referringClassId attribute.
       *



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to