com.atlassian.user.impl.cache.properties
Class CachedPropertySet

java.lang.Object
  extended bycom.atlassian.user.impl.cache.properties.CachedPropertySet
All Implemented Interfaces:
com.opensymphony.module.propertyset.PropertySet, java.io.Serializable

public class CachedPropertySet
extends java.lang.Object
implements com.opensymphony.module.propertyset.PropertySet, java.io.Serializable

CachedPropertySet provides a fast cache of properties read to and written from a decorated PropertySet. The CachedPropertySet is Serializable but relies on the decorated PropertySet also being Serializable.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.opensymphony.module.propertyset.PropertySet
BOOLEAN, DATA, DATE, DOUBLE, INT, LONG, OBJECT, PROPERTIES, STRING, TEXT, XML
 
Constructor Summary
CachedPropertySet()
           
 
Method Summary
 boolean exists(java.lang.String key)
           
 java.lang.Object getAsActualType(java.lang.String key)
           
 boolean getBoolean(java.lang.String key)
           
 byte[] getData(java.lang.String key)
           
 java.util.Date getDate(java.lang.String key)
           
 double getDouble(java.lang.String key)
           
 int getInt(java.lang.String key)
           
 java.util.Collection getKeys()
           
 java.util.Collection getKeys(int type)
           
 java.util.Collection getKeys(java.lang.String prefix)
           
 java.util.Collection getKeys(java.lang.String prefix, int type)
           
 long getLong(java.lang.String key)
           
 java.lang.Object getObject(java.lang.String key)
           
 java.util.Properties getProperties(java.lang.String key)
           
 com.opensymphony.module.propertyset.PropertySetSchema getSchema()
           
 java.lang.String getString(java.lang.String key)
           
 java.lang.String getText(java.lang.String key)
           
 int getType(java.lang.String key)
           
 org.w3c.dom.Document getXML(java.lang.String key)
           
 void init(java.util.Map config, java.util.Map args)
          Initialise this object's fields.
 boolean isSettable(java.lang.String property)
           
 void remove(java.lang.String key)
           
 void setAsActualType(java.lang.String key, java.lang.Object value)
           
 void setBoolean(java.lang.String key, boolean value)
           
 void setData(java.lang.String key, byte[] value)
           
 void setDate(java.lang.String key, java.util.Date value)
           
 void setDouble(java.lang.String key, double value)
           
 void setInt(java.lang.String key, int value)
           
 void setLong(java.lang.String key, long value)
           
 void setObject(java.lang.String key, java.lang.Object value)
           
 void setProperties(java.lang.String key, java.util.Properties value)
           
 void setSchema(com.opensymphony.module.propertyset.PropertySetSchema schema)
           
 void setString(java.lang.String key, java.lang.String value)
           
 void setText(java.lang.String key, java.lang.String value)
           
 void setXML(java.lang.String key, org.w3c.dom.Document value)
           
 boolean supportsType(int type)
           
 boolean supportsTypes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedPropertySet

public CachedPropertySet()
Method Detail

init

public void init(java.util.Map config,
                 java.util.Map args)
Initialise this object's fields. Args required are:

Specified by:
init in interface com.opensymphony.module.propertyset.PropertySet

setAsActualType

public void setAsActualType(java.lang.String key,
                            java.lang.Object value)
                     throws com.opensymphony.module.propertyset.PropertyException
Specified by:
setAsActualType in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getAsActualType

public java.lang.Object getAsActualType(java.lang.String key)
                                 throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getAsActualType in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

setBoolean

public void setBoolean(java.lang.String key,
                       boolean value)
                throws com.opensymphony.module.propertyset.PropertyException
Specified by:
setBoolean in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getBoolean

public boolean getBoolean(java.lang.String key)
                   throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getBoolean in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

setData

public void setData(java.lang.String key,
                    byte[] value)
             throws com.opensymphony.module.propertyset.PropertyException
Specified by:
setData in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getData

public byte[] getData(java.lang.String key)
               throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getData in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

setDate

public void setDate(java.lang.String key,
                    java.util.Date value)
             throws com.opensymphony.module.propertyset.PropertyException
Specified by:
setDate in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getDate

public java.util.Date getDate(java.lang.String key)
                       throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getDate in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

setDouble

public void setDouble(java.lang.String key,
                      double value)
               throws com.opensymphony.module.propertyset.PropertyException
Specified by:
setDouble in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getDouble

public double getDouble(java.lang.String key)
                 throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getDouble in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

setInt

public void setInt(java.lang.String key,
                   int value)
            throws com.opensymphony.module.propertyset.PropertyException
Specified by:
setInt in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getInt

public int getInt(java.lang.String key)
           throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getInt in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getKeys

public java.util.Collection getKeys()
                             throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getKeys in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getKeys

public java.util.Collection getKeys(int type)
                             throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getKeys in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getKeys

public java.util.Collection getKeys(java.lang.String prefix)
                             throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getKeys in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getKeys

public java.util.Collection getKeys(java.lang.String prefix,
                                    int type)
                             throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getKeys in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

setLong

public void setLong(java.lang.String key,
                    long value)
             throws com.opensymphony.module.propertyset.PropertyException
Specified by:
setLong in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getLong

public long getLong(java.lang.String key)
             throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getLong in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

setObject

public void setObject(java.lang.String key,
                      java.lang.Object value)
               throws com.opensymphony.module.propertyset.PropertyException
Specified by:
setObject in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getObject

public java.lang.Object getObject(java.lang.String key)
                           throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getObject in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

setProperties

public void setProperties(java.lang.String key,
                          java.util.Properties value)
                   throws com.opensymphony.module.propertyset.PropertyException
Specified by:
setProperties in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getProperties

public java.util.Properties getProperties(java.lang.String key)
                                   throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getProperties in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

setSchema

public void setSchema(com.opensymphony.module.propertyset.PropertySetSchema schema)
               throws com.opensymphony.module.propertyset.PropertyException
Specified by:
setSchema in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getSchema

public com.opensymphony.module.propertyset.PropertySetSchema getSchema()
                                                                throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getSchema in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

isSettable

public boolean isSettable(java.lang.String property)
Specified by:
isSettable in interface com.opensymphony.module.propertyset.PropertySet

setString

public void setString(java.lang.String key,
                      java.lang.String value)
               throws com.opensymphony.module.propertyset.PropertyException
Specified by:
setString in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getString

public java.lang.String getString(java.lang.String key)
                           throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getString in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

setText

public void setText(java.lang.String key,
                    java.lang.String value)
             throws com.opensymphony.module.propertyset.PropertyException
Specified by:
setText in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getText

public java.lang.String getText(java.lang.String key)
                         throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getText in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getType

public int getType(java.lang.String key)
            throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getType in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

setXML

public void setXML(java.lang.String key,
                   org.w3c.dom.Document value)
            throws com.opensymphony.module.propertyset.PropertyException
Specified by:
setXML in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

getXML

public org.w3c.dom.Document getXML(java.lang.String key)
                            throws com.opensymphony.module.propertyset.PropertyException
Specified by:
getXML in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

exists

public boolean exists(java.lang.String key)
               throws com.opensymphony.module.propertyset.PropertyException
Specified by:
exists in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

remove

public void remove(java.lang.String key)
            throws com.opensymphony.module.propertyset.PropertyException
Specified by:
remove in interface com.opensymphony.module.propertyset.PropertySet
Throws:
com.opensymphony.module.propertyset.PropertyException

supportsType

public boolean supportsType(int type)
Specified by:
supportsType in interface com.opensymphony.module.propertyset.PropertySet

supportsTypes

public boolean supportsTypes()
Specified by:
supportsTypes in interface com.opensymphony.module.propertyset.PropertySet


Copyright © 2005-2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.