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

public static final String VALUE_CONFIG_PREFIX
See Also:
Constant Field Values

NULL_VALUE

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

getAvailableFields

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

Returns:
List of ValueMappingDefinition. Never null

getValueCountForField

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

Parameters:
fieldName -
Returns:
Null if not calculated.

isMapValueForField

public 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

public void populateFieldForValueMappings(Map actionParams)

getFieldsForValueMapping

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

Returns:
Collection of ValueMappingDefinition. never null

getDistinctValuesForField

public 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

public 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

public 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

public void populateValueMappings(Map actionParams)

getJiraField

public 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

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

copyToNewProperties

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

getValueMappingForImport

public 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-2006 Atlassian. All Rights Reserved.