public class HttpCookiesPropertyIO extends AbstractHttpPropertyIO
HttpServletResponse.addCookie(...).DEFAULT_PARAMETER_VALUES_DIVIDER| Constructor and Description |
|---|
HttpCookiesPropertyIO(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
Constructor.
|
HttpCookiesPropertyIO(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse,
boolean readonly) |
| Modifier and Type | Method and Description |
|---|---|
javax.servlet.http.Cookie |
getCookie(Property<?> property)
Gets a Cookie by its Property .
|
javax.servlet.http.Cookie |
getCookie(String propertyName)
Gets a Cookie by its Property name.
|
javax.servlet.http.Cookie |
getCookieForUpdate(Property<?> property)
Gets a Cookie by its name and adds it to the HttpServletResponse if found.
|
javax.servlet.http.Cookie |
getCookieForUpdate(String propertyName)
Gets a Cookie by its name and adds it to the HttpServletResponse if found.
|
javax.servlet.http.HttpServletResponse |
getHttpServletResponse()
The HttpServletResponse which was provided in the constructor.
|
String |
getName()
A short descriptive name of the Property IO.
|
Properties |
getProperties()
Gets all the name,value pair in a Properties class instance.
|
void |
setValue(String propertyName,
String value)
Sets the name,value as String in the IO.
|
void |
validate()
Validates the IO.
|
addHttpRequestHeadersProperties, addHttpRequestParamsProperties, getHttpServletRequest, getParameterValuesDivider, getSourcebackup, getCacheTime, getLastLoaded, getLastSaved, getLogger, getTypedProperties, getTypedValue, getValue, isCached, isReadonly, logPerformanceGetProperties, logPerformanceSetValue, reload, setCacheTime, storeTypedValue, updateLastLoaded, updateLastSaved, validateWritablepublic HttpCookiesPropertyIO(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
httpServletRequest - the HttpServletRequest context to get the cookies.httpServletResponse - the HttpServletResponse where to add new cookies if they are not defined.public HttpCookiesPropertyIO(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse,
boolean readonly)
public javax.servlet.http.HttpServletResponse getHttpServletResponse()
public String getName()
PropertyIOpublic void setValue(String propertyName, String value) throws PropertyIOException
PropertyIOpropertyName - the name of the propertyvalue - the string value of the property.PropertyIOException - if the IO is readonly or failed to write the value.public void validate()
throws PropertyIOException
AbstractHttpPropertyIOvalidate in interface PropertyIOvalidate in class AbstractHttpPropertyIOPropertyIOExceptionpublic Properties getProperties()
PropertyIOPropertiespublic final javax.servlet.http.Cookie getCookie(String propertyName)
propertyName - the name of Cookie.null is returned.public final javax.servlet.http.Cookie getCookie(Property<?> property)
property - the propertynull is returned.public final javax.servlet.http.Cookie getCookieForUpdate(String propertyName)
propertyName - the name of Cookie.null is returned.public final javax.servlet.http.Cookie getCookieForUpdate(Property<?> property)
property - the propertynull is returned.