com.atlassian.jira.imports.config
Interface ValueMappingHelper

All Known Implementing Classes:
ValueMappingHelperImpl

public interface ValueMappingHelper


Field Summary
static java.lang.String NULL_VALUE
           
static java.lang.String VALUE_CONFIG_PREFIX
           
 
Method Summary
 void copyFromProperties(org.apache.commons.configuration.PropertiesConfiguration configFile)
           
 void copyToNewProperties(org.apache.commons.configuration.PropertiesConfiguration configFile)
           
 java.util.Collection getAvailableFields()
          Return ValueMappingDefinition objects for each field that can have their values mapped
 java.util.Collection getDistinctValuesForField(java.lang.String fieldName)
          Returns a collection of String objects representing a unique value of the field
 java.util.Collection getFieldsForValueMapping()
          Returns a collection of ValueMappingDefinition objects that have been selected for value mappings
 OrderableField getJiraField(java.lang.String fieldName)
          Returns the JIRA field this field is being mapped to, if known
 java.lang.Long getValueCountForField(java.lang.String fieldName)
          Returns a count of the number of unique values for that field
 java.lang.String getValueMapping(java.lang.String fieldName, java.lang.String value)
          Gets whatever value the field and value pair is mapped to.
 java.lang.String getValueMappingFieldName(java.lang.String fieldName, java.lang.String value)
          Returns the HTML field name for the input area for a given field and value combination
 java.lang.String getValueMappingForImport(java.lang.String fieldName, java.lang.String value)
          Gets whatever value the field and value pair is mapped to for import.
 boolean isMapValueForField(java.lang.String fieldName)
          Returns wheteher or not the field has been selected for mapping
 void populateFieldForValueMappings(java.util.Map actionParams)
           
 void populateValueMappings(java.util.Map actionParams)
           
 

Field Detail

VALUE_CONFIG_PREFIX

static final java.lang.String VALUE_CONFIG_PREFIX
See Also:
Constant Field Values

NULL_VALUE

static final java.lang.String NULL_VALUE
See Also:
Constant Field Values
Method Detail

getAvailableFields

java.util.Collection getAvailableFields()
Return ValueMappingDefinition objects for each field that can have their values mapped

Returns:
List of ValueMappingDefinition. Never null

getValueCountForField

java.lang.Long getValueCountForField(java.lang.String fieldName)
Returns a count of the number of unique values for that field

Parameters:
fieldName -
Returns:
Null if not calculated.

isMapValueForField

boolean isMapValueForField(java.lang.String fieldName)
Returns wheteher or not the field has been selected for mapping

Parameters:
fieldName -
Returns:
true if field is selected for mappping

populateFieldForValueMappings

void populateFieldForValueMappings(java.util.Map actionParams)

getFieldsForValueMapping

java.util.Collection getFieldsForValueMapping()
Returns a collection of ValueMappingDefinition objects that have been selected for value mappings

Returns:
Collection of ValueMappingDefinition. never null

getDistinctValuesForField

java.util.Collection getDistinctValuesForField(java.lang.String fieldName)
Returns a collection of String objects representing a unique value of the field

Parameters:
fieldName -
Returns:
Collection of String. Never null

getValueMappingFieldName

java.lang.String getValueMappingFieldName(java.lang.String fieldName,
                                          java.lang.String value)
Returns the HTML field name for the input area for a given field and value combination

Parameters:
fieldName -
value -
Returns:
a HTML field name

getValueMapping

java.lang.String getValueMapping(java.lang.String fieldName,
                                 java.lang.String value)
Gets whatever value the field and value pair is mapped to. NULL_VALUE if the field is to be cleared, blank if it is to be imported as-is.

Parameters:
fieldName -
value -
Returns:
String of the what the pair is mapped to

populateValueMappings

void populateValueMappings(java.util.Map actionParams)

getJiraField

OrderableField getJiraField(java.lang.String fieldName)
Returns the JIRA field this field is being mapped to, if known

Parameters:
fieldName -
Returns:
OrderableField the field is mapping to. Null if unknown

copyFromProperties

void copyFromProperties(org.apache.commons.configuration.PropertiesConfiguration configFile)

copyToNewProperties

void copyToNewProperties(org.apache.commons.configuration.PropertiesConfiguration configFile)

getValueMappingForImport

java.lang.String getValueMappingForImport(java.lang.String fieldName,
                                          java.lang.String value)
Gets whatever value the field and value pair is mapped to for import. That is, will return an empty string if the value is cleaered and the original value if no mapping is needed

Parameters:
fieldName -
value -
Returns:
String of the what the pair is mapped to


Copyright © 2002-2010 Atlassian. All Rights Reserved.