com.atlassian.jira.imports.csv
Class CsvConfigBean
java.lang.Object
com.atlassian.jira.imports.importer.impl.AbstractConfigBean
com.atlassian.jira.imports.csv.CsvConfigBean
- All Implemented Interfaces:
- ImportConfigBean
public class CsvConfigBean
- extends AbstractConfigBean
- implements ImportConfigBean
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
importLocation
protected String importLocation
configFileLocation
protected String configFileLocation
delimiter
protected Character delimiter
config
Map config
VALID_PROJECT_OPTIONS
public static final String[] VALID_PROJECT_OPTIONS
DATE_FIELDS
public static final String DATE_FIELDS
- See Also:
- Constant Field Values
EXTRA_USER_FIELDS
public static final String EXTRA_USER_FIELDS
- See Also:
- Constant Field Values
VALID_FIELDS
public static final String[] VALID_FIELDS
DEFAULT_DATE_FIELDS
public static final String[] DEFAULT_DATE_FIELDS
PROJECT_FIELDS
public static final Map PROJECT_FIELDS
ISSUE_FIELDS
public static final Map ISSUE_FIELDS
ISSUE_FIELDS_WITH_TIMETRACKING
public static final Map ISSUE_FIELDS_WITH_TIMETRACKING
CUSTOM_FIELDS
public static final Map CUSTOM_FIELDS
VERSION_FIELDS
public static final Map VERSION_FIELDS
headerRow
List headerRow
sampleData
List sampleData
SELECTED_OPTION_KEY
public static final String SELECTED_OPTION_KEY
- See Also:
- Constant Field Values
FIELD_MAPPING_PREFIX
public static final String FIELD_MAPPING_PREFIX
- See Also:
- Constant Field Values
CF_PREFIX
public static final String CF_PREFIX
- See Also:
- Constant Field Values
EXISTING_CUSTOM_FIELD
public static final String EXISTING_CUSTOM_FIELD
- See Also:
- Constant Field Values
NEW_CUSTOM_FIELD
public static final String NEW_CUSTOM_FIELD
- See Also:
- Constant Field Values
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
VALID_CUSTOM_FIELD_TYPES
public static final Map VALID_CUSTOM_FIELD_TYPES
VALUE_MAPPING_PREFIX
public static final String VALUE_MAPPING_PREFIX
- See Also:
- Constant Field Values
VALID_PREFIX
public static final String[] VALID_PREFIX
VALID_FIELD
public static final org.apache.commons.collections.Predicate VALID_FIELD
MAP_VALUES_FIELD_NAME
public static final String MAP_VALUES_FIELD_NAME
- See Also:
- Constant Field Values
CsvConfigBean
public CsvConfigBean(File csvImportFile,
Character delimiter)
throws FileNotFoundException,
ImportException
- Throws:
FileNotFoundException
ImportException
CsvConfigBean
public CsvConfigBean(File csvImportFile,
org.apache.commons.configuration.PropertiesConfiguration configFile,
Character delimiter)
throws FileNotFoundException,
ImportException,
org.apache.commons.configuration.ConfigurationException
- Throws:
FileNotFoundException
ImportException
org.apache.commons.configuration.ConfigurationException
saveToFile
public void saveToFile(File fileToSaveTo)
throws org.apache.commons.configuration.ConfigurationException
- Throws:
org.apache.commons.configuration.ConfigurationException
getNewConfigurationFile
public org.apache.commons.configuration.PropertiesConfiguration getNewConfigurationFile()
getConfigFileText
public String getConfigFileText()
throws IOException,
org.apache.commons.configuration.ConfigurationException
- Reads the current configuration as a file formatted as text
- Throws:
IOException
org.apache.commons.configuration.ConfigurationException
populateConfigBean
public void populateConfigBean(Map actionParams)
getCurrentValues
public Collection getCurrentValues(String fieldName)
- Gets the unique field values for this given field
- Parameters:
fieldName
-
populateUniqueCsvFieldValues
public void populateUniqueCsvFieldValues()
- Populates the Unique field values of the
getDateFields
public Collection getDateFields()
isInMapValues
public boolean isInMapValues(String s)
isSelectedValue
public boolean isSelectedValue(String csvHeaderName,
String valueToTest)
getFieldName
public String getFieldName(String fieldName)
getValueFieldName
public String getValueFieldName(String fieldName)
getValueMappingName
public String getValueMappingName(String fieldName,
String value)
getConvertedValueMappingName
public String getConvertedValueMappingName(String fieldName,
String value)
getFieldMapping
public String getFieldMapping(String fieldName)
getExistingCfName
public String getExistingCfName(String fieldName)
getNewCfName
public String getNewCfName(String fieldName)
getNewCfType
public String getNewCfType(String fieldName)
isCfMapping
public boolean isCfMapping(String key)
getValidCustomFieldTypes
public static Map getValidCustomFieldTypes()
getUnmappedFields
public Map getUnmappedFields()
getHeaderRow
public List getHeaderRow()
setHeaderRow
public void setHeaderRow(List headerRow)
getSampleData
public List getSampleData()
setSampleData
public void setSampleData(List sampleData)
getMapValues
public String[] getMapValues()
setMapValues
public void setMapValues(String[] mapValues)
getSelectedProjectOption
public String getSelectedProjectOption()
setSelectedProjectOption
public void setSelectedProjectOption(String selectedprojectoption)
getValue
public Object getValue(String key)
getFieldMappings
public Map getFieldMappings()
- Get the field mappings options
getConfigFileLocation
public String getConfigFileLocation()
getImportLocation
public String getImportLocation()
getDelimiter
public Character getDelimiter()
setValue
public void setValue(String key,
Object value)
createNewConfigBean
public static CsvConfigBean createNewConfigBean(ConfigureCsvMapping configureCsvMapping)
throws FileNotFoundException,
ImportException,
org.apache.commons.configuration.ConfigurationException
- Throws:
FileNotFoundException
ImportException
org.apache.commons.configuration.ConfigurationException
getText
public static String getText(String key)
remove
public void remove(String fieldName)
containsValue
public boolean containsValue(String value)
containsFieldWithValue
public boolean containsFieldWithValue(String value)
- Checks that there is a field (and not a custom field) mapped to the given value.
- Parameters:
value
- value to lookup
- Returns:
- true if there is a field mapped to the value. false otherwise or when value is null
Copyright © 2002-2007 Atlassian. All Rights Reserved.