public interface ProjectImportResults extends Serializable
Modifier and Type | Method and Description |
---|---|
boolean |
abortImport()
Returns false if the number of allowed errors have been exceeded, true otherwise
|
void |
addError(String error)
Adds the given Error message to the error list.
|
void |
addResult(long count,
String msgKey)
Add an import result.
|
int |
getAttachmentsCreatedCount()
Returns the number of created attachments.
|
List<String> |
getErrors()
Returns a list of all the errors that were added to this result object.
|
int |
getExpectedAttachmentsCreatedCount()
Returns the number of attachments the import expected it could create before doing the actual import.
|
int |
getExpectedIssuesCreatedCount()
Returns the number of issues the import expected it could create before doing the actual import.
|
int |
getExpectedUsersCreatedCount()
Returns the number of users the import expected it could create before doing the actual import.
|
int |
getGroupsCreatedCountForRole(String roleName)
Returns the count of all groups added to the specified role
|
I18nHelper |
getI18n()
Returns the
I18nHelper associated with this Project Import. |
long |
getImportDuration()
This uses the start time and the end time to determine how long the actual import took.
|
Project |
getImportedProject()
Returns the created/updated project that the import imported into.
|
int |
getIssuesCreatedCount()
Returns the number of created issues.
|
List<io.atlassian.fugue.Pair<String,Long>> |
getResults()
Get the results.
|
Collection<String> |
getRoles()
Returns the role names of all roles that have had a group or user added to it.
|
int |
getUsersCreatedCount()
Returns the number of created users.
|
int |
getUsersCreatedCountForRole(String roleName)
Returns the count of all users added to the specified role
|
void |
incrementAttachmentsCreatedCount()
Adds to the count of created attachments.
|
void |
incrementIssuesCreatedCount()
Adds to the count of created issues.
|
void |
incrementRoleGroupCreatedCount(String roleName)
Should be called to increment the count of groups added to a specific role.
|
void |
incrementRoleUserCreatedCount(String roleName)
Should be called to increment the count of users added to a specific role.
|
void |
incrementUsersCreatedCount()
Adds to the count of created users.
|
boolean |
isImportCompleted()
Returns true if the import completed all steps of the import, false otherwise.
|
void |
setEndTime(long endTime)
The time, as milliseconds, that the import ended.
|
void |
setImportCompleted(boolean importCompleted)
Should be called with true if all steps of the import were able to proceed (i.e.
|
void |
setImportedProject(Project importedProject)
Sets the imported project, this is the project that exists in JIRA.
|
long getImportDuration()
setEndTime(long)
void setEndTime(long endTime)
endTime
- the time the import has stopped in millisecondsgetImportDuration()
void incrementRoleUserCreatedCount(String roleName)
roleName
- uniquely identifies the project role by its human readable name, this should not be the role id.getUsersCreatedCountForRole(String)
,
incrementRoleGroupCreatedCount(String)
void incrementRoleGroupCreatedCount(String roleName)
roleName
- uniquely identifies the project role by its human readable name, this should not be the role id.getGroupsCreatedCountForRole(String)
,
incrementRoleUserCreatedCount(String)
Collection<String> getRoles()
int getGroupsCreatedCountForRole(String roleName)
roleName
- the role you want the count for, this should be the role name as provided in the increment methodint getUsersCreatedCountForRole(String roleName)
roleName
- the role you want the count for, this should be the role name as provided in the increment methodvoid addError(String error)
AbortImportException
to stop the import.error
- the error message.List<String> getErrors()
boolean isImportCompleted()
void incrementIssuesCreatedCount()
void incrementUsersCreatedCount()
void incrementAttachmentsCreatedCount()
int getIssuesCreatedCount()
int getUsersCreatedCount()
int getAttachmentsCreatedCount()
int getExpectedIssuesCreatedCount()
int getExpectedUsersCreatedCount()
int getExpectedAttachmentsCreatedCount()
void setImportCompleted(boolean importCompleted)
importCompleted
- true if completed, false otherwise.Project getImportedProject()
void setImportedProject(Project importedProject)
importedProject
- the imported project, this is the project that exists in JIRA.I18nHelper getI18n()
I18nHelper
associated with this Project Import.
This can be used to localise error messages before they are added in this ProjectImportResult.I18nHelper
associated with this Project Import.boolean abortImport()
void addResult(long count, String msgKey)
count
- Number of objects importedmsgKey
- Key to a label message for the objects importedCopyright © 2002-2021 Atlassian. All Rights Reserved.