upayavira    2003/06/04 07:19:10

  Modified:    src/java/org/apache/cocoon Constants.java
               src/java/org/apache/cocoon/bean CocoonBean.java
  Log:
  Moved all comments back from CocoonBean to Contants. Oh well.
  
  Revision  Changes    Path
  1.7       +21 -1     cocoon-2.1/src/java/org/apache/cocoon/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/Constants.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Constants.java    4 Jun 2003 13:48:50 -0000       1.6
  +++ Constants.java    4 Jun 2003 14:19:08 -0000       1.7
  @@ -276,6 +276,26 @@
        */
       public static final String INDEX_URI = "index";
   
  +    /**
  +     * The directory to use as context root.
  +     */
  +    public static final String DEFAULT_CONTEXT_DIR = "./webapp";
  +
  +    /**
  +     * The diretory to use to use for the generated output.
  +     */
  +    public static final String DEFAULT_DEST_DIR = "./site";
  +
  +    /**
  +     * The diretory to use for generated files.
  +     */
  +    public static final String DEFAULT_WORK_DIR = "./work";
  +
  +    /**
  +     * How a default configuration file is named.
  +     */
  +    public static final String DEFAULT_CONF_FILE = "cocoon.xconf";
  +
       /** The namespace URI for the Error/Exception XML */
       public static final String ERROR_NAMESPACE_URI = 
"http://apache.org/cocoon/error/"; + CONF_VERSION;
   
  
  
  
  1.8       +7 -27     cocoon-2.1/src/java/org/apache/cocoon/bean/CocoonBean.java
  
  Index: CocoonBean.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/bean/CocoonBean.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CocoonBean.java   4 Jun 2003 13:48:50 -0000       1.7
  +++ CocoonBean.java   4 Jun 2003 14:19:09 -0000       1.8
  @@ -113,28 +113,8 @@
       protected static final String DEFAULT_USER_AGENT = Constants.COMPLETE_NAME;
       protected static final String DEFAULT_ACCEPT = "text/html, */*";
   
  -    /**
  -     * The directory to use as context root.
  -     */
  -    public static final String DEFAULT_CONTEXT_DIR = "./webapp";
  -
  -    /**
  -     * The diretory to use to use for the generated output.
  -     */
  -    public static final String DEFAULT_DEST_DIR = "./site";
  -
  -    /**
  -     * The diretory to use for generated files.
  -     */
  -    public static final String DEFAULT_WORK_DIR = "./work";
  -
  -    /**
  -     * How a default configuration file is named.
  -     */
  -    public static final String DEFAULT_CONF_FILE = "cocoon.xconf";
  -
       // User Supplied Parameters
  -    private String contextDir = CocoonBean.DEFAULT_CONTEXT_DIR;
  +    private String contextDir = Constants.DEFAULT_CONTEXT_DIR;
       private String configFile = null;
   
       private String brokenLinkReportFile = null;
  @@ -142,7 +122,7 @@
       private boolean brokenLinkGenerate = false;
       private String brokenLinkExtension = "";
   
  -    private String workDir = CocoonBean.DEFAULT_WORK_DIR;
  +    private String workDir = Constants.DEFAULT_WORK_DIR;
       private String logKit = null;
       private String logger = null;
       private String userAgent = DEFAULT_USER_AGENT;
  @@ -282,15 +262,15 @@
       private static File getConfigurationFile(File dir, String configFile) throws 
IOException {
           File conf;
           if (configFile == null) {
  -            conf = tryConfigurationFile(dir + File.separator + 
CocoonBean.DEFAULT_CONF_FILE);
  +            conf = tryConfigurationFile(dir + File.separator + 
Constants.DEFAULT_CONF_FILE);
               if (conf == null) {
  -                conf = tryConfigurationFile(dir + File.separator + "WEB-INF" + 
File.separator + CocoonBean.DEFAULT_CONF_FILE);
  +                conf = tryConfigurationFile(dir + File.separator + "WEB-INF" + 
File.separator + Constants.DEFAULT_CONF_FILE);
               }
               if (conf == null) {
  -                conf = tryConfigurationFile(System.getProperty("user.dir") + 
File.separator + CocoonBean.DEFAULT_CONF_FILE);
  +                conf = tryConfigurationFile(System.getProperty("user.dir") + 
File.separator + Constants.DEFAULT_CONF_FILE);
               }
               if (conf == null) {
  -                conf = tryConfigurationFile("/usr/local/etc/" + 
CocoonBean.DEFAULT_CONF_FILE);
  +                conf = tryConfigurationFile("/usr/local/etc/" + 
Constants.DEFAULT_CONF_FILE);
               }
           } else {
               conf = new File(configFile);
  
  
  

Reply via email to