Class 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 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

      • addProperty

        public void addProperty​(String key,
                                Object value)
      • getBoolean

        public boolean getBoolean​(String key)
      • getDouble

        public double getDouble​(String key)
      • getInt

        public int getInt​(String key)
      • getList

        public List<?> getList​(String key)
      • getLong

        public long getLong​(String key)
      • getShort

        public short getShort​(String key)
      • setProperty

        public void setProperty​(String key,
                                Object value)
      • setValue

        public final void setValue​(String value)
        Don't use this method if you can help it! Use setProperty instead.
        Overrides:
        setValue in class javax.servlet.http.Cookie
        Parameters:
        value - value