com.opensymphony.module.propertyset
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Field Summary | |
protected PropertySetSchema |
schema
|
| Fields inherited from interface com.opensymphony.module.propertyset.PropertySet |
BOOLEAN, DATA, DATE, DOUBLE, INT, LONG, OBJECT, PROPERTIES, STRING, TEXT, XML |
| Constructor Summary | |
AbstractPropertySet()
|
|
| Method Summary | |
protected abstract java.lang.Object |
get(int type,
java.lang.String key)
|
java.lang.Object |
getAsActualType(java.lang.String key)
|
boolean |
getBoolean(java.lang.String key)
|
byte[] |
getData(java.lang.String key)
Casts to Data and returns bytes. |
java.util.Date |
getDate(java.lang.String key)
|
double |
getDouble(java.lang.String key)
|
int |
getInt(java.lang.String key)
|
java.util.Collection |
getKeys()
Calls getKeys(null,0) |
java.util.Collection |
getKeys(int type)
Calls getKeys(null,type) |
java.util.Collection |
getKeys(java.lang.String prefix)
Calls getKeys(prefix,0) |
long |
getLong(java.lang.String key)
|
java.lang.Object |
getObject(java.lang.String key)
|
java.util.Properties |
getProperties(java.lang.String key)
|
PropertySetSchema |
getSchema()
|
java.lang.String |
getString(java.lang.String key)
String of maximum 255 chars. |
java.lang.String |
getText(java.lang.String key)
String of unlimited length. |
org.w3c.dom.Document |
getXML(java.lang.String key)
|
void |
init(java.util.Map config,
java.util.Map args)
|
boolean |
isSettable(java.lang.String property)
Returns true. |
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)
Constructs Data wrapper around bytes. |
void |
setDate(java.lang.String key,
java.util.Date value)
|
void |
setDouble(java.lang.String key,
double value)
|
protected abstract void |
setImpl(int type,
java.lang.String key,
java.lang.Object 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(PropertySetSchema schema)
|
void |
setString(java.lang.String key,
java.lang.String value)
Throws IllegalPropertyException if value length greater than 255. |
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)
Returns true. |
boolean |
supportsTypes()
Returns true. |
java.lang.String |
toString()
Simple human readable representation of contents of PropertySet. |
protected java.lang.String |
type(int type)
|
protected int |
type(java.lang.String type)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.opensymphony.module.propertyset.PropertySet |
exists, getKeys, getType, remove, remove |
| Field Detail |
protected PropertySetSchema schema
| Constructor Detail |
public AbstractPropertySet()
| Method Detail |
public void setAsActualType(java.lang.String key,
java.lang.Object value)
throws PropertyException
setAsActualType in interface PropertySetPropertyException
public java.lang.Object getAsActualType(java.lang.String key)
throws PropertyException
getAsActualType in interface PropertySetPropertyException
public void setBoolean(java.lang.String key,
boolean value)
setBoolean in interface PropertySetpublic boolean getBoolean(java.lang.String key)
getBoolean in interface PropertySet
public void setData(java.lang.String key,
byte[] value)
Data wrapper around bytes.
setData in interface PropertySetpublic byte[] getData(java.lang.String key)
Data and returns bytes.
getData in interface PropertySet
public void setDate(java.lang.String key,
java.util.Date value)
setDate in interface PropertySetpublic java.util.Date getDate(java.lang.String key)
getDate in interface PropertySet
public void setDouble(java.lang.String key,
double value)
setDouble in interface PropertySetpublic double getDouble(java.lang.String key)
getDouble in interface PropertySet
public void setInt(java.lang.String key,
int value)
setInt in interface PropertySetpublic int getInt(java.lang.String key)
getInt in interface PropertySet
public java.util.Collection getKeys()
throws PropertyException
getKeys(null,0)
getKeys in interface PropertySetCollection of
Strings.
PropertyException
public java.util.Collection getKeys(int type)
throws PropertyException
getKeys(null,type)
getKeys in interface PropertySettype - Type to list. See static class variables. If null, then
all types shall be returned.
Collection of
Strings.
PropertyException
public java.util.Collection getKeys(java.lang.String prefix)
throws PropertyException
getKeys(prefix,0)
getKeys in interface PropertySetprefix - String that keys must start with. If null, than all
keys shall be returned.
Collection of
Strings.
PropertyException
public void setLong(java.lang.String key,
long value)
setLong in interface PropertySetpublic long getLong(java.lang.String key)
getLong in interface PropertySet
public void setObject(java.lang.String key,
java.lang.Object value)
setObject in interface PropertySetpublic java.lang.Object getObject(java.lang.String key)
getObject in interface PropertySet
public void setProperties(java.lang.String key,
java.util.Properties value)
setProperties in interface PropertySetpublic java.util.Properties getProperties(java.lang.String key)
getProperties in interface PropertySetpublic void setSchema(PropertySetSchema schema)
setSchema in interface PropertySetpublic PropertySetSchema getSchema()
getSchema in interface PropertySetpublic boolean isSettable(java.lang.String property)
isSettable in interface PropertySet
public void setString(java.lang.String key,
java.lang.String value)
setString in interface PropertySetpublic java.lang.String getString(java.lang.String key)
PropertySetString of maximum 255 chars.
getString in interface PropertySet
public void setText(java.lang.String key,
java.lang.String value)
setText in interface PropertySetpublic java.lang.String getText(java.lang.String key)
PropertySetString of unlimited length.
getText in interface PropertySet
public void setXML(java.lang.String key,
org.w3c.dom.Document value)
setXML in interface PropertySetpublic org.w3c.dom.Document getXML(java.lang.String key)
getXML in interface PropertySet
public void init(java.util.Map config,
java.util.Map args)
init in interface PropertySetpublic boolean supportsType(int type)
supportsType in interface PropertySetpublic boolean supportsTypes()
supportsTypes in interface PropertySetpublic java.lang.String toString()
protected abstract void setImpl(int type,
java.lang.String key,
java.lang.Object value)
throws PropertyException
PropertyException
protected abstract java.lang.Object get(int type,
java.lang.String key)
throws PropertyException
PropertyExceptionprotected java.lang.String type(int type)
protected int type(java.lang.String type)
|
See www.opensymphony.com for more information. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||