|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.imports.project.DefaultProjectImportPersister
public class DefaultProjectImportPersister
Constructor Summary | |
---|---|
DefaultProjectImportPersister(UserUtil userUtil,
ExternalUtils externalUtils,
IssueFactory issueFactory,
OfBizDelegator ofBizDelegator,
IssueIndexManager issueIndexManager,
IssueManager issueManager,
ProjectFactory projectFactory,
ProjectManager projectManager,
VersionManager versionManager,
AssociationManager associationManager,
UserAssociationStore userAssociationStore,
ProjectComponentManager projectComponentManager,
AttachmentManager attachmentManager,
ChangeHistoryManager changeHistoryManager,
IssueLinkTypeManager issueLinkTypeManager,
com.atlassian.crowd.embedded.api.CrowdService crowdService,
ApplicationProperties applicationProperties,
UserPropertyManager userPropertyManager)
|
Method Summary | |
---|---|
boolean |
createAssociation(ExternalNodeAssociation nodeAssociation)
Creates a NodeAssocation which is used to link the issue to external values such as versions and components. |
Attachment |
createAttachment(ExternalAttachment externalAttachment)
Creates an attachment specified by the ExternalAttachment. |
String |
createChangeItemForIssueLinkIfNeeded(String issueId,
String issueLinkTypeId,
String linkedIssueKey,
boolean isSource,
com.atlassian.crowd.embedded.api.User importAuthor)
This will look at the issue specified by issueId and add a changeItem for the issue link if it needs to. |
Map |
createComponents(BackupProject backupProject)
Creates the components, specified by BackupProject.getProjectComponents()
for the named backup project. |
Long |
createEntity(EntityRepresentation entityRepresentation)
This will store the provided entity in the database. |
Issue |
createIssue(ExternalIssue externalIssue,
Date importDate,
com.atlassian.crowd.embedded.api.User importAuthor)
Creates an issue based off of the provided ExternalIssue. |
Project |
createProject(BackupProject backupProject)
Creates a project, with details based off of the ExternalProject in the backup project. |
boolean |
createUser(ExternalUser externalUser)
Creates a User in JIRA from the given ExternalUser object. |
Map |
createVersions(BackupProject backupProject)
Creates the versions, specified by BackupProject.getProjectVersions()
for the named backup project. |
boolean |
createVoter(ExternalVoter voter)
Creates a UserAssociation which is used to link the user to the issue as a voter. |
boolean |
createWatcher(ExternalWatcher watcher)
Creates a UserAssociation which is used to link the user to the issue as a watcher. |
void |
reIndexProject(ProjectImportMapper projectImportMapper,
TaskProgressInterval taskProgressInterval,
I18nHelper i18n)
Re-indexes all the new Issues that have just been created in this Project Import. |
Project |
updateProjectDetails(ExternalProject externalProject)
Updates the details of an existing Project in JIRA from the given ExternalProject object. |
void |
updateProjectIssueCounter(BackupProject backupProject,
long counter)
Updates a projects issue counter, which is used to determine the numeric portion of the issue key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultProjectImportPersister(UserUtil userUtil, ExternalUtils externalUtils, IssueFactory issueFactory, OfBizDelegator ofBizDelegator, IssueIndexManager issueIndexManager, IssueManager issueManager, ProjectFactory projectFactory, ProjectManager projectManager, VersionManager versionManager, AssociationManager associationManager, UserAssociationStore userAssociationStore, ProjectComponentManager projectComponentManager, AttachmentManager attachmentManager, ChangeHistoryManager changeHistoryManager, IssueLinkTypeManager issueLinkTypeManager, com.atlassian.crowd.embedded.api.CrowdService crowdService, ApplicationProperties applicationProperties, UserPropertyManager userPropertyManager)
Method Detail |
---|
public Issue createIssue(ExternalIssue externalIssue, Date importDate, com.atlassian.crowd.embedded.api.User importAuthor)
ProjectImportPersister
createIssue
in interface ProjectImportPersister
externalIssue
- contains the issue details that will be persisted and the project id that the issue will
be persisted against.importDate
- a date that will be used as the value of the marker change item that is added to the issue
to indicate that the issue was created via a project import.importAuthor
- the user who is performing the project import, this is used as the author of the change item marker for created issues
public Long createEntity(EntityRepresentation entityRepresentation)
ProjectImportPersister
null
id.
createEntity
in interface ProjectImportPersister
entityRepresentation
- the data that will be persisted.
null
if the Entity could not be created.public String createChangeItemForIssueLinkIfNeeded(String issueId, String issueLinkTypeId, String linkedIssueKey, boolean isSource, com.atlassian.crowd.embedded.api.User importAuthor)
ProjectImportPersister
createChangeItemForIssueLinkIfNeeded
in interface ProjectImportPersister
issueId
- the id of the issue that should exist in JIRA. This is the issue that will have the change item
added to it if it does not already have one.issueLinkTypeId
- the id of the issue link type in JIRA, this must exist.linkedIssueKey
- the issue key that is part of the created link.isSource
- true if the issue specified by issueId is the source of the issue link, false if it is the
destination.importAuthor
- the user who is performing the project import, this is used as the author of the change item marker for created issues.
public void reIndexProject(ProjectImportMapper projectImportMapper, TaskProgressInterval taskProgressInterval, I18nHelper i18n) throws IndexException
ProjectImportPersister
ProjectImportIdMapper.getAllMappedIds()
.
reIndexProject
in interface ProjectImportPersister
projectImportMapper
- ProjectImportMapper which is used to get the new Issue IDtaskProgressInterval
- Used to provide progress feedback, can be null.i18n
- used to i18n the task progress messages.
IndexException
- If an error occurs in the IndexManager.public boolean createAssociation(ExternalNodeAssociation nodeAssociation)
ProjectImportPersister
createAssociation
in interface ProjectImportPersister
nodeAssociation
- the externalObject that contains the correct values to be persisted to the datastore.
public boolean createVoter(ExternalVoter voter)
ProjectImportPersister
createVoter
in interface ProjectImportPersister
voter
- contains the issue and user information
public boolean createWatcher(ExternalWatcher watcher)
ProjectImportPersister
createWatcher
in interface ProjectImportPersister
watcher
- contains the issue and user information
public Project updateProjectDetails(ExternalProject externalProject)
ProjectImportPersister
updateProjectDetails
in interface ProjectImportPersister
externalProject
- ExternalProject containing the data to use to update.
public Project createProject(BackupProject backupProject) throws ExternalException
ProjectImportPersister
createProject
in interface ProjectImportPersister
backupProject
- contains the ExternalProject
that holds the details
the project will be created with.
ExternalException
- if there is an error creating the project.public Map createVersions(BackupProject backupProject)
ProjectImportPersister
BackupProject.getProjectVersions()
for the named backup project.
createVersions
in interface ProjectImportPersister
backupProject
- specifies the name of the project to create the versions for and the versions to create
Version
's that represent the newly created
versions keyed by the old version id they were created from.public Map createComponents(BackupProject backupProject)
ProjectImportPersister
BackupProject.getProjectComponents()
for the named backup project.
createComponents
in interface ProjectImportPersister
backupProject
- specifies the name of the project to create the components for and the components to create
ProjectComponent
's that represent the newly created
components keyed by the old component id they were created from.public void updateProjectIssueCounter(BackupProject backupProject, long counter)
ProjectImportPersister
updateProjectIssueCounter
in interface ProjectImportPersister
backupProject
- contains the ExternalProject
that holds the detailscounter
- this is a long that the value will be set to in the stored project.public boolean createUser(ExternalUser externalUser)
ProjectImportPersister
createUser
in interface ProjectImportPersister
externalUser
- ExternalUser containing the data to use to create the new User.
public Attachment createAttachment(ExternalAttachment externalAttachment)
ProjectImportPersister
ExternalAttachment.getAttachedFile()
to the JIRA attachment directory.
createAttachment
in interface ProjectImportPersister
externalAttachment
- specifies the issue id and attachment details for the attachment to create.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |