ovidiu      02/01/18 16:49:49

  Modified:    src/java/org/apache/cocoon/sitemap Handler.java
  Log:
  Changed the visibility of the instance variables from private to
  protected. Removed the two argument constructor, and replaced with a
  no-arg one. This is to allow handlers to be created via introspection.
  
  Revision  Changes    Path
  1.3       +24 -17    xml-cocoon2/src/java/org/apache/cocoon/sitemap/Handler.java
  
  Index: Handler.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/sitemap/Handler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Handler.java      7 Jan 2002 12:34:13 -0000       1.2
  +++ Handler.java      19 Jan 2002 00:49:49 -0000      1.3
  @@ -42,48 +42,45 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Carsten Ziegeler</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Giacomo Pati</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2002/01/07 12:34:13 $
  + * @version CVS $Revision: 1.3 $ $Date: 2002/01/19 00:49:49 $
    */
   public class Handler extends AbstractLoggable
   implements Runnable, Contextualizable, Composable, Processor, Disposable, 
SourceResolver {
   
       /** the component manager */
  -    private ComponentManager manager;
  +    protected ComponentManager manager;
   
       /** the source of this sitemap */
  -    private String sourceFileName;
  -    private Source source;
  +    protected String sourceFileName;
  +    protected Source source;
   
       /** the last error */
  -    private Exception exception;
  +    protected Exception exception;
   
       /** the managed sitemap */
  -    private Sitemap sitemap = null;
  -    private boolean check_reload = true;
  +    protected Sitemap sitemap = null;
  +    protected boolean check_reload = true;
   
       /** the regenerating thread */
  -    private Thread regeneration;
  -    private volatile boolean isRegenerationRunning = false;
  -    private Source contextSource;
  +    protected Thread regeneration;
  +    protected volatile boolean isRegenerationRunning = false;
  +    protected Source contextSource;
   
       /** the sitemaps base path */
  -    private String basePath;
  +    protected String basePath;
   
       /** The source handler for the sitemap components */
  -    private SourceHandler sourceHandler;
  +    protected SourceHandler sourceHandler;
   
       // FIXME : ugly hack to pass delay information from the main sitemap 
configuration
       // (the way to pass it cleanly from SitemapManager isn't obvious).
  -    private static long sitemapCheckDelay = 10000L; // default is 10 secs.
  +    protected static long sitemapCheckDelay = 10000L; // default is 10 secs.
   
       static void setSitemapCheckDelay(long delay) {
           sitemapCheckDelay = delay;
       }
   
  -    protected Handler(String sourceFileName, boolean check_reload) throws 
FileNotFoundException {
  -        this.check_reload = check_reload;
  -        this.sourceFileName = sourceFileName;
  -    }
  +  public Handler() {}
   
       /**
        * Contextualizable
  @@ -100,6 +97,16 @@
           this.manager = manager;
           this.sourceHandler = (SourceHandler)manager.lookup(SourceHandler.ROLE);
       }
  +
  +  public void setSourceFileName(String sourceFileName)
  +  {
  +    this.sourceFileName = sourceFileName;
  +  }
  +
  +  public void setCheckReload(boolean check_reload)
  +  {
  +    this.check_reload = check_reload;
  +  }
   
       protected boolean available() {
           return (sitemap != null);
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to