org.tuckey.web.filters.urlrewrite
Class SetAttribute
java.lang.Object
org.tuckey.web.filters.urlrewrite.SetAttribute
public class SetAttribute
- extends java.lang.Object
- Version:
- $Revision: 12 $ $Date: 2006-08-20 20:53:09 +1200 (Sun, 20 Aug 2006) $
- Author:
- Paul Tuckey
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SetAttribute
public SetAttribute()
getType
public java.lang.String getType()
setType
public void setType(java.lang.String typeStr)
getError
public java.lang.String getError()
getDisplayName
public java.lang.String getDisplayName()
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
getValue
public java.lang.String getValue()
setValue
public void setValue(java.lang.String value)
execute
public void execute(ConditionMatch lastConditionMatch,
StringMatchingMatcher toMatcher,
javax.servlet.http.HttpServletRequest hsRequest,
javax.servlet.http.HttpServletResponse hsResponse)
initialise
public boolean initialise()
parseTimeValue
protected long parseTimeValue(java.lang.String parsingValue)
- takes a string a number expression and converts it to a long.
syntax: number type
Valid examples: "1 day", "2 days", "1 hour", "1 hour 2 minutes", "34 months"
Any positive number is valid
Valid types are: years, months, weeks, days, hours, minutes, seconds
note, this syntax is a direct copy of mod_expires syntax
http://httpd.apache.org/docs/2.0/mod/mod_expires.html
note, a year is calculated as 365.25 days and a month as 365.25 days divided by 12.