|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.itracker.services.util.ImportExportUtilities
public class ImportExportUtilities
FIXME: This is not XML, this is string concatenating/parsing. Use proper SAX Handler or remove this unsave code. see java.xml.parsers for more information.
This class provides functionality needed to import and export issues and their associated data as XML. This xml provides all the data necessary to import the issues into another instance of ITracker or some other issue tracking tool.
| Field Summary | |
|---|---|
static int |
IMPORT_STAT_FIELDS
|
static int |
IMPORT_STAT_ISSUES
|
static int |
IMPORT_STAT_NEW
|
static int |
IMPORT_STAT_PROJECTS
|
static int |
IMPORT_STAT_RESOLUTIONS
|
static int |
IMPORT_STAT_REUSED
|
static int |
IMPORT_STAT_SEVERITIES
|
static int |
IMPORT_STAT_STATUSES
|
static int |
IMPORT_STAT_USERS
|
| Constructor Summary | |
|---|---|
ImportExportUtilities()
|
|
| Method Summary | |
|---|---|
static void |
export(AbstractEntity o,
OutputStream os)
|
static String |
exportIssues(List<Issue> issues,
SystemConfiguration config)
Takes an array of IssueModels and exports them as XML suitable for import into another instance of ITracker, or another issue tracking tool. |
static String |
exportModel(AbstractEntity abstractBean)
Returns the appropriate XML block for a given model. |
static String |
getConfigurationXML(SystemConfiguration config)
Generates an XML block that encapsulates the system configuration for import or export. |
static String |
getIssueXML(Issue issue)
Generates an XML block that encapsulates an issue for import or export. |
static String |
getProjectXML(Project project)
Generates an XML block that encapsulates a project for import or export. |
static String |
getUserXML(User user)
Generates an XML block that encapsulates a user for import or export. |
static AbstractEntity[] |
importIssues(String xml)
Takes an XML file matching the ITracker import/export DTD and returns an array of AbstractBean objects. |
static AbstractEntity |
importXml(InputSource is)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int IMPORT_STAT_NEW
public static final int IMPORT_STAT_REUSED
public static final int IMPORT_STAT_USERS
public static final int IMPORT_STAT_PROJECTS
public static final int IMPORT_STAT_ISSUES
public static final int IMPORT_STAT_STATUSES
public static final int IMPORT_STAT_SEVERITIES
public static final int IMPORT_STAT_RESOLUTIONS
public static final int IMPORT_STAT_FIELDS
| Constructor Detail |
|---|
public ImportExportUtilities()
| Method Detail |
|---|
public static AbstractEntity[] importIssues(String xml)
throws ImportExportException
xml - an xml string to import
ImportExportException - thrown if the xml can not be parsed into the appropriate objects
public static AbstractEntity importXml(InputSource is)
throws Exception
Exception
public static void export(AbstractEntity o,
OutputStream os)
throws Exception
Exception
public static String exportIssues(List<Issue> issues,
SystemConfiguration config)
throws ImportExportException
issues - an array of Issue objects to export
ImportExportException - thrown if the array of issues can not be exported
public static String exportModel(AbstractEntity abstractBean)
throws ImportExportException
model - a model that extends AbstractBean
ImportExportException - thrown if the given model can not be exportedpublic static String getIssueXML(Issue issue)
issue - an Issue to generate the XML for
public static String getProjectXML(Project project)
project - a Project to generate the XML for
public static String getUserXML(User user)
user - a User to generate the XML for
public static String getConfigurationXML(SystemConfiguration config)
user - a SystemConfiguration to generate the XML for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||