Package ubic.gemma.web.util
Class ConfigurationCookie
- java.lang.Object
-
- javax.servlet.http.Cookie
-
- ubic.gemma.web.util.ConfigurationCookie
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class ConfigurationCookie extends javax.servlet.http.Cookie
Cookie class that also presents a commons configuration interface.- Author:
- pavlidis
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConfigurationCookie(String name)
Create a cookie with the given name.ConfigurationCookie(javax.servlet.http.Cookie cookie)
Used when loading cookies from the user.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProperty(String key, Object value)
boolean
getBoolean(String key)
double
getDouble(String key)
int
getInt(String key)
Iterator<String>
getKeys()
List<?>
getList(String key)
long
getLong(String key)
Properties
getProperties(String key)
Object
getProperty(String key)
short
getShort(String key)
String
getString(String key)
void
setProperty(String key, Object value)
void
setValue(String value)
Don't use this method if you can help it!
-
-
-
Constructor Detail
-
ConfigurationCookie
public ConfigurationCookie(javax.servlet.http.Cookie cookie) throws org.apache.commons.configuration2.ex.ConfigurationException
Used when loading cookies from the user.- Parameters:
cookie
- Must have been originally created as a ConfigurationCookie (or look just like one).- Throws:
org.apache.commons.configuration2.ex.ConfigurationException
- if the cookie cannot be converted.
-
ConfigurationCookie
public ConfigurationCookie(String name)
Create a cookie with the given name. The value should be populated using the setProperty() or addProperty() methods.- Parameters:
name
- name
-
-
Method Detail
-
getBoolean
public boolean getBoolean(String key)
-
getDouble
public double getDouble(String key)
-
getInt
public int getInt(String key)
-
getLong
public long getLong(String key)
-
getProperties
public Properties getProperties(String key)
-
getShort
public short getShort(String key)
-
setValue
public final void setValue(String value)
Don't use this method if you can help it! Use setProperty instead.- Overrides:
setValue
in classjavax.servlet.http.Cookie
- Parameters:
value
- value
-
-