Class ZduAwareIssueArchiveHelper
java.lang.Object
com.atlassian.jira.issue.managers.ZduAwareIssueArchiveHelper
- All Implemented Interfaces:
IssueArchiveHelper
-
Constructor Summary
ConstructorsConstructorDescriptionZduAwareIssueArchiveHelper(DefaultIssueArchiveHelper defaultIssueArchiveHelper, ArchivedProjectManager archivedProjectManager, FeatureManager featureManager) -
Method Summary
Modifier and TypeMethodDescriptionarchiveIssue(ApplicationUser user, Issue issue, EventDispatchOption eventDispatchOption, boolean sendMail) Archive issue in context of given user.voidarchiveIssuesInProject(Project project) Marks all issues in the specified project as archived and de-indexes them.booleanisIssueArchived(Project project, boolean issueArchivedProperty) Returns if the issue is archived.booleanChecks if project archive or restore operations are allowed.restoreIssue(ApplicationUser user, Issue issue, EventDispatchOption eventDispatchOption, boolean sendMail) Restores issue in context of given user.voidrestoreIssuesInProject(Project project) Restores all issues in the specified project, except the ones that had been individually marked as archived withIssueArchiveHelper.archiveIssue(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue, com.atlassian.jira.event.type.EventDispatchOption, boolean)prior to archiving the project withIssueArchiveHelper.archiveIssuesInProject(com.atlassian.jira.project.Project).
-
Constructor Details
-
ZduAwareIssueArchiveHelper
public ZduAwareIssueArchiveHelper(DefaultIssueArchiveHelper defaultIssueArchiveHelper, ArchivedProjectManager archivedProjectManager, FeatureManager featureManager)
-
-
Method Details
-
isIssueArchived
Description copied from interface:IssueArchiveHelperReturns if the issue is archived. Takes into account the flag set on the issue, but also if the project is archived and if licensing allows archiving.- Specified by:
isIssueArchivedin interfaceIssueArchiveHelper- Returns:
- true if issue is archived considering all the inputs
-
archiveIssue
public Issue archiveIssue(ApplicationUser user, Issue issue, EventDispatchOption eventDispatchOption, boolean sendMail) throws ArchiveException Description copied from interface:IssueArchiveHelperArchive issue in context of given user.- Specified by:
archiveIssuein interfaceIssueArchiveHelper- Parameters:
user- user performing the operationissue- issue to archiveeventDispatchOption- specifies if an event should be sent and if so which should be sent.sendMail- whether to send the email- Throws:
ArchiveException
-
restoreIssue
public Issue restoreIssue(ApplicationUser user, Issue issue, EventDispatchOption eventDispatchOption, boolean sendMail) throws ArchiveException Description copied from interface:IssueArchiveHelperRestores issue in context of given user.- Specified by:
restoreIssuein interfaceIssueArchiveHelper- Parameters:
user- user performing the operationissue- issue to archiveeventDispatchOption- specifies if an event should be sent and if so which should be sent.sendMail- whether to send the email- Throws:
ArchiveException
-
archiveIssuesInProject
Description copied from interface:IssueArchiveHelperMarks all issues in the specified project as archived and de-indexes them.- Specified by:
archiveIssuesInProjectin interfaceIssueArchiveHelper- Parameters:
project- project whose issues should be archived
-
restoreIssuesInProject
Description copied from interface:IssueArchiveHelperRestores all issues in the specified project, except the ones that had been individually marked as archived withIssueArchiveHelper.archiveIssue(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.issue.Issue, com.atlassian.jira.event.type.EventDispatchOption, boolean)prior to archiving the project withIssueArchiveHelper.archiveIssuesInProject(com.atlassian.jira.project.Project). This method does not reindex the restored issues, it just marks them as not archived in the database.- Specified by:
restoreIssuesInProjectin interfaceIssueArchiveHelper- Parameters:
project- project whose issues should be restored
-
isProjectArchiveOrRestoreAllowed
public boolean isProjectArchiveOrRestoreAllowed()Description copied from interface:IssueArchiveHelperChecks if project archive or restore operations are allowed. This method returns false if both OpenSearch is enabled and a full reindexing is running, otherwise returns true.- Specified by:
isProjectArchiveOrRestoreAllowedin interfaceIssueArchiveHelper- Returns:
- true if archive/restore operations are allowed, false otherwise
-