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.CookieCookie 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 voidaddProperty(String key, Object value)booleangetBoolean(String key)doublegetDouble(String key)intgetInt(String key)Iterator<String>getKeys()List<?>getList(String key)longgetLong(String key)PropertiesgetProperties(String key)ObjectgetProperty(String key)shortgetShort(String key)StringgetString(String key)voidsetProperty(String key, Object value)voidsetValue(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.ConfigurationExceptionUsed 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:
setValuein classjavax.servlet.http.Cookie- Parameters:
value- value
-
-