com.atlassian.jira.issue.customfields.view
Class CustomFieldParamsImpl

java.lang.Object
  extended by com.atlassian.jira.issue.customfields.view.CustomFieldParamsImpl
All Implemented Interfaces:
CustomFieldParams, CollectionParams, FieldParams, FieldTransportParams

public class CustomFieldParamsImpl
extends Object
implements CustomFieldParams


Constructor Summary
CustomFieldParamsImpl()
           
CustomFieldParamsImpl(CustomField customField)
           
CustomFieldParamsImpl(CustomField customField, Object paramsObject)
           
 
Method Summary
 void addValue(Collection<String> values)
           
 void addValue(String key, Collection<String> values)
           
 boolean contains(String key, String value)
           
 boolean containsKey(String key)
           
 boolean equals(Object o)
           
 Set<String> getAllKeys()
           
 Collection getAllValues()
          Return all values of all keys, flattened into a single collection.
 CustomField getCustomField()
           
 Object getFirstValueForKey(String key)
           
 Object getFirstValueForNullKey()
           
 Map getKeysAndValues()
           
 String getQueryString()
           
 Collection<String> getValuesForKey(String key)
          Return the values associated with the given key in the parameters.
 Collection getValuesForNullKey()
          Return the values of the custom field.
 int hashCode()
           
 boolean isEmpty()
           
 void put(String key, Collection<String> value)
          Put the values in.
 void remove(String key)
           
 void setCustomField(CustomField customField)
           
 String toString()
           
 void transform(org.apache.commons.collections.Transformer transformer)
           
static void transformMultiMap(org.apache.commons.collections.Transformer transformer, Map parameterMap)
           
 void transformObjectsToStrings()
           
 void transformStringsToObjects()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomFieldParamsImpl

public CustomFieldParamsImpl()

CustomFieldParamsImpl

public CustomFieldParamsImpl(CustomField customField)

CustomFieldParamsImpl

public CustomFieldParamsImpl(CustomField customField,
                             Object paramsObject)
Method Detail

getAllKeys

public Set<String> getAllKeys()
Specified by:
getAllKeys in interface FieldParams

getCustomField

public CustomField getCustomField()
Specified by:
getCustomField in interface CustomFieldParams

setCustomField

public void setCustomField(CustomField customField)
Specified by:
setCustomField in interface CustomFieldParams

getValuesForKey

public Collection<String> getValuesForKey(@Nullable
                                          String key)
Description copied from interface: CollectionParams
Return the values associated with the given key in the parameters.

Depending on the type of field, additional keys might be introduced in addition to the null key. JIRA might also add additional keys into the parameters. For example, issue id and project id might be passed into the parameters under separate keys during custom field validation.

Specified by:
getValuesForKey in interface CollectionParams

getFirstValueForKey

public Object getFirstValueForKey(@Nullable
                                  String key)
Specified by:
getFirstValueForKey in interface FieldTransportParams

getValuesForNullKey

public Collection getValuesForNullKey()
Description copied from interface: CollectionParams
Return the values of the custom field.

The values associated with the null key represents the values of the custom field. For example, the user selected in a single user picker, or the list of users selected in a multiple user picker.

Note that unlike CollectionParams.getAllValues(), this method does not return values associated with other non-null keys.

Specified by:
getValuesForNullKey in interface CollectionParams

getAllValues

public Collection getAllValues()
Description copied from interface: CollectionParams
Return all values of all keys, flattened into a single collection. Use CollectionParams.getValuesForNullKey() instead if, for example, you just need the values of the custom field.

Specified by:
getAllValues in interface CollectionParams

getQueryString

public String getQueryString()
Specified by:
getQueryString in interface CustomFieldParams

addValue

public void addValue(String key,
                     Collection<String> values)

addValue

public void addValue(Collection<String> values)

put

public void put(String key,
                Collection<String> value)
Description copied from interface: CollectionParams
Put the values in.

Specified by:
put in interface CollectionParams
Parameters:
key - for mapping
value - a Collection of Strings.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface FieldParams

contains

public boolean contains(String key,
                        String value)
Specified by:
contains in interface CustomFieldParams

transformObjectsToStrings

public void transformObjectsToStrings()
Specified by:
transformObjectsToStrings in interface CustomFieldParams

transformStringsToObjects

public void transformStringsToObjects()
Specified by:
transformStringsToObjects in interface CustomFieldParams

transformMultiMap

public static void transformMultiMap(org.apache.commons.collections.Transformer transformer,
                                     Map parameterMap)

transform

public void transform(org.apache.commons.collections.Transformer transformer)
Specified by:
transform in interface CustomFieldParams

getFirstValueForNullKey

public Object getFirstValueForNullKey()
Specified by:
getFirstValueForNullKey in interface FieldTransportParams

getKeysAndValues

public Map getKeysAndValues()
Specified by:
getKeysAndValues in interface CustomFieldParams
Specified by:
getKeysAndValues in interface FieldParams

remove

public void remove(String key)
Specified by:
remove in interface CustomFieldParams

containsKey

public boolean containsKey(String key)
Specified by:
containsKey in interface FieldParams


Copyright © 2002-2014 Atlassian. All Rights Reserved.