|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.imports.project.core.ProjectImportResultsImpl
public class ProjectImportResultsImpl
| Constructor Summary | |
|---|---|
ProjectImportResultsImpl(long startTime,
int expectedIssuesCreatedCount,
int expectedUsersCreatedCount,
int expectedAttachmentsCreatedCount,
I18nHelper i18n)
|
|
| Method Summary | |
|---|---|
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. |
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. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProjectImportResultsImpl(long startTime,
int expectedIssuesCreatedCount,
int expectedUsersCreatedCount,
int expectedAttachmentsCreatedCount,
I18nHelper i18n)
| Method Detail |
|---|
public long getImportDuration()
ProjectImportResults
getImportDuration in interface ProjectImportResultsProjectImportResults.setEndTime(long)public void setEndTime(long endTime)
ProjectImportResults
setEndTime in interface ProjectImportResultsendTime - the time the import has stopped in millisecondsProjectImportResults.getImportDuration()public void incrementRoleUserCreatedCount(String roleName)
ProjectImportResults
incrementRoleUserCreatedCount in interface ProjectImportResultsroleName - uniquely identifies the project role by its human readable name, this should not be the role id.ProjectImportResults.getUsersCreatedCountForRole(String),
ProjectImportResults.incrementRoleGroupCreatedCount(String)public void incrementRoleGroupCreatedCount(String roleName)
ProjectImportResults
incrementRoleGroupCreatedCount in interface ProjectImportResultsroleName - uniquely identifies the project role by its human readable name, this should not be the role id.ProjectImportResults.getGroupsCreatedCountForRole(String),
ProjectImportResults.incrementRoleUserCreatedCount(String)public Collection<String> getRoles()
ProjectImportResults
getRoles in interface ProjectImportResultspublic int getGroupsCreatedCountForRole(String roleName)
ProjectImportResults
getGroupsCreatedCountForRole in interface ProjectImportResultsroleName - the role you want the count for, this should be the role name as provided in the increment method
public int getUsersCreatedCountForRole(String roleName)
ProjectImportResults
getUsersCreatedCountForRole in interface ProjectImportResultsroleName - the role you want the count for, this should be the role name as provided in the increment method
public void addError(String error)
ProjectImportResultsAbortImportException to stop the import.
addError in interface ProjectImportResultserror - the error message.public List<String> getErrors()
ProjectImportResults
getErrors in interface ProjectImportResultspublic boolean isImportCompleted()
ProjectImportResults
isImportCompleted in interface ProjectImportResultspublic void incrementIssuesCreatedCount()
ProjectImportResults
incrementIssuesCreatedCount in interface ProjectImportResultspublic void incrementUsersCreatedCount()
ProjectImportResults
incrementUsersCreatedCount in interface ProjectImportResultspublic void incrementAttachmentsCreatedCount()
ProjectImportResults
incrementAttachmentsCreatedCount in interface ProjectImportResultspublic int getIssuesCreatedCount()
ProjectImportResults
getIssuesCreatedCount in interface ProjectImportResultspublic int getUsersCreatedCount()
ProjectImportResults
getUsersCreatedCount in interface ProjectImportResultspublic int getAttachmentsCreatedCount()
ProjectImportResults
getAttachmentsCreatedCount in interface ProjectImportResultspublic int getExpectedIssuesCreatedCount()
ProjectImportResults
getExpectedIssuesCreatedCount in interface ProjectImportResultspublic int getExpectedUsersCreatedCount()
ProjectImportResults
getExpectedUsersCreatedCount in interface ProjectImportResultspublic int getExpectedAttachmentsCreatedCount()
ProjectImportResults
getExpectedAttachmentsCreatedCount in interface ProjectImportResultspublic void setImportCompleted(boolean importCompleted)
ProjectImportResults
setImportCompleted in interface ProjectImportResultsimportCompleted - true if completed, false otherwise.public Project getImportedProject()
ProjectImportResults
getImportedProject in interface ProjectImportResultspublic void setImportedProject(Project importedProject)
ProjectImportResults
setImportedProject in interface ProjectImportResultsimportedProject - the imported project, this is the project that exists in JIRA.public I18nHelper getI18n()
ProjectImportResultsI18nHelper associated with this Project Import.
This can be used to localise error messages before they are added in this ProjectImportResult.
getI18n in interface ProjectImportResultsI18nHelper associated with this Project Import.public boolean abortImport()
ProjectImportResults
abortImport in interface ProjectImportResults
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||