com.atlassian.jira.imports.project.core
Class BackupOverviewBuilderImpl

java.lang.Object
  extended by com.atlassian.jira.imports.project.core.BackupOverviewBuilderImpl
All Implemented Interfaces:
BackupOverviewBuilder

public class BackupOverviewBuilderImpl
extends Object
implements BackupOverviewBuilder

Since:
v3.13

Nested Class Summary
static class BackupOverviewBuilderImpl.ConfigurationContext
          Represents the CustomField configuration context as stored in the XML Backup.
static class BackupOverviewBuilderImpl.FieldConfigSchemeIssueType
          Represents the CustomField field configuration issue type context as stored in the XML Backup.
 
Constructor Summary
BackupOverviewBuilderImpl()
           
 
Method Summary
 void addComponent(ExternalComponent component)
          Allows you to add a reference to an ExternalComponent.
 void addConfigurationContext(BackupOverviewBuilderImpl.ConfigurationContext configuration)
          Regiserters a portion of a projects custom field configuration so that the builder can collate this with the BackupOverviewBuilder.addFieldConfigSchemeIssueType(com.atlassian.jira.imports.project.core.BackupOverviewBuilderImpl.FieldConfigSchemeIssueType) and BackupOverviewBuilder.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 the BackupOverviewBuilder.addConfigurationContext(com.atlassian.jira.imports.project.core.BackupOverviewBuilderImpl.ConfigurationContext) and BackupOverviewBuilder.addFieldConfigSchemeIssueType(com.atlassian.jira.imports.project.core.BackupOverviewBuilderImpl.FieldConfigSchemeIssueType) data to produce a project relevant custom field configuration.
 void addFieldConfigSchemeIssueType(BackupOverviewBuilderImpl.FieldConfigSchemeIssueType fieldConfigSchemeIssueType)
          Regiserters a portion of a projects custom field configuration so that the builder can collate this with the BackupOverviewBuilder.addConfigurationContext(com.atlassian.jira.imports.project.core.BackupOverviewBuilderImpl.ConfigurationContext) and BackupOverviewBuilder.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 a PluginVersion.
 void addProject(ExternalProject project)
          Allows you to add a reference to an ExternalProject.
 void addVersion(ExternalVersion version)
          Allows you to add a reference to an ExternalVersion.
 BackupOverview getBackupOverview()
          Returns a BackupOverview 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 registerOverviewPopulators()
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackupOverviewBuilderImpl

public BackupOverviewBuilderImpl()
Method Detail

addProject

public void addProject(ExternalProject project)
Description copied from interface: BackupOverviewBuilder
Allows you to add a reference to an ExternalProject.

Specified by:
addProject in interface BackupOverviewBuilder
Parameters:
project - the project to add.

addPluginVersion

public void addPluginVersion(PluginVersion pluginVersion)
Description copied from interface: BackupOverviewBuilder
Allows you to add a reference to a PluginVersion.

Specified by:
addPluginVersion in interface BackupOverviewBuilder
Parameters:
pluginVersion - the plugin version to add.

addVersion

public void addVersion(ExternalVersion version)
Description copied from interface: BackupOverviewBuilder
Allows you to add a reference to an ExternalVersion.

Specified by:
addVersion in interface BackupOverviewBuilder
Parameters:
version - the version information to associate with the project.

addComponent

public void addComponent(ExternalComponent component)
Description copied from interface: BackupOverviewBuilder
Allows you to add a reference to an ExternalComponent.

Specified by:
addComponent in interface BackupOverviewBuilder
Parameters:
component - the component information to associate with the project.

addIssue

public void addIssue(ExternalIssue issue)
Description copied from interface: BackupOverviewBuilder
Allows you to register an issue against a project. The issue id's are made available via the BackupProject.getIssueIds() method.

Specified by:
addIssue in interface BackupOverviewBuilder
Parameters:
issue - which has its id and project set. We should be able to convert the issue id to a long.

setBuildNumber

public void setBuildNumber(String buildNumber)
Description copied from interface: BackupOverviewBuilder
Registers the JIRA build number with this object.

Specified by:
setBuildNumber in interface BackupOverviewBuilder
Parameters:
buildNumber - the build number as contained in the JIRA backup.

setEdition

public void setEdition(String edition)
Description copied from interface: BackupOverviewBuilder
Registers the JIRA edition with this object.

Specified by:
setEdition in interface BackupOverviewBuilder
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 interface BackupOverviewBuilder
Parameters:
unassignedIssuesAllowed - The value of the "UnassignedIssuesAllowed" setting.

getBackupOverview

public BackupOverview getBackupOverview()
Description copied from interface: BackupOverviewBuilder
Returns a BackupOverview that is populated by the current state of the builder.

Specified by:
getBackupOverview in interface BackupOverviewBuilder
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 a BackupOverviewPopulator. This will then populate this object with the information it gains from the XML information.

Specified by:
populateInformationFromElement in interface BackupOverviewBuilder
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

public void addExternalCustomField(ExternalCustomField externalCustomField)
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 the BackupOverviewBuilder.addConfigurationContext(com.atlassian.jira.imports.project.core.BackupOverviewBuilderImpl.ConfigurationContext) and BackupOverviewBuilder.addFieldConfigSchemeIssueType(com.atlassian.jira.imports.project.core.BackupOverviewBuilderImpl.FieldConfigSchemeIssueType) data to produce a project relevant custom field configuration.

Specified by:
addExternalCustomField in interface BackupOverviewBuilder
Parameters:
externalCustomField - is the custom field information represented in the backup XML.

addConfigurationContext

public void addConfigurationContext(BackupOverviewBuilderImpl.ConfigurationContext configuration)
Description copied from interface: BackupOverviewBuilder
Regiserters a portion of a projects custom field configuration so that the builder can collate this with the BackupOverviewBuilder.addFieldConfigSchemeIssueType(com.atlassian.jira.imports.project.core.BackupOverviewBuilderImpl.FieldConfigSchemeIssueType) and BackupOverviewBuilder.addExternalCustomField(com.atlassian.jira.external.beans.ExternalCustomField) data to produce a project relevant custom field configuration.

Specified by:
addConfigurationContext in interface BackupOverviewBuilder
Parameters:
configuration - is the configuration represented in the backup XML.

addFieldConfigSchemeIssueType

public void addFieldConfigSchemeIssueType(BackupOverviewBuilderImpl.FieldConfigSchemeIssueType fieldConfigSchemeIssueType)
Description copied from interface: BackupOverviewBuilder
Regiserters a portion of a projects custom field configuration so that the builder can collate this with the BackupOverviewBuilder.addConfigurationContext(com.atlassian.jira.imports.project.core.BackupOverviewBuilderImpl.ConfigurationContext) and BackupOverviewBuilder.addExternalCustomField(com.atlassian.jira.external.beans.ExternalCustomField) data to produce a project relevant custom field configuration.

Specified by:
addFieldConfigSchemeIssueType in interface BackupOverviewBuilder
Parameters:
fieldConfigSchemeIssueType - is the linked issue type information represented in the backup XML.

registerOverviewPopulators

protected void registerOverviewPopulators()

registerOverviewPopulator

protected void registerOverviewPopulator(BackupOverviewPopulator populator)


Copyright © 2002-2014 Atlassian. All Rights Reserved.