ImportExportTags
public class ImportExportUtilities extends Object implements ImportExportTags
Modifier and Type | Field | Description |
---|---|---|
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 |
ATTR_BIT, ATTR_CREATOR_ID, ATTR_DATE, ATTR_ID, ATTR_NAME, ATTR_ORDER, ATTR_STATUS, ATTR_SYSTEMID, ATTR_VALUE, DATE_FORMATTER, EXPORT_LOCALE, EXPORT_LOCALE_STRING, TAG_COMPONENT, TAG_COMPONENT_DESCRIPTION, TAG_COMPONENT_ID, TAG_COMPONENT_NAME, TAG_COMPONENTS, TAG_CONFIGURATION, TAG_CONFIGURATION_VERSION, TAG_CREATE_DATE, TAG_CREATOR, TAG_CUSTOM_FIELD, TAG_CUSTOM_FIELD_DATEFORMAT, TAG_CUSTOM_FIELD_LABEL, TAG_CUSTOM_FIELD_OPTION, TAG_CUSTOM_FIELD_REQUIRED, TAG_CUSTOM_FIELD_SORTOPTIONS, TAG_CUSTOM_FIELD_TYPE, TAG_CUSTOM_FIELDS, TAG_EMAIL, TAG_FIRST_NAME, TAG_HISTORY_ENTRY, TAG_ISSUE, TAG_ISSUE_ATTACHMENT, TAG_ISSUE_ATTACHMENT_CREATOR, TAG_ISSUE_ATTACHMENT_DESCRIPTION, TAG_ISSUE_ATTACHMENT_FILENAME, TAG_ISSUE_ATTACHMENT_ORIGFILE, TAG_ISSUE_ATTACHMENT_SIZE, TAG_ISSUE_ATTACHMENT_TYPE, TAG_ISSUE_ATTACHMENTS, TAG_ISSUE_COMPONENTS, TAG_ISSUE_DESCRIPTION, TAG_ISSUE_FIELD, TAG_ISSUE_FIELDS, TAG_ISSUE_HISTORY, TAG_ISSUE_PROJECT, TAG_ISSUE_RESOLUTION, TAG_ISSUE_SEVERITY, TAG_ISSUE_STATUS, TAG_ISSUE_VERSIONS, TAG_ISSUES, TAG_LAST_MODIFIED, TAG_LAST_NAME, TAG_LOGIN, TAG_OWNER, TAG_PROJECT, TAG_PROJECT_DESCRIPTION, TAG_PROJECT_FIELD_ID, TAG_PROJECT_FIELDS, TAG_PROJECT_NAME, TAG_PROJECT_OPTIONS, TAG_PROJECT_OWNER_ID, TAG_PROJECT_OWNERS, TAG_PROJECT_STATUS, TAG_PROJECTS, TAG_RESOLUTION, TAG_RESOLUTIONS, TAG_ROOT, TAG_SEVERITIES, TAG_SEVERITY, TAG_STATUS, TAG_STATUSES, TAG_SUPER_USER, TAG_TARGET_VERSION_ID, TAG_USER, TAG_USER_STATUS, TAG_USERS, TAG_VERSION, TAG_VERSION_DESCRIPTION, TAG_VERSION_ID, TAG_VERSION_NUMBER, TAG_VERSIONS
Constructor | Description |
---|---|
ImportExportUtilities() |
Modifier and Type | Method | Description |
---|---|---|
static void |
export(org.itracker.model.AbstractEntity o,
OutputStream os) |
|
static void |
exportConfigModels(org.dom4j.io.XMLWriter writer,
org.itracker.model.SystemConfiguration config) |
|
static String |
exportIssues(List<org.itracker.model.Issue> issues,
org.itracker.model.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 boolean |
exportIssues(List<org.itracker.model.Issue> issues,
org.itracker.model.SystemConfiguration config,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
export the issues to an XML and write it to the response.
|
static void |
exportIssues(org.dom4j.io.XMLWriter writer,
List<org.itracker.model.Issue> issues,
org.itracker.model.SystemConfiguration config) |
|
static void |
exportIssuesModels(org.dom4j.io.XMLWriter writer,
List<org.itracker.model.Issue> issues) |
|
static void |
exportModel(org.dom4j.io.XMLWriter writer,
org.itracker.model.AbstractEntity abstractBean) |
|
static String |
exportModel(org.itracker.model.AbstractEntity abstractBean) |
Returns the appropriate XML block for a given model.
|
static void |
getConfigurationXML(org.dom4j.io.XMLWriter writer,
org.itracker.model.SystemConfiguration config) |
|
static String |
getConfigurationXML(org.itracker.model.SystemConfiguration config) |
Generates an XML block that encapsulates the system configuration for import or export.
|
static void |
getIssueXML(org.dom4j.io.XMLWriter writer,
org.itracker.model.Issue issue) |
|
static String |
getIssueXML(org.itracker.model.Issue issue) |
Generates an XML block that encapsulates an issue for import or export.
|
static String |
getProjectXML(org.itracker.model.Project project) |
Generates an XML block that encapsulates a project for import or export.
|
static void |
getUserXML(org.dom4j.io.XMLWriter writer,
org.itracker.model.User user) |
|
static String |
getUserXML(org.itracker.model.User user) |
Generates an XML block that encapsulates a user for import or export.
|
static org.itracker.model.AbstractEntity[] |
importIssues(Reader xmlReader) |
Takes an XML file matching the ITracker import/export DTD and returns an array
of AbstractBean objects.
|
static org.itracker.model.AbstractEntity |
importXml(InputSource is) |
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
public static org.itracker.model.AbstractEntity[] importIssues(Reader xmlReader) throws org.itracker.ImportExportException
xmlReader
- an xml reader to importorg.itracker.ImportExportException
- thrown if the xml can not be parsed into the appropriate objectspublic static boolean exportIssues(List<org.itracker.model.Issue> issues, org.itracker.model.SystemConfiguration config, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
issues
- config
- request
- response
- true
the export was sucessful.javax.servlet.ServletException
IOException
public static org.itracker.model.AbstractEntity importXml(InputSource is) throws Exception
Exception
public static void export(org.itracker.model.AbstractEntity o, OutputStream os) throws Exception
Exception
public static void exportIssues(org.dom4j.io.XMLWriter writer, List<org.itracker.model.Issue> issues, org.itracker.model.SystemConfiguration config) throws org.itracker.ImportExportException
org.itracker.ImportExportException
public static void exportConfigModels(org.dom4j.io.XMLWriter writer, org.itracker.model.SystemConfiguration config) throws IOException
IOException
public static void exportIssuesModels(org.dom4j.io.XMLWriter writer, List<org.itracker.model.Issue> issues) throws IOException
IOException
public static String exportIssues(List<org.itracker.model.Issue> issues, org.itracker.model.SystemConfiguration config) throws org.itracker.ImportExportException
issues
- an array of Issue objects to exportorg.itracker.ImportExportException
- thrown if the array of issues can not be exportedpublic static String exportModel(org.itracker.model.AbstractEntity abstractBean) throws org.itracker.ImportExportException
abstractBean
- a model that extends AbstractEntityorg.itracker.ImportExportException
- thrown if the given model can not be exportedpublic static void exportModel(org.dom4j.io.XMLWriter writer, org.itracker.model.AbstractEntity abstractBean) throws IOException
IOException
public static void getIssueXML(org.dom4j.io.XMLWriter writer, org.itracker.model.Issue issue) throws IOException
IOException
public static String getIssueXML(org.itracker.model.Issue issue)
issue
- an Issue to generate the XML forpublic static String getProjectXML(org.itracker.model.Project project)
project
- a Project to generate the XML forpublic static void getUserXML(org.dom4j.io.XMLWriter writer, org.itracker.model.User user) throws IOException
IOException
public static String getUserXML(org.itracker.model.User user)
user
- a User to generate the XML forpublic static void getConfigurationXML(org.dom4j.io.XMLWriter writer, org.itracker.model.SystemConfiguration config) throws IOException
IOException
public static String getConfigurationXML(org.itracker.model.SystemConfiguration config)
config
- a SystemConfiguration to generate the XML forCopyright © 2002–2019 itracker. All rights reserved.