com.atlassian.jira.imports.csv
Class CsvConfigBean

java.lang.Object
  extended bycom.atlassian.jira.imports.importer.impl.AbstractConfigBean
      extended bycom.atlassian.jira.imports.csv.CsvConfigBean
All Implemented Interfaces:
ImportConfigBean

public class CsvConfigBean
extends AbstractConfigBean
implements ImportConfigBean


Field Summary
static String CF_PREFIX
           
(package private)  Map config
           
protected  String configFileLocation
           
static Map CUSTOM_FIELDS
           
static String DATE_FIELDS
           
static String[] DEFAULT_DATE_FIELDS
           
protected  Character delimiter
           
static String EXISTING_CUSTOM_FIELD
           
static String EXTRA_USER_FIELDS
           
static String FIELD_MAPPING_PREFIX
           
(package private)  List headerRow
           
protected  String importLocation
           
static Map ISSUE_FIELDS
           
static String MAP_VALUES_FIELD_NAME
           
static String NEW_CUSTOM_FIELD
           
static Map PROJECT_FIELDS
           
(package private)  List sampleData
           
static String SELECTED_OPTION_KEY
           
static String TYPE
           
static Map VALID_CUSTOM_FIELD_TYPES
           
static org.apache.commons.collections.Predicate VALID_FIELD
           
static String[] VALID_FIELDS
           
static String[] VALID_PREFIX
           
static String[] VALID_PROJECT_OPTIONS
           
static String VALUE_MAPPING_PREFIX
           
static Map VERSION_FIELDS
           
 
Fields inherited from class com.atlassian.jira.imports.importer.impl.AbstractConfigBean
authenticationContext, constantsManager, workflowManager, workflowSchemeManager
 
Fields inherited from interface com.atlassian.jira.imports.importer.ImportConfigBean
NULL_VALUE
 
Constructor Summary
CsvConfigBean(File csvImportFile, Character delimiter)
           
CsvConfigBean(File csvImportFile, org.apache.commons.configuration.PropertiesConfiguration configFile, Character delimiter)
           
 
Method Summary
 boolean containsValue(String value)
           
static CsvConfigBean createNewConfigBean(ConfigureCsvMapping configureCsvMapping)
           
 String getConfigFileLocation()
           
 String getConfigFileText()
          Reads the current configuration as a file formatted as text
 String getConvertedValueMappingName(String fieldName, String value)
           
 Collection getCurrentValues(String fieldName)
          Gets the unique field values for this given field
 Collection getDateFields()
           
 Character getDelimiter()
           
 String getExistingCfName(String fieldName)
           
 String getFieldMapping(String fieldName)
           
 Map getFieldMappings()
          Get the field mappings options
 String getFieldName(String fieldName)
           
 List getHeaderRow()
           
 String getImportLocation()
           
 String[] getMapValues()
           
 String getNewCfName(String fieldName)
           
 String getNewCfType(String fieldName)
           
 org.apache.commons.configuration.PropertiesConfiguration getNewConfigurationFile()
           
 List getSampleData()
           
 String getSelectedProjectOption()
           
static String getText(String key)
           
static Map getValidCustomFieldTypes()
           
 Object getValue(String key)
           
 String getValueFieldName(String fieldName)
           
 String getValueMappingName(String fieldName, String value)
           
 boolean isInMapValues(String s)
           
 boolean isSelectedValue(String csvHeaderName, String valueToTest)
           
 void populateConfigBean(Map actionParams)
           
 void populateUniqueCsvFieldValues()
          Populates the Unique field values of the
 void remove(String fieldName)
           
 void saveToFile(File fileToSaveTo)
           
 void setHeaderRow(List headerRow)
           
 void setMapValues(String[] mapValues)
           
 void setSampleData(List sampleData)
           
 void setSelectedProjectOption(String selectedprojectoption)
           
 void setValue(String key, Object value)
           
 
Methods inherited from class com.atlassian.jira.imports.importer.impl.AbstractConfigBean
constantInGvList, getI18n
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

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
Constructor Detail

CsvConfigBean

public CsvConfigBean(File csvImportFile,
                     Character delimiter)
              throws FileNotFoundException,
                     CsvImportException

CsvConfigBean

public CsvConfigBean(File csvImportFile,
                     org.apache.commons.configuration.PropertiesConfiguration configFile,
                     Character delimiter)
              throws FileNotFoundException,
                     CsvImportException,
                     org.apache.commons.configuration.ConfigurationException
Method Detail

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)

getValidCustomFieldTypes

public static Map getValidCustomFieldTypes()

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,
                                                CsvImportException,
                                                org.apache.commons.configuration.ConfigurationException
Throws:
FileNotFoundException
CsvImportException
org.apache.commons.configuration.ConfigurationException

getText

public static String getText(String key)

remove

public void remove(String fieldName)

containsValue

public boolean containsValue(String value)


Copyright © 2002-2006 Atlassian. All Rights Reserved.