public long getFileLastModified(String path, boolean virtual) throws IOException { return ssiExternalResolver.getFileLastModified(path, virtual); }
public long getFileSize(String path, boolean virtual) throws IOException { return ssiExternalResolver.getFileSize(path, virtual); }
public String getFileText(String path, boolean virtual) throws IOException { return ssiExternalResolver.getFileText(path, virtual); }
protected void setDateVariables(boolean fromConstructor) { boolean alreadySet = ssiExternalResolver.getVariableValue(className + ".alreadyset") != null; //skip this if we are being called from the constructor, and this has // already // been set if (!(fromConstructor && alreadySet)) { ssiExternalResolver.setVariableValue(className + ".alreadyset", "true"); Date date = new Date(); TimeZone timeZone = TimeZone.getTimeZone("GMT"); String retVal = formatDate(date, timeZone); //If we are setting on of the date variables, we want to remove // them from the // user //defined list of variables, because this is what Apache does setVariableValue("DATE_GMT", null); ssiExternalResolver.setVariableValue(className + ".DATE_GMT", retVal); retVal = formatDate(date, null); setVariableValue("DATE_LOCAL", null); ssiExternalResolver.setVariableValue(className + ".DATE_LOCAL", retVal); retVal = formatDate(new Date(lastModifiedDate), null); setVariableValue("LAST_MODIFIED", null); ssiExternalResolver.setVariableValue(className + ".LAST_MODIFIED", retVal); } }
public void log(String message) { ssiExternalResolver.log(message, null); }
public void setVariableValue(String variableName, String variableValue) { if (!isNameReserved(variableName)) { ssiExternalResolver.setVariableValue(variableName, variableValue); } }
public Collection<String> getVariableNames() { Set<String> variableNames = new HashSet<>(); //These built-in variables are supplied by the mediator ( if not // over-written by // the user ) and always exist variableNames.add("DATE_GMT"); variableNames.add("DATE_LOCAL"); variableNames.add("LAST_MODIFIED"); ssiExternalResolver.addVariableNames(variableNames); //Remove any variables that are reserved by this class Iterator<String> iter = variableNames.iterator(); while (iter.hasNext()) { String name = iter.next(); if (isNameReserved(name)) { iter.remove(); } } return variableNames; }
public String getVariableValue(String variableName, String encoding) { String lowerCaseVariableName = variableName.toLowerCase(Locale.ENGLISH); String variableValue = null; if (!isNameReserved(lowerCaseVariableName)) { //Try getting it externally first, if it fails, try getting the // 'built-in' // value variableValue = ssiExternalResolver.getVariableValue(variableName); if (variableValue == null) { variableName = variableName.toUpperCase(Locale.ENGLISH); variableValue = ssiExternalResolver .getVariableValue(className + "." + variableName); } if (variableValue != null) { variableValue = encode(variableValue, encoding); } } return variableValue; }
protected void setDateVariables(boolean fromConstructor) { boolean alreadySet = ssiExternalResolver.getVariableValue(className + ".alreadyset") != null; //skip this if we are being called from the constructor, and this has // already // been set if (!(fromConstructor && alreadySet)) { ssiExternalResolver.setVariableValue(className + ".alreadyset", "true"); Date date = new Date(); TimeZone timeZone = TimeZone.getTimeZone("GMT"); String retVal = formatDate(date, timeZone); //If we are setting on of the date variables, we want to remove // them from the // user //defined list of variables, because this is what Apache does setVariableValue("DATE_GMT", null); ssiExternalResolver.setVariableValue(className + ".DATE_GMT", retVal); retVal = formatDate(date, null); setVariableValue("DATE_LOCAL", null); ssiExternalResolver.setVariableValue(className + ".DATE_LOCAL", retVal); retVal = formatDate(new Date(lastModifiedDate), null); setVariableValue("LAST_MODIFIED", null); ssiExternalResolver.setVariableValue(className + ".LAST_MODIFIED", retVal); } } }
public void log(String message, Throwable throwable) { ssiExternalResolver.log(message, throwable); }
public void setVariableValue(String variableName, String variableValue) { if (!isNameReserved(variableName)) { ssiExternalResolver.setVariableValue(variableName, variableValue); } }
public Collection<String> getVariableNames() { Set<String> variableNames = new HashSet<String>(); //These built-in variables are supplied by the mediator ( if not // over-written by // the user ) and always exist variableNames.add("DATE_GMT"); variableNames.add("DATE_LOCAL"); variableNames.add("LAST_MODIFIED"); ssiExternalResolver.addVariableNames(variableNames); //Remove any variables that are reserved by this class Iterator<String> iter = variableNames.iterator(); while (iter.hasNext()) { String name = iter.next(); if (isNameReserved(name)) { iter.remove(); } } return variableNames; }
public String getVariableValue(String variableName, String encoding) { String lowerCaseVariableName = variableName.toLowerCase(Locale.ENGLISH); String variableValue = null; if (!isNameReserved(lowerCaseVariableName)) { //Try getting it externally first, if it fails, try getting the // 'built-in' // value variableValue = ssiExternalResolver.getVariableValue(variableName); if (variableValue == null) { variableName = variableName.toUpperCase(Locale.ENGLISH); variableValue = ssiExternalResolver .getVariableValue(className + "." + variableName); } if (variableValue != null) { variableValue = encode(variableValue, encoding); } } return variableValue; }
protected void setDateVariables(boolean fromConstructor) { boolean alreadySet = ssiExternalResolver.getVariableValue(className + ".alreadyset") != null; //skip this if we are being called from the constructor, and this has // already // been set if (!(fromConstructor && alreadySet)) { ssiExternalResolver.setVariableValue(className + ".alreadyset", "true"); Date date = new Date(); TimeZone timeZone = TimeZone.getTimeZone("GMT"); String retVal = formatDate(date, timeZone); //If we are setting on of the date variables, we want to remove // them from the // user //defined list of variables, because this is what Apache does setVariableValue("DATE_GMT", null); ssiExternalResolver.setVariableValue(className + ".DATE_GMT", retVal); retVal = formatDate(date, null); setVariableValue("DATE_LOCAL", null); ssiExternalResolver.setVariableValue(className + ".DATE_LOCAL", retVal); retVal = formatDate(new Date(lastModifiedDate), null); setVariableValue("LAST_MODIFIED", null); ssiExternalResolver.setVariableValue(className + ".LAST_MODIFIED", retVal); } } }
public void log(String message, Throwable throwable) { ssiExternalResolver.log(message, throwable); }
public void setVariableValue(String variableName, String variableValue) { if (!isNameReserved(variableName)) { ssiExternalResolver.setVariableValue(variableName, variableValue); } }
public long getFileLastModified(String path, boolean virtual) throws IOException { return ssiExternalResolver.getFileLastModified(path, virtual); }
public String getFileText(String path, boolean virtual) throws IOException { return ssiExternalResolver.getFileText(path, virtual); }
public long getFileSize(String path, boolean virtual) throws IOException { return ssiExternalResolver.getFileSize(path, virtual); }
public Collection<String> getVariableNames() { Set<String> variableNames = new HashSet<String>(); //These built-in variables are supplied by the mediator ( if not // over-written by // the user ) and always exist variableNames.add("DATE_GMT"); variableNames.add("DATE_LOCAL"); variableNames.add("LAST_MODIFIED"); ssiExternalResolver.addVariableNames(variableNames); //Remove any variables that are reserved by this class Iterator<String> iter = variableNames.iterator(); while (iter.hasNext()) { String name = iter.next(); if (isNameReserved(name)) { iter.remove(); } } return variableNames; }