User: ara_e_w 
  Date: 02/05/31 13:43:58

  Modified:    modules/ejb/src/xdoclet/modules/ejb/intf
                        InterfaceTagsHandler.java
                        LocalInterfaceSubTask.java
                        RemoteInterfaceSubTask.java
  Log:
  @msg:bundle refactoring
  
  Revision  Changes    Path
  1.4       +9 -19     
xdoclet/modules/ejb/src/xdoclet/modules/ejb/intf/InterfaceTagsHandler.java
  
  Index: InterfaceTagsHandler.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/intf/InterfaceTagsHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- InterfaceTagsHandler.java 30 May 2002 18:39:03 -0000      1.3
  +++ InterfaceTagsHandler.java 31 May 2002 20:43:58 -0000      1.4
  @@ -13,17 +13,13 @@
   import xjavadoc.XJavaDoc;
   import xjavadoc.XJavaDocException;
   import xjavadoc.XMethod;
  -import xjavadoc.XTag;
   import xdoclet.DocletContext;
   
   import xdoclet.DocletTask;
  -import xdoclet.TemplateSubTask;
   import xdoclet.XDocletException;
  -import xdoclet.XDocletTagSupport;
   import xdoclet.modules.ejb.*;
   import xdoclet.modules.ejb.entity.EntityTagsHandler;
   import xdoclet.modules.ejb.home.HomeTagsHandler;
  -import xdoclet.tagshandler.ClassTagsHandler;
   import xdoclet.tagshandler.MethodTagsHandler;
   
   import xdoclet.util.LogUtil;
  @@ -34,7 +30,7 @@
    * @author               Ara Abrahamian ([EMAIL PROTECTED])
    * @created              Oct 15, 2001
    * @xdoclet:taghandler   namespace="EjbIntf"
  - * @version              $Revision: 1.3 $
  + * @version              $Revision: 1.4 $
    */
   public class InterfaceTagsHandler extends EjbTagsHandler
   {
  @@ -66,8 +62,7 @@
       {
           // validate type
           if (!"remote".equals(type) && !"local".equals(type)) {
  -            throw new 
XDocletException(Translator.getString("xdoclet.modules.ejb.Messages",
  -                "interface_invalid_type", new String[]{type}));
  +            throw new 
XDocletException(Translator.getString(XDocletModulesEjbMessages.class, 
XDocletModulesEjbMessages.INTERFACE_INVALID_TYPE, new String[]{type}));
           }
   
           String fileName = clazz.getContainingPackage().getName();
  @@ -141,9 +136,8 @@
        *
        * @param method                Description of Parameter
        * @return                      The RemoteMethod value
  -     * @exception XDocletException
        */
  -    public static boolean isComponentInterfaceMethod(XMethod method) throws 
XDocletException
  +    public static boolean isComponentInterfaceMethod(XMethod method)
       {
           return method.getDoc().hasTag("ejb:interface-method");
       }
  @@ -166,8 +160,7 @@
                   log.debug("return_type=" + return_type);
               }
               if (return_type == null) {
  -                throw new 
XDocletException(Translator.getString("xdoclet.modules.ejb.Messages",
  -                    "ask_for_bean_from_null_interface", new String[]{return_type}));
  +                throw new 
XDocletException(Translator.getString(XDocletModulesEjbMessages.class, 
XDocletModulesEjbMessages.ASK_FOR_BEAN_FROM_NULL_INTERFACE, new 
String[]{return_type}));
               }
   
               for (int i = 0; i < classes.length; i++) {
  @@ -361,8 +354,7 @@
           String intFace = attributes.getProperty("interface");
   
           if (intFace == null) {
  -            throw new 
XDocletException(Translator.getString("xdoclet.modules.ejb.Messages",
  -                "tag_missing_interface_parameter", new 
String[]{"<XDtEjbIntf:ifIsNotInterfaceMethod>"}));
  +            throw new 
XDocletException(Translator.getString(XDocletModulesEjbMessages.class, 
XDocletModulesEjbMessages.TAG_MISSING_INTERFACE_PARAMETER, new 
String[]{"<XDtEjbIntf:ifIsNotInterfaceMethod>"}));
           }
   
           if (!isInterfaceMethod(intFace)) {
  @@ -389,8 +381,7 @@
           boolean superclasses = TypeConversionUtil.stringToBoolean(superclasses_str, 
true);
   
           if (intf_view_type == null) {
  -            throw new 
XDocletException(Translator.getString("xdoclet.modules.ejb.Messages",
  -                "tag_missing_interface_parameter", new 
String[]{"<XDtEjbIntf:ifIsInterfaceMethod>"}));
  +            throw new 
XDocletException(Translator.getString(XDocletModulesEjbMessages.class, 
XDocletModulesEjbMessages.TAG_MISSING_INTERFACE_PARAMETER, new 
String[]{"<XDtEjbIntf:ifIsInterfaceMethod>"}));
           }
   
           if (isInterfaceMethod(intf_view_type)) {
  @@ -548,8 +539,7 @@
           String bean_class_name = getBeanClassNameFromInterfaceNameFor(return_type);
   
           if (bean_class_name == null) {
  -            throw new 
XDocletException(Translator.getString("xdoclet.modules.ejb.Messages",
  -                "interface_impl_not_found", new String[]{return_type}));
  +            throw new 
XDocletException(Translator.getString(XDocletModulesEjbMessages.class, 
XDocletModulesEjbMessages.INTERFACE_IMPL_NOT_FOUND, new String[]{return_type}));
           }
   
           return bean_class_name;
  
  
  
  1.5       +6 -8      
xdoclet/modules/ejb/src/xdoclet/modules/ejb/intf/LocalInterfaceSubTask.java
  
  Index: LocalInterfaceSubTask.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/intf/LocalInterfaceSubTask.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -r1.4 -r1.5
  --- LocalInterfaceSubTask.java        30 May 2002 18:39:03 -0000      1.4
  +++ LocalInterfaceSubTask.java        31 May 2002 20:43:58 -0000      1.5
  @@ -4,18 +4,16 @@
    */
   package xdoclet.modules.ejb.intf;
   
  -import java.io.File;
  -
   import org.apache.commons.logging.Log;
   
   import xjavadoc.XClass;
   import xjavadoc.XTag;
   
  -import xdoclet.TemplateSubTask;
   import xdoclet.XDocletException;
  -import xdoclet.XDocletTagSupport;
  +import xdoclet.XDocletMessages;
   
   import xdoclet.modules.ejb.AbstractEjbCodeGeneratorSubTask;
  +import xdoclet.modules.ejb.XDocletModulesEjbMessages;
   import xdoclet.modules.ejb.intf.InterfaceTagsHandler;
   import xdoclet.tagshandler.PackageTagsHandler;
   
  @@ -26,7 +24,7 @@
    * @author            Ara Abrahamian ([EMAIL PROTECTED])
    * @created           Oct 15, 2001
    * @xdoclet:subtask   display-name="Local Interface" name="localinterface" 
parent="xdoclet.modules.ejb.EjbDocletTask"
  - * @version           $Revision: 1.4 $
  + * @version           $Revision: 1.5 $
    */
   public class LocalInterfaceSubTask extends AbstractEjbCodeGeneratorSubTask
   {
  @@ -92,11 +90,11 @@
           super.validateOptions();
   
           if (getLocalClassPattern() == null || 
getLocalClassPattern().trim().equals("")) {
  -            throw new 
XDocletException(Translator.getString("parameter_missing_or_empty", new 
String[]{"pattern"}));
  +            throw new XDocletException(Translator.getString(XDocletMessages.class, 
XDocletMessages.PARAMETER_MISSING_OR_EMPTY, new String[]{"pattern"}));
           }
   
           if (getLocalClassPattern().indexOf("{0}") == -1) {
  -            throw new 
XDocletException(Translator.getString("xdoclet.modules.ejb.Messages", 
"pattern_has_no_placeholder"));
  +            throw new 
XDocletException(Translator.getString(XDocletModulesEjbMessages.class, 
XDocletModulesEjbMessages.PATTERN_HAS_NO_PLACEHOLDER));
           }
       }
   
  @@ -156,7 +154,7 @@
        */
       protected void engineStarted() throws XDocletException
       {
  -        System.out.println(Translator.getString("xdoclet.modules.ejb.Messages", 
"generating_local_for",
  +        System.out.println(Translator.getString(XDocletModulesEjbMessages.class, 
XDocletModulesEjbMessages.GENERATING_LOCAL_FOR,
               new String[]{getCurrentClass().getQualifiedName()}));
       }
   
  
  
  
  1.5       +6 -8      
xdoclet/modules/ejb/src/xdoclet/modules/ejb/intf/RemoteInterfaceSubTask.java
  
  Index: RemoteInterfaceSubTask.java
  ===================================================================
  RCS file: 
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/intf/RemoteInterfaceSubTask.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -r1.4 -r1.5
  --- RemoteInterfaceSubTask.java       30 May 2002 18:39:03 -0000      1.4
  +++ RemoteInterfaceSubTask.java       31 May 2002 20:43:58 -0000      1.5
  @@ -4,18 +4,16 @@
    */
   package xdoclet.modules.ejb.intf;
   
  -import java.io.File;
  -
   import org.apache.commons.logging.Log;
   
   import xjavadoc.XClass;
   import xjavadoc.XTag;
   
  -import xdoclet.TemplateSubTask;
   import xdoclet.XDocletException;
  -import xdoclet.XDocletTagSupport;
  +import xdoclet.XDocletMessages;
   
   import xdoclet.modules.ejb.AbstractEjbCodeGeneratorSubTask;
  +import xdoclet.modules.ejb.XDocletModulesEjbMessages;
   import xdoclet.modules.ejb.intf.InterfaceTagsHandler;
   import xdoclet.tagshandler.PackageTagsHandler;
   
  @@ -26,7 +24,7 @@
    * @author            Ara Abrahamian ([EMAIL PROTECTED])
    * @created           Oct 15, 2001
    * @xdoclet:subtask   display-name="Remote Interface" name="remoteinterface" 
parent="xdoclet.modules.ejb.EjbDocletTask"
  - * @version           $Revision: 1.4 $
  + * @version           $Revision: 1.5 $
    */
   public class RemoteInterfaceSubTask extends AbstractEjbCodeGeneratorSubTask
   {
  @@ -92,11 +90,11 @@
           super.validateOptions();
   
           if (getRemoteClassPattern() == null || 
getRemoteClassPattern().trim().equals("")) {
  -            throw new 
XDocletException(Translator.getString("parameter_missing_or_empty", new 
String[]{"pattern"}));
  +            throw new XDocletException(Translator.getString(XDocletMessages.class, 
XDocletMessages.PARAMETER_MISSING_OR_EMPTY, new String[]{"pattern"}));
           }
   
           if (getRemoteClassPattern().indexOf("{0}") == -1) {
  -            throw new 
XDocletException(Translator.getString("xdoclet.modules.ejb.Messages", 
"pattern_has_no_placeholder"));
  +            throw new 
XDocletException(Translator.getString(XDocletModulesEjbMessages.class, 
XDocletModulesEjbMessages.PATTERN_HAS_NO_PLACEHOLDER));
           }
       }
   
  @@ -156,7 +154,7 @@
        */
       protected void engineStarted() throws XDocletException
       {
  -        System.out.println(Translator.getString("xdoclet.modules.ejb.Messages", 
"generating_remote_for",
  +        System.out.println(Translator.getString(XDocletModulesEjbMessages.class, 
XDocletModulesEjbMessages.GENERATING_REMOTE_FOR,
               new String[]{getCurrentClass().getQualifiedName()}));
       }
   }
  
  
  

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

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

Reply via email to