Package com.atlassian.configurable
Class ObjectConfigurationPropertyImpl
java.lang.Object
com.atlassian.configurable.ObjectConfigurationPropertyImpl
- All Implemented Interfaces:
ObjectConfigurationProperty
,Map
- Direct Known Subclasses:
ValuesGeneratorObjectConfigurationProperty
,XMLValuesObjectConfigurationProperty
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.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Object Configuration Properties are immutable so this function throws an exceptionboolean
containsKey
(Object key) Does this property have a choice with key of the specified valueboolean
containsValue
(Object value) Does this property have a choice with value of the specified valueentrySet()
Entry set of the choices for this propertyReturns the value of the choice that matches keyRetrieves the default value of this Property e.g.Retrieves the description of this Property e.g.protected Map
getInternalValues
(Map userParams) Returns the map of values stored internally for the choices of this property.protected Map
getName()
Retrieves the name of this Property e.g.int
getType()
Retrieves the type of the Property e.g.Retrieves the name of the type of the property, e.g.void
This is a list of user parameters that may be required to generate a list of values and/or a description for this Property.boolean
isEmpty()
Does this property have a number of possible choicesboolean
Whether the property is enabled in the current context.boolean
keySet()
Returns a set of the key for the choices for this propertyObject Configuration Properties are immutable so this function throws an exceptionvoid
Object Configuration Properties are immutable so this function throws an exceptionObject Configuration Properties are immutable so this function throws an exceptionvoid
setCascadeFrom
(String cascadeFrom) void
setI18nValues
(boolean i18nValues) int
size()
If this Property has a list of choices e.g.values()
Returns all the values for the choices of this propertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Method Details
-
init
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 interfaceObjectConfigurationProperty
- Parameters:
userParams
- Parameters used to generate a list of values and/or a description
-
getName
Retrieves the name of this Property e.g. City- Specified by:
getName
in interfaceObjectConfigurationProperty
- Returns:
- Name of this Property
-
getDescription
Retrieves the description of this Property e.g. Please enter you current location- Specified by:
getDescription
in interfaceObjectConfigurationProperty
- Returns:
- Description of the Property
-
getDefault
Retrieves the default value of this Property e.g. Sydney- Specified by:
getDefault
in interfaceObjectConfigurationProperty
- Returns:
- Default value of Property
-
getType
public int getType()Retrieves the type of the Property e.g. Text- Specified by:
getType
in interfaceObjectConfigurationProperty
- Returns:
- Type of property from
ObjectConfigurationTypes
-
getTypeName
Description copied from interface:ObjectConfigurationProperty
Retrieves the name of the type of the property, e.g. 'text'- Specified by:
getTypeName
in interfaceObjectConfigurationProperty
- 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 interfaceObjectConfigurationProperty
- 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 -
isEmpty
public boolean isEmpty()Does this property have a number of possible choices -
containsKey
Does this property have a choice with key of the specified value- Specified by:
containsKey
in interfaceMap
- Parameters:
key
- Does this Property have a choice with key, key- Returns:
- Has Key
-
containsValue
Does this property have a choice with value of the specified value- Specified by:
containsValue
in interfaceMap
- Parameters:
value
- Does this Property have a choice with value, value- Returns:
- Has Value
-
get
Returns the value of the choice that matches key -
put
Object Configuration Properties are immutable so this function throws an exception -
remove
Object Configuration Properties are immutable so this function throws an exception -
putAll
Object Configuration Properties are immutable so this function throws an exception -
clear
public void clear()Object Configuration Properties are immutable so this function throws an exception -
keySet
Returns a set of the key for the choices for this property -
values
Returns all the values for the choices of this property -
entrySet
Entry set of the choices for this property -
isI18nValues
public boolean isI18nValues()- Specified by:
isI18nValues
in interfaceObjectConfigurationProperty
-
setI18nValues
public void setI18nValues(boolean i18nValues) - Specified by:
setI18nValues
in interfaceObjectConfigurationProperty
-
getCascadeFrom
- Specified by:
getCascadeFrom
in interfaceObjectConfigurationProperty
-
setCascadeFrom
- Specified by:
setCascadeFrom
in interfaceObjectConfigurationProperty
-
getInternalValues
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
- 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
-