1 16 17 package org.apache.jetspeed.portal.expire; 18 19 import java.io.IOException ; 21 22 import org.apache.jetspeed.services.logging.JetspeedLogFactoryService; 24 import org.apache.jetspeed.services.logging.JetspeedLogger; 25 26 32 public class FileWatchExpire extends BaseExpire 33 { 34 35 38 private static final JetspeedLogger logger = JetspeedLogFactoryService.getLogger(FileWatchExpire.class.getName()); 39 40 FileWatcher fw = null; 41 42 48 public boolean isExpired() { 49 50 if ( this.fw != null ) { 51 return this.fw.hasChanged(); 52 } else { 53 return false; 54 } 55 56 57 } 58 59 63 public void setURL( String url ) { 64 try { 65 this.fw = new FileWatcher( url, this.getPortlet().getName() ); 66 } catch ( IOException e ) { 67 logger.error("Exception", e); 68 } 69 } 70 71 72 } 73 | Popular Tags |