Class BackupOverviewBuilderImpl
java.lang.Object
com.atlassian.jira.imports.project.core.BackupOverviewBuilderImpl
- All Implemented Interfaces:
BackupOverviewBuilder
- Since:
- v3.13
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.jira.imports.project.core.BackupOverviewBuilder
BackupOverviewBuilder.ConfigurationContext, BackupOverviewBuilder.FieldConfigSchemeIssueType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdditionalData
(String key, String projectId, Object data) Set additional data into the backup overview that is gathered from plugins.void
addComment
(ExternalComment comment) Allows you to register a comment against a project.void
addComponent
(ExternalComponent component) Allows you to add a reference to anExternalComponent
.void
Registers a portion of a projects custom field configuration so that the builder can collate this with theBackupOverviewBuilder.addFieldConfigSchemeIssueType(FieldConfigSchemeIssueType)
andBackupOverviewBuilder.addExternalCustomField(com.atlassian.jira.external.beans.ExternalCustomField)
data to produce a project relevant custom field configuration.void
addExternalCustomField
(ExternalCustomField externalCustomField) Registers the custom field information portion of a projects custom field configuration so that the builder can collate this with theBackupOverviewBuilder.addConfigurationContext(ConfigurationContext)
andBackupOverviewBuilder.addFieldConfigSchemeIssueType(FieldConfigSchemeIssueType)
data to produce a project relevant custom field configuration.void
addFieldConfigSchemeIssueType
(BackupOverviewBuilder.FieldConfigSchemeIssueType fieldConfigSchemeIssueType) Registers a portion of a projects custom field configuration so that the builder can collate this with theBackupOverviewBuilder.addConfigurationContext(ConfigurationContext)
andBackupOverviewBuilder.addExternalCustomField(com.atlassian.jira.external.beans.ExternalCustomField)
data to produce a project relevant custom field configuration.void
addIssue
(ExternalIssue issue) Allows you to register an issue against a project.void
addPluginVersion
(PluginVersion pluginVersion) Allows you to add a reference to aPluginVersion
.void
addProject
(ExternalProject project) Allows you to add a reference to anExternalProject
.void
addVersion
(ExternalVersion version) Allows you to add a reference to anExternalVersion
.Returns aBackupOverview
that is populated by the current state of the builder.void
populateInformationFromElement
(String elementName, Map attributes) Used to handle populating the builder from a SAX parser.protected void
registerOverviewPopulator
(BackupOverviewPopulator populator) protected void
void
setBuildNumber
(String buildNumber) Registers the JIRA build number with this object.void
setEdition
(String edition) Registers the JIRA edition with this object.void
setUnassignedIssuesAllowed
(boolean unassignedIssuesAllowed) Registers the value of the "UnassignedIssuesAllowed" setting.
-
Constructor Details
-
BackupOverviewBuilderImpl
public BackupOverviewBuilderImpl()
-
-
Method Details
-
addProject
Description copied from interface:BackupOverviewBuilder
Allows you to add a reference to anExternalProject
.- Specified by:
addProject
in interfaceBackupOverviewBuilder
- Parameters:
project
- the project to add.
-
addPluginVersion
Description copied from interface:BackupOverviewBuilder
Allows you to add a reference to aPluginVersion
.- Specified by:
addPluginVersion
in interfaceBackupOverviewBuilder
- Parameters:
pluginVersion
- the plugin version to add.
-
addVersion
Description copied from interface:BackupOverviewBuilder
Allows you to add a reference to anExternalVersion
.- Specified by:
addVersion
in interfaceBackupOverviewBuilder
- Parameters:
version
- the version information to associate with the project.
-
addComponent
Description copied from interface:BackupOverviewBuilder
Allows you to add a reference to anExternalComponent
.- Specified by:
addComponent
in interfaceBackupOverviewBuilder
- Parameters:
component
- the component information to associate with the project.
-
addIssue
Description copied from interface:BackupOverviewBuilder
Allows you to register an issue against a project. The issue id's are made available via theBackupProject.getIssueIds()
method.- Specified by:
addIssue
in interfaceBackupOverviewBuilder
- Parameters:
issue
- which has its id and project set. We should be able to convert the issue id to a long.
-
addComment
Description copied from interface:BackupOverviewBuilder
Allows you to register a comment against a project. Only comment length is stored and not the comment body. Later it's used to find the longest of system text fields (description, environment, comment) in a project.- Specified by:
addComment
in interfaceBackupOverviewBuilder
- Parameters:
comment
- which has its id and issue set.
-
setBuildNumber
Description copied from interface:BackupOverviewBuilder
Registers the JIRA build number with this object.- Specified by:
setBuildNumber
in interfaceBackupOverviewBuilder
- Parameters:
buildNumber
- the build number as contained in the JIRA backup.
-
setEdition
Description copied from interface:BackupOverviewBuilder
Registers the JIRA edition with this object.- Specified by:
setEdition
in interfaceBackupOverviewBuilder
- Parameters:
edition
- the edition as contained in the JIRA backup.
-
setUnassignedIssuesAllowed
public void setUnassignedIssuesAllowed(boolean unassignedIssuesAllowed) Description copied from interface:BackupOverviewBuilder
Registers the value of the "UnassignedIssuesAllowed" setting.- Specified by:
setUnassignedIssuesAllowed
in interfaceBackupOverviewBuilder
- Parameters:
unassignedIssuesAllowed
- The value of the "UnassignedIssuesAllowed" setting.
-
getBackupOverview
Description copied from interface:BackupOverviewBuilder
Returns aBackupOverview
that is populated by the current state of the builder.- Specified by:
getBackupOverview
in interfaceBackupOverviewBuilder
- Returns:
- backupOverview that contains the
BackupProject
's and JIRA system information that has been registered with the builder.
-
populateInformationFromElement
public void populateInformationFromElement(String elementName, Map attributes) throws ParseException Description copied from interface:BackupOverviewBuilder
Used to handle populating the builder from a SAX parser. This method will delegate the actual handling of the element and attributes to an instance of aBackupOverviewPopulator
. This will then populate this object with the information it gains from the XML information.- Specified by:
populateInformationFromElement
in interfaceBackupOverviewBuilder
- Parameters:
elementName
- identifies the XML element.attributes
- identifies the attributes associated with the XML element.- Throws:
ParseException
- if the attributes are invalid for this element.
-
addExternalCustomField
Description copied from interface:BackupOverviewBuilder
Registers the custom field information portion of a projects custom field configuration so that the builder can collate this with theBackupOverviewBuilder.addConfigurationContext(ConfigurationContext)
andBackupOverviewBuilder.addFieldConfigSchemeIssueType(FieldConfigSchemeIssueType)
data to produce a project relevant custom field configuration.- Specified by:
addExternalCustomField
in interfaceBackupOverviewBuilder
- Parameters:
externalCustomField
- is the custom field information represented in the backup XML.
-
addConfigurationContext
Description copied from interface:BackupOverviewBuilder
Registers a portion of a projects custom field configuration so that the builder can collate this with theBackupOverviewBuilder.addFieldConfigSchemeIssueType(FieldConfigSchemeIssueType)
andBackupOverviewBuilder.addExternalCustomField(com.atlassian.jira.external.beans.ExternalCustomField)
data to produce a project relevant custom field configuration.- Specified by:
addConfigurationContext
in interfaceBackupOverviewBuilder
- Parameters:
configuration
- is the configuration represented in the backup XML.
-
addFieldConfigSchemeIssueType
public void addFieldConfigSchemeIssueType(BackupOverviewBuilder.FieldConfigSchemeIssueType fieldConfigSchemeIssueType) Description copied from interface:BackupOverviewBuilder
Registers a portion of a projects custom field configuration so that the builder can collate this with theBackupOverviewBuilder.addConfigurationContext(ConfigurationContext)
andBackupOverviewBuilder.addExternalCustomField(com.atlassian.jira.external.beans.ExternalCustomField)
data to produce a project relevant custom field configuration.- Specified by:
addFieldConfigSchemeIssueType
in interfaceBackupOverviewBuilder
- Parameters:
fieldConfigSchemeIssueType
- is the linked issue type information represented in the backup XML.
-
registerOverviewPopulators
protected void registerOverviewPopulators() -
registerOverviewPopulator
-
addAdditionalData
Description copied from interface:BackupOverviewBuilder
Set additional data into the backup overview that is gathered from plugins.- Specified by:
addAdditionalData
in interfaceBackupOverviewBuilder
- Parameters:
key
- A unique key for the plugin.projectId
- The project the data relates to.data
- Data to be stored against the key. The data will be added to a list and eventually stored in theand accessible via
-