Class ProjectImpl
java.lang.Object
com.atlassian.jira.functest.framework.admin.ProjectImpl
- All Implemented Interfaces:
Project
Implementation of Project interface
- Since:
- v3.13
-
Constructor Summary
ConstructorsConstructorDescriptionProjectImpl
(Backdoor backdoor, net.sourceforge.jwebunit.WebTester tester, JIRAEnvironmentData environmentData, Navigation navigation, Assertions assertions, AsynchronousTasks asynchronousTasks) -
Method Summary
Modifier and TypeMethodDescriptionaddComponent
(String projectKey, String componentName, String description, String leadUserName) Adds a component to the projectlong
addProject
(String name, String key, String lead) Adds a project, or if a project with that name exists, does almost nothing.addVersion
(String projectKey, String versionName, String description, String releaseDate) Adds a version to a project.void
archiveVersion
(String projectKey, String versionName) Archives a version of a project.void
assignToDraftScheme
(String projectKey, String workflowName, String... issueTypeIds) Edits the workflow scheme draft of the given project.void
associateFieldConfigurationScheme
(String projectName, String newFieldConfigurationSchemeName) Associates the specified configuration scheme with the project.void
associateIssueLevelSecurityScheme
(String projectName, String newIssueLevelSecuritySchemeName) Associates the specified configuration scheme with the project.void
associateNotificationScheme
(String projectKey, String notificationSchemeName) Associates the specified notification scheme with the project.void
associateWorkflowScheme
(String projectName, String workflowSchemeName) Associates the specified workflow scheme with the project.void
associateWorkflowScheme
(String projectName, String workflowSchemeName, Map<String, String> statusMapping, boolean wait) Associates the specified workflow scheme with the project.void
createWorkflowSchemeDraft
(String projectKey) Creates a draft workflow scheme of the project.void
deleteProject
(long projectId) Delete a projectvoid
deleteProject
(String projectName) Delete project with the given namevoid
deleteVersion
(String projectKey, String versionName) Deletes a version of a project.void
editComponent
(String projectKey, String componentName, String name, String description, String leadUserName) Edits a component of a project.void
editProject
(long projectId, String name, String description, String url) Change the parameters for the passed project.void
editVersionDetails
(String projectKey, String versionName, String name, String description, String releaseDate) Edits a version of a project.boolean
projectWithKeyExists
(String projectKey) Checks whether or not the specified project exists.void
publishWorkflowSchemeDraft
(String projectName, Long schemeId, Map<String, String> statusMapping, boolean wait) Publishes the workflow scheme draft of the specified project.void
releaseVersion
(String projectKey, String versionName, String releaseDate) Releases a version of a project.void
removeAssociationOfIssueLevelSecurityScheme
(String projectName) Removes associations of currently associated schema from project.void
setProjectLead
(String projectName, String userName) Sets the lead for a projectvoid
unreleaseVersion
(String projectKey, String versionName, String releaseDate) Unreleases a version of a project.void
waitForWorkflowMigration
(long sleepTime, int retryCount) Waits for the asynchronous workflow migration to complete.
-
Constructor Details
-
Method Details
-
addProject
Description copied from interface:Project
Adds a project, or if a project with that name exists, does almost nothing. Choose a project name that will not clash with operational links on the page such as "View Projects" or "Add".- Specified by:
addProject
in interfaceProject
- Parameters:
name
- the name of the project.key
- the project key.lead
- the username of the project lead.- Returns:
- the project id.
-
editProject
Description copied from interface:Project
Change the parameters for the passed project.- Specified by:
editProject
in interfaceProject
- Parameters:
projectId
- the id of the project to change.name
- the new name of the project. Set to null to keep current setting.description
- the description of the project. Set to null to keep current setting.url
- the url for the project. Set to null to keep current setting.
-
deleteProject
public void deleteProject(long projectId) Description copied from interface:Project
Delete a project- Specified by:
deleteProject
in interfaceProject
- Parameters:
projectId
- the id of the project
-
deleteProject
Description copied from interface:Project
Delete project with the given name- Specified by:
deleteProject
in interfaceProject
- Parameters:
projectName
- the project name.
-
addComponent
public String addComponent(String projectKey, String componentName, String description, String leadUserName) Description copied from interface:Project
Adds a component to the project- Specified by:
addComponent
in interfaceProject
- Parameters:
projectKey
- the key of the projectcomponentName
- the component namedescription
- the description; usenull
to not set oneleadUserName
- the lead user's name; usenull
to not set one- Returns:
- the id of the component
-
addVersion
public String addVersion(String projectKey, String versionName, String description, String releaseDate) Description copied from interface:Project
Adds a version to a project.- Specified by:
addVersion
in interfaceProject
- Parameters:
projectKey
- the key of the project e.g. "HSP".versionName
- the name of the version e.g. "New Version 1"description
- the new description of the version; use null to not provide a descriptionreleaseDate
- the new release date of the version; use null to not provide a release date- Returns:
- the version id.
-
archiveVersion
Description copied from interface:Project
Archives a version of a project.- Specified by:
archiveVersion
in interfaceProject
- Parameters:
projectKey
- the name of the project e.g. "HSP"versionName
- the name of the version e.g. "New Version 5"
-
releaseVersion
Description copied from interface:Project
Releases a version of a project.- Specified by:
releaseVersion
in interfaceProject
- Parameters:
projectKey
- the name of the project e.g. "HSP". Must not be null.versionName
- the name of the version e.g. "New Version 5". Must not be null.releaseDate
- the release date of the version. Use null to ignore setting of this field.
-
unreleaseVersion
Description copied from interface:Project
Unreleases a version of a project.- Specified by:
unreleaseVersion
in interfaceProject
- Parameters:
projectKey
- the name of the project e.g. "HSP". Must not be null.versionName
- the name of the version e.g. "New Version 5". Must not be null.releaseDate
- the release date of the version. Use null to ignore setting of this field.
-
deleteVersion
Description copied from interface:Project
Deletes a version of a project.- Specified by:
deleteVersion
in interfaceProject
- Parameters:
projectKey
- the name of the project e.g. "HSP". Must not be null.versionName
- the name of the version e.g. "New Version 5". Must not be null.
-
editVersionDetails
public void editVersionDetails(String projectKey, String versionName, String name, String description, String releaseDate) Description copied from interface:Project
Edits a version of a project.- Specified by:
editVersionDetails
in interfaceProject
- Parameters:
projectKey
- the name of the project e.g. "homosapien".versionName
- the name of the version e.g. "New Version 1"name
- the new name of the version; use null to retain previous valuedescription
- the new description of the version; use null to retain previous valuereleaseDate
- the new release date of the version; use null to retain previous value
-
editComponent
public void editComponent(String projectKey, String componentName, String name, String description, String leadUserName) Description copied from interface:Project
Edits a component of a project.- Specified by:
editComponent
in interfaceProject
- Parameters:
projectKey
- the key of the project e.g. "HSP".componentName
- the name of the component e.g. "New Component 1"name
- the new name of the component; use null to retain previous valuedescription
- the new description of the component; use null to retain previous valueleadUserName
- the new username of the component lead; use null to retain previous value
-
associateFieldConfigurationScheme
public void associateFieldConfigurationScheme(String projectName, String newFieldConfigurationSchemeName) Description copied from interface:Project
Associates the specified configuration scheme with the project.- Specified by:
associateFieldConfigurationScheme
in interfaceProject
- Parameters:
projectName
- the name of the project to alternewFieldConfigurationSchemeName
- the name of the new field configuration scheme; usenull
or"None"
to restore the System Default Field Configuration Scheme.
-
associateIssueLevelSecurityScheme
public void associateIssueLevelSecurityScheme(String projectName, String newIssueLevelSecuritySchemeName) Description copied from interface:Project
Associates the specified configuration scheme with the project.- Specified by:
associateIssueLevelSecurityScheme
in interfaceProject
- Parameters:
projectName
- the name of the project to alternewIssueLevelSecuritySchemeName
- the name of the new issue level security scheme; usenull
or"None"
to remove the scheme.
-
removeAssociationOfIssueLevelSecurityScheme
Description copied from interface:Project
Removes associations of currently associated schema from project.- Specified by:
removeAssociationOfIssueLevelSecurityScheme
in interfaceProject
- Parameters:
projectName
- the name of the project to alter
-
associateWorkflowScheme
public void associateWorkflowScheme(String projectName, String workflowSchemeName, Map<String, String> statusMapping, boolean wait) Description copied from interface:Project
Associates the specified workflow scheme with the project.- Specified by:
associateWorkflowScheme
in interfaceProject
- Parameters:
projectName
- the name of the project to alterworkflowSchemeName
- name of the workflow scheme to associate.statusMapping
- mapping for statuses
-
createWorkflowSchemeDraft
Description copied from interface:Project
Creates a draft workflow scheme of the project.- Specified by:
createWorkflowSchemeDraft
in interfaceProject
- Parameters:
projectKey
- the key of the project whose draft scheme will be created
-
assignToDraftScheme
Description copied from interface:Project
Edits the workflow scheme draft of the given project.- Specified by:
assignToDraftScheme
in interfaceProject
- Parameters:
projectKey
- the key of the project whose draft scheme will be editedworkflowName
- name of the workflow to assign issue types to.issueTypeIds
- issue types to assign.
-
associateWorkflowScheme
Description copied from interface:Project
Associates the specified workflow scheme with the project.- Specified by:
associateWorkflowScheme
in interfaceProject
- Parameters:
projectName
- the name of the project to alterworkflowSchemeName
- name of the workflow scheme to associate.
-
publishWorkflowSchemeDraft
public void publishWorkflowSchemeDraft(String projectName, Long schemeId, Map<String, String> statusMapping, boolean wait) Description copied from interface:Project
Publishes the workflow scheme draft of the specified project.- Specified by:
publishWorkflowSchemeDraft
in interfaceProject
- Parameters:
projectName
- the name of the project to alterstatusMapping
- mapping for statuses
-
associateNotificationScheme
Description copied from interface:Project
Associates the specified notification scheme with the project.- Specified by:
associateNotificationScheme
in interfaceProject
- Parameters:
projectKey
- the name of the project to alternotificationSchemeName
- name of the notification scheme to associate.
-
waitForWorkflowMigration
public void waitForWorkflowMigration(long sleepTime, int retryCount) Description copied from interface:Project
Waits for the asynchronous workflow migration to complete.- Specified by:
waitForWorkflowMigration
in interfaceProject
- Parameters:
sleepTime
- The time to sleep before refreshing the page again and checking for the operation to be finished.retryCount
- The number of times we will try to check for the operation to be finished.
-
setProjectLead
Description copied from interface:Project
Sets the lead for a project- Specified by:
setProjectLead
in interfaceProject
- Parameters:
projectName
- the project to changeuserName
- the new project lead
-
projectWithKeyExists
Description copied from interface:Project
Checks whether or not the specified project exists.- Specified by:
projectWithKeyExists
in interfaceProject
- Parameters:
projectKey
- the name of the project to check e.g. "homosapien"- Returns:
- true if the project already exists; false otherwise
-