com.atlassian.jira.imports.config
Interface ValueMappingHelper

All Known Implementing Classes:
ValueMappingHelperImpl

public interface ValueMappingHelper


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

Field Detail

VALUE_CONFIG_PREFIX

static final String VALUE_CONFIG_PREFIX
See Also:
Constant Field Values

NULL_VALUE

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

getAvailableFields

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

Returns:
List of ValueMappingDefinition. Never null

getValueCountForField

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

Parameters:
fieldName -
Returns:
Null if not calculated.

isMapValueForField

boolean isMapValueForField(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(Map actionParams)

getFieldsForValueMapping

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

Returns:
Collection of ValueMappingDefinition. never null

getDistinctValuesForField

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

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

getValueMappingFieldName

String getValueMappingFieldName(String fieldName,
                                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

String getValueMapping(String fieldName,
                       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(Map actionParams)

getJiraField

OrderableField getJiraField(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

String getValueMappingForImport(String fieldName,
                                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-2009 Atlassian. All Rights Reserved.