com.atlassian.crowd.embedded.propertyset
Class EmbeddedCrowdPropertySet
java.lang.Object
com.opensymphony.module.propertyset.AbstractPropertySet
com.opensymphony.module.propertyset.map.MapPropertySet
com.atlassian.crowd.embedded.propertyset.EmbeddedCrowdPropertySet
- All Implemented Interfaces:
- com.opensymphony.module.propertyset.PropertySet
public final class EmbeddedCrowdPropertySet
- extends com.opensymphony.module.propertyset.map.MapPropertySet
An implementation of PropertySet that is backed by Embedded Crowd.
This provides limited compatibility with the old User.getPropertySet().
The values are all backed by Strings, so many types are not supported and
type safety is not assured. Dates are stored in an ISO 8601 date-time
format in UTC.
Updates are pushed straight through to Embedded Crowd, but reads are
done only from the copy of the attributes made when the PropertySet
is created.
This class is not thread-safe and should not be cached across operations.
Fields inherited from class com.opensymphony.module.propertyset.map.MapPropertySet |
map |
Fields inherited from class com.opensymphony.module.propertyset.AbstractPropertySet |
schema |
Fields inherited from interface com.opensymphony.module.propertyset.PropertySet |
BOOLEAN, DATA, DATE, DOUBLE, INT, LONG, OBJECT, PROPERTIES, STRING, TEXT, XML |
Method Summary |
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)
|
long |
getLong(java.lang.String key)
|
java.util.Map |
getMap()
|
java.lang.Object |
getObject(java.lang.String key)
|
java.util.Properties |
getProperties(java.lang.String key)
|
int |
getType(java.lang.String key)
|
org.w3c.dom.Document |
getXML(java.lang.String key)
|
void |
remove(java.lang.String key)
|
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)
|
protected 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 |
setMap(java.util.Map map)
|
void |
setObject(java.lang.String key,
java.lang.Object value)
|
void |
setProperties(java.lang.String key,
java.util.Properties value)
|
void |
setText(java.lang.String key,
java.lang.String value)
Throws IllegalPropertyException if value length greater than 255. |
void |
setXML(java.lang.String key,
org.w3c.dom.Document value)
|
boolean |
supportsType(int type)
|
boolean |
supportsTypes()
|
java.lang.String |
toString()
|
Methods inherited from class com.opensymphony.module.propertyset.map.MapPropertySet |
exists, get, getKeys, init |
Methods inherited from class com.opensymphony.module.propertyset.AbstractPropertySet |
getAsActualType, getKeys, getKeys, getKeys, getSchema, getString, getText, isSettable, setAsActualType, setSchema, setString, type, type |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EmbeddedCrowdPropertySet
public EmbeddedCrowdPropertySet(UserWithAttributes user,
CrowdAdminService crowdService)
getType
public int getType(java.lang.String key)
throws java.lang.UnsupportedOperationException
- Specified by:
getType
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
getType
in class com.opensymphony.module.propertyset.map.MapPropertySet
- Throws:
java.lang.UnsupportedOperationException
getBoolean
public boolean getBoolean(java.lang.String key)
- Specified by:
getBoolean
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
getBoolean
in class com.opensymphony.module.propertyset.AbstractPropertySet
setBoolean
public void setBoolean(java.lang.String key,
boolean value)
- Specified by:
setBoolean
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
setBoolean
in class com.opensymphony.module.propertyset.AbstractPropertySet
getInt
public int getInt(java.lang.String key)
- Specified by:
getInt
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
getInt
in class com.opensymphony.module.propertyset.AbstractPropertySet
setInt
public void setInt(java.lang.String key,
int value)
- Specified by:
setInt
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
setInt
in class com.opensymphony.module.propertyset.AbstractPropertySet
getLong
public long getLong(java.lang.String key)
- Specified by:
getLong
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
getLong
in class com.opensymphony.module.propertyset.AbstractPropertySet
setLong
public void setLong(java.lang.String key,
long value)
- Specified by:
setLong
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
setLong
in class com.opensymphony.module.propertyset.AbstractPropertySet
getDouble
public double getDouble(java.lang.String key)
- Specified by:
getDouble
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
getDouble
in class com.opensymphony.module.propertyset.AbstractPropertySet
setDouble
public void setDouble(java.lang.String key,
double value)
- Specified by:
setDouble
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
setDouble
in class com.opensymphony.module.propertyset.AbstractPropertySet
getDate
public java.util.Date getDate(java.lang.String key)
- Specified by:
getDate
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
getDate
in class com.opensymphony.module.propertyset.AbstractPropertySet
setDate
public void setDate(java.lang.String key,
java.util.Date value)
- Specified by:
setDate
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
setDate
in class com.opensymphony.module.propertyset.AbstractPropertySet
setText
public void setText(java.lang.String key,
java.lang.String value)
throws com.opensymphony.module.propertyset.IllegalPropertyException
- Throws IllegalPropertyException if value length greater than 255.
This is the limit enforced by embedded Crowd.
- Specified by:
setText
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
setText
in class com.opensymphony.module.propertyset.AbstractPropertySet
- Throws:
com.opensymphony.module.propertyset.IllegalPropertyException
getData
public byte[] getData(java.lang.String key)
- Specified by:
getData
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
getData
in class com.opensymphony.module.propertyset.AbstractPropertySet
setData
public void setData(java.lang.String key,
byte[] value)
- Specified by:
setData
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
setData
in class com.opensymphony.module.propertyset.AbstractPropertySet
getObject
public java.lang.Object getObject(java.lang.String key)
- Specified by:
getObject
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
getObject
in class com.opensymphony.module.propertyset.AbstractPropertySet
setObject
public void setObject(java.lang.String key,
java.lang.Object value)
- Specified by:
setObject
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
setObject
in class com.opensymphony.module.propertyset.AbstractPropertySet
getProperties
public java.util.Properties getProperties(java.lang.String key)
- Specified by:
getProperties
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
getProperties
in class com.opensymphony.module.propertyset.AbstractPropertySet
setProperties
public void setProperties(java.lang.String key,
java.util.Properties value)
- Specified by:
setProperties
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
setProperties
in class com.opensymphony.module.propertyset.AbstractPropertySet
getXML
public org.w3c.dom.Document getXML(java.lang.String key)
- Specified by:
getXML
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
getXML
in class com.opensymphony.module.propertyset.AbstractPropertySet
setXML
public void setXML(java.lang.String key,
org.w3c.dom.Document value)
- Specified by:
setXML
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
setXML
in class com.opensymphony.module.propertyset.AbstractPropertySet
supportsTypes
public boolean supportsTypes()
- Specified by:
supportsTypes
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
supportsTypes
in class com.opensymphony.module.propertyset.map.MapPropertySet
getMap
public java.util.Map getMap()
- Overrides:
getMap
in class com.opensymphony.module.propertyset.map.MapPropertySet
setMap
public void setMap(java.util.Map map)
- Overrides:
setMap
in class com.opensymphony.module.propertyset.map.MapPropertySet
remove
public void remove(java.lang.String key)
- Specified by:
remove
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
remove
in class com.opensymphony.module.propertyset.map.MapPropertySet
setImpl
protected void setImpl(int type,
java.lang.String key,
java.lang.Object value)
- Overrides:
setImpl
in class com.opensymphony.module.propertyset.map.MapPropertySet
supportsType
public boolean supportsType(int type)
- Specified by:
supportsType
in interface com.opensymphony.module.propertyset.PropertySet
- Overrides:
supportsType
in class com.opensymphony.module.propertyset.map.MapPropertySet
toString
public java.lang.String toString()
- Overrides:
toString
in class com.opensymphony.module.propertyset.AbstractPropertySet
Copyright © 2010 Atlassian. All Rights Reserved.