public abstract class

AbstractPropertySet

extends Object
implements PropertySet
java.lang.Object
   ↳ com.opensymphony.module.propertyset.AbstractPropertySet
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Base implementation of PropertySet.

Performs necessary casting for get???/set??? methods which wrap around the following 2 methods which are declared protected abstract and need to be implemented by subclasses:

The following methods are declared public abstract and are the remainder of the methods that need to be implemented at the very least:

The supports??? methods are implemented and all return true by default. Override if necessary.

Summary

[Expand]
Inherited Constants
From interface com.opensymphony.module.propertyset.PropertySet
Fields
protected PropertySetSchema schema
Public Constructors
AbstractPropertySet()
Public Methods
Object getAsActualType(String key)
boolean getBoolean(String key)
byte[] getData(String key)
Casts to com.opensymphony.util.Data and returns bytes.
Date getDate(String key)
double getDouble(String key)
int getInt(String key)
Collection getKeys()
Calls getKeys(null,0)
Collection getKeys(int type)
Calls getKeys(null,type)
Collection getKeys(String prefix)
Calls getKeys(prefix,0)
long getLong(String key)
Object getObject(String key)
Properties getProperties(String key)
PropertySetSchema getSchema()
String getString(String key)
String of maximum 255 chars.
String getText(String key)
String of unlimited length.
Document getXML(String key)
void init(Map config, Map args)
boolean isSettable(String property)
Returns true.
void setAsActualType(String key, Object value)
void setBoolean(String key, boolean value)
void setData(String key, byte[] value)
Constructs com.opensymphony.util.Data wrapper around bytes.
void setDate(String key, Date value)
void setDouble(String key, double value)
void setInt(String key, int value)
void setLong(String key, long value)
void setObject(String key, Object value)
void setProperties(String key, Properties value)
void setSchema(PropertySetSchema schema)
void setString(String key, String value)
Throws IllegalPropertyException if value length greater than 255.
void setText(String key, String value)
void setXML(String key, Document value)
boolean supportsType(int type)
Returns true.
boolean supportsTypes()
Returns true.
String toString()
Simple human readable representation of contents of PropertySet.
Protected Methods
abstract Object get(int type, String key)
abstract void setImpl(int type, String key, Object value)
int type(String type)
String type(int type)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.opensymphony.module.propertyset.PropertySet

Fields

protected PropertySetSchema schema

Public Constructors

public AbstractPropertySet ()

Public Methods

public Object getAsActualType (String key)

public boolean getBoolean (String key)

public byte[] getData (String key)

Casts to com.opensymphony.util.Data and returns bytes.

public Date getDate (String key)

public double getDouble (String key)

public int getInt (String key)

public Collection getKeys ()

Calls getKeys(null,0)

Returns

public Collection getKeys (int type)

Calls getKeys(null,type)

Parameters
type Type to list. See static class variables. If null, then all types shall be returned.
Returns

public Collection getKeys (String prefix)

Calls getKeys(prefix,0)

Parameters
prefix String that keys must start with. If null, than all keys shall be returned.
Returns

public long getLong (String key)

public Object getObject (String key)

public Properties getProperties (String key)

public PropertySetSchema getSchema ()

public String getString (String key)

String of maximum 255 chars.

public String getText (String key)

String of unlimited length.

public Document getXML (String key)

public void init (Map config, Map args)

public boolean isSettable (String property)

Returns true.

public void setAsActualType (String key, Object value)

public void setBoolean (String key, boolean value)

public void setData (String key, byte[] value)

Constructs com.opensymphony.util.Data wrapper around bytes.

public void setDate (String key, Date value)

public void setDouble (String key, double value)

public void setInt (String key, int value)

public void setLong (String key, long value)

public void setObject (String key, Object value)

public void setProperties (String key, Properties value)

public void setSchema (PropertySetSchema schema)

public void setString (String key, String value)

Throws IllegalPropertyException if value length greater than 255.

public void setText (String key, String value)

public void setXML (String key, Document value)

public boolean supportsType (int type)

Returns true.

public boolean supportsTypes ()

Returns true.

public String toString ()

Simple human readable representation of contents of PropertySet.

Protected Methods

protected abstract Object get (int type, String key)

protected abstract void setImpl (int type, String key, Object value)

protected int type (String type)

protected String type (int type)