private boolean fileChanged(boolean granted) { String name = getPolicyFileName(granted); File f = new File(name); return _fileChanged(granted,f); }
private boolean fileChanged(boolean granted) { String name = getPolicyFileName(granted); File f = new File(name); return _fileChanged(granted,f); }
/** * tests if policy file has arrived (via synchronization system). * if File exists, also checks last modified time, in case file was * not deleted on transition out of inservice state. Called when context * is not inService to determine if it was needs to be transitioned * because of file distribution. * @param granted selects granted or excluded policy file * @return true if new file has arrived. */ private boolean fileArrived(boolean granted) { String name = getPolicyFileName(granted); File f = new File(name); boolean rvalue = ( f.exists() && _fileChanged(granted,f) ); if (logger.isLoggable(Level.FINE)){ logger.fine("JACC Policy Provider: file arrival check" + " type: " + (granted? "granted " : "excluded ") + " arrived: " + rvalue + " exists: " + f.exists() + " lastModified: " + f.lastModified() + " storedTime: " + lastModTimes[(int) (granted ? 1 : 0)] + " state: " + (this.state == OPEN_STATE ? "open " : "deleted ") + CONTEXT_ID); } return rvalue; }
/** * tests if policy file has arrived (via synchronization system). * if File exists, also checks last modified time, in case file was * not deleted on transition out of inservice state. Called when context * is not inService to determine if it was needs to be transitioned * because of file distribution. * @param granted selects granted or excluded policy file * @return true if new file has arrived. */ private boolean fileArrived(boolean granted) { String name = getPolicyFileName(granted); File f = new File(name); boolean rvalue = ( f.exists() && _fileChanged(granted,f) ); if (logger.isLoggable(Level.FINE)){ logger.fine("JACC Policy Provider: file arrival check" + " type: " + (granted? "granted " : "excluded ") + " arrived: " + rvalue + " exists: " + f.exists() + " lastModified: " + f.lastModified() + " storedTime: " + lastModTimes[(int) (granted ? 1 : 0)] + " state: " + (this.state == OPEN_STATE ? "open " : "deleted ") + CONTEXT_ID); } return rvalue; }