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.

  • Constructor Details

  • Method Details

    • getType

      public int getType(String key) throws UnsupportedOperationException
      Specified by:
      getType in interface com.opensymphony.module.propertyset.PropertySet
      Overrides:
      getType in class com.opensymphony.module.propertyset.map.MapPropertySet
      Throws:
      UnsupportedOperationException
    • getBoolean

      public boolean getBoolean(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(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(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(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(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(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(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(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 Date getDate(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(String key, 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(String key, 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(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(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 Object getObject(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(String key, Object value)
      Specified by:
      setObject in interface com.opensymphony.module.propertyset.PropertySet
      Overrides:
      setObject in class com.opensymphony.module.propertyset.AbstractPropertySet
    • getProperties

      public Properties getProperties(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(String key, Properties value)
      Specified by:
      setProperties in interface com.opensymphony.module.propertyset.PropertySet
      Overrides:
      setProperties in class com.opensymphony.module.propertyset.AbstractPropertySet
    • getXML

      public Document getXML(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(String key, 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 Map getMap()
      Overrides:
      getMap in class com.opensymphony.module.propertyset.map.MapPropertySet
    • setMap

      public void setMap(Map map)
      Overrides:
      setMap in class com.opensymphony.module.propertyset.map.MapPropertySet
    • remove

      public void remove(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, String key, 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 String toString()
      Overrides:
      toString in class com.opensymphony.module.propertyset.AbstractPropertySet