Class ObjectConfigurationPropertyImpl

java.lang.Object
com.atlassian.configurable.ObjectConfigurationPropertyImpl
All Implemented Interfaces:
ObjectConfigurationProperty, Map
Direct Known Subclasses:
ValuesGeneratorObjectConfigurationProperty, XMLValuesObjectConfigurationProperty

public class ObjectConfigurationPropertyImpl extends Object implements ObjectConfigurationProperty
This interface is a property of an Object Configuration and contains a name, description, default value and the type (ObjectConfigurationTypes) of this property. It can also contain a list of values if the type has values specified for it e.g. select list.
  • Method Details

    • init

      public void init(Map userParams)
      This is a list of user parameters that may be required to generate a list of values and/or a description for this Property. e.g. a User may be required to generate a list of values they can see but other users can not.
      Specified by:
      init in interface ObjectConfigurationProperty
      Parameters:
      userParams - Parameters used to generate a list of values and/or a description
    • getName

      public String getName()
      Retrieves the name of this Property e.g. City
      Specified by:
      getName in interface ObjectConfigurationProperty
      Returns:
      Name of this Property
    • getDescription

      public String getDescription()
      Retrieves the description of this Property e.g. Please enter you current location
      Specified by:
      getDescription in interface ObjectConfigurationProperty
      Returns:
      Description of the Property
    • getDefault

      public String getDefault()
      Retrieves the default value of this Property e.g. Sydney
      Specified by:
      getDefault in interface ObjectConfigurationProperty
      Returns:
      Default value of Property
    • getType

      public int getType()
      Retrieves the type of the Property e.g. Text
      Specified by:
      getType in interface ObjectConfigurationProperty
      Returns:
      Type of property from ObjectConfigurationTypes
    • getTypeName

      public String getTypeName()
      Description copied from interface: ObjectConfigurationProperty
      Retrieves the name of the type of the property, e.g. 'text'
      Specified by:
      getTypeName in interface ObjectConfigurationProperty
      Returns:
      Type name of the property.
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: ObjectConfigurationProperty
      Whether the property is enabled in the current context. It is up to the implementation to divine the context.
      Specified by:
      isEnabled in interface ObjectConfigurationProperty
      Returns:
      true only if the property is enabled.
    • size

      public int size()
      If this Property has a list of choices e.g. a select list then this function returns how many there are. If there are no choices it returns 0
      Specified by:
      size in interface Map
      Returns:
      Number of choices for this properties value
    • isEmpty

      public boolean isEmpty()
      Does this property have a number of possible choices
      Specified by:
      isEmpty in interface Map
      Returns:
      Does this property have a number of possible values
    • containsKey

      public boolean containsKey(Object key)
      Does this property have a choice with key of the specified value
      Specified by:
      containsKey in interface Map
      Parameters:
      key - Does this Property have a choice with key, key
      Returns:
      Has Key
    • containsValue

      public boolean containsValue(Object value)
      Does this property have a choice with value of the specified value
      Specified by:
      containsValue in interface Map
      Parameters:
      value - Does this Property have a choice with value, value
      Returns:
      Has Value
    • get

      public Object get(Object key)
      Returns the value of the choice that matches key
      Specified by:
      get in interface Map
      Parameters:
      key - Key look for
      Returns:
      value for key, key
    • put

      public Object put(Object key, Object value)
      Object Configuration Properties are immutable so this function throws an exception
      Specified by:
      put in interface Map
    • remove

      public Object remove(Object key)
      Object Configuration Properties are immutable so this function throws an exception
      Specified by:
      remove in interface Map
    • putAll

      public void putAll(Map t)
      Object Configuration Properties are immutable so this function throws an exception
      Specified by:
      putAll in interface Map
    • clear

      public void clear()
      Object Configuration Properties are immutable so this function throws an exception
      Specified by:
      clear in interface Map
    • keySet

      public Set keySet()
      Returns a set of the key for the choices for this property
      Specified by:
      keySet in interface Map
      Returns:
      Set of keys
    • values

      public Collection values()
      Returns all the values for the choices of this property
      Specified by:
      values in interface Map
      Returns:
      Collection of values
    • entrySet

      public Set entrySet()
      Entry set of the choices for this property
      Specified by:
      entrySet in interface Map
      Returns:
      Entry Set
    • isI18nValues

      public boolean isI18nValues()
      Specified by:
      isI18nValues in interface ObjectConfigurationProperty
    • setI18nValues

      public void setI18nValues(boolean i18nValues)
      Specified by:
      setI18nValues in interface ObjectConfigurationProperty
    • getCascadeFrom

      public String getCascadeFrom()
      Specified by:
      getCascadeFrom in interface ObjectConfigurationProperty
    • setCascadeFrom

      public void setCascadeFrom(String cascadeFrom)
      Specified by:
      setCascadeFrom in interface ObjectConfigurationProperty
    • getInternalValues

      protected Map getInternalValues(Map userParams)
      Returns the map of values stored internally for the choices of this property.
      Parameters:
      userParams - Not used in this implementation.
      Returns:
      Map of choices
    • getMutableInternalValues

      protected Map getMutableInternalValues()
      Returns:
      the map of values stored internally for the choices of this property as a mutable Map.
      Since:
      29 August 2007 for JIRA 3.11