Interface Project
- All Known Implementing Classes:
ProjectImpl
public interface Project
Framework for manipulating projects
- Since:
- v3.13
-
Method Summary
Modifier and TypeMethodDescriptionaddComponent(String projectKey, String componentName, String description, String leadUserName) Adds a component to the projectlongaddProject(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.voidarchiveVersion(String projectKey, String versionName) Archives a version of a project.voidassignToDraftScheme(String projectKey, String workflowName, String... issueTypeIds) Edits the workflow scheme draft of the given project.voidassociateFieldConfigurationScheme(String projectName, String newFieldConfigurationSchemeName) Associates the specified configuration scheme with the project.voidassociateIssueLevelSecurityScheme(String projectName, String newIssueLevelSecuritySchemeName) Associates the specified configuration scheme with the project.voidassociateNotificationScheme(String projectName, String notificationSchemeName) Associates the specified notification scheme with the project.voidassociateWorkflowScheme(String projectName, String workflowSchemeName) Associates the specified workflow scheme with the project.voidassociateWorkflowScheme(String projectName, String workflowSchemeName, Map<String, String> statusMapping, boolean wait) Associates the specified workflow scheme with the project.voidcreateWorkflowSchemeDraft(String projectKey) Creates a draft workflow scheme of the project.voiddeleteProject(long projectId) Delete a projectvoiddeleteProject(String project) Delete project with the given namevoiddeleteVersion(String projectKey, String versionName) Deletes a version of a project.voideditComponent(String projectKey, String componentName, String name, String description, String leadUserName) Edits a component of a project.voideditProject(long projectId, String name, String description, String url) Change the parameters for the passed project.voideditVersionDetails(String projectName, String versionName, String name, String description, String releaseDate) Edits a version of a project.booleanprojectWithKeyExists(String project) Checks whether or not the specified project exists.voidpublishWorkflowSchemeDraft(String projectName, Long schemeId, Map<String, String> statusMapping, boolean wait) Publishes the workflow scheme draft of the specified project.voidreleaseVersion(String projectKey, String versionName, String releaseDate) Releases a version of a project.voidremoveAssociationOfIssueLevelSecurityScheme(String projectName) Removes associations of currently associated schema from project.voidsetProjectLead(String projectName, String userName) Sets the lead for a projectvoidunreleaseVersion(String projectKey, String versionName, String releaseDate) Unreleases a version of a project.voidwaitForWorkflowMigration(long sleepTime, int retryCount) Waits for the asynchronous workflow migration to complete.
-
Method Details
-
projectWithKeyExists
Checks whether or not the specified project exists.- Parameters:
project- the name of the project to check e.g. "homosapien"- Returns:
- true if the project already exists; false otherwise
-
addProject
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".- Parameters:
name- the name of the project.key- the project key.lead- the username of the project lead.- Returns:
- the project id.
-
editProject
Change the parameters for the passed project.- 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
void deleteProject(long projectId) Delete a project- Parameters:
projectId- the id of the project
-
deleteProject
Delete project with the given name- Parameters:
project- the project name.
-
addVersion
Adds a version to a project.- 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
Archives a version of a project.- Parameters:
projectKey- the name of the project e.g. "HSP"versionName- the name of the version e.g. "New Version 5"
-
releaseVersion
Releases a version of a project.- 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
Unreleases a version of a project.- 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
Deletes a version of a project.- 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
void editVersionDetails(String projectName, String versionName, String name, String description, String releaseDate) Edits a version of a project.- Parameters:
projectName- 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
void editComponent(String projectKey, String componentName, String name, String description, String leadUserName) Edits a component of a project.- 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
Associates the specified configuration scheme with the project.- Parameters:
projectName- the name of the project to alternewFieldConfigurationSchemeName- the name of the new field configuration scheme; usenullor"None"to restore the System Default Field Configuration Scheme.
-
associateIssueLevelSecurityScheme
Associates the specified configuration scheme with the project.- Parameters:
projectName- the name of the project to alternewIssueLevelSecuritySchemeName- the name of the new issue level security scheme; usenullor"None"to remove the scheme.
-
removeAssociationOfIssueLevelSecurityScheme
Removes associations of currently associated schema from project.- Parameters:
projectName- the name of the project to alter
-
associateWorkflowScheme
Associates the specified workflow scheme with the project.- Parameters:
projectName- the name of the project to alterworkflowSchemeName- name of the workflow scheme to associate.
-
associateWorkflowScheme
void associateWorkflowScheme(String projectName, String workflowSchemeName, Map<String, String> statusMapping, boolean wait) Associates the specified workflow scheme with the project.- Parameters:
projectName- the name of the project to alterworkflowSchemeName- name of the workflow scheme to associate.statusMapping- mapping for statuses
-
createWorkflowSchemeDraft
Creates a draft workflow scheme of the project.- Parameters:
projectKey- the key of the project whose draft scheme will be created
-
assignToDraftScheme
Edits the workflow scheme draft of the given project.- 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.
-
publishWorkflowSchemeDraft
void publishWorkflowSchemeDraft(String projectName, Long schemeId, Map<String, String> statusMapping, boolean wait) Publishes the workflow scheme draft of the specified project.- Parameters:
projectName- the name of the project to alterschemeId-statusMapping- mapping for statuses
-
waitForWorkflowMigration
void waitForWorkflowMigration(long sleepTime, int retryCount) Waits for the asynchronous workflow migration to complete.- 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.
-
associateNotificationScheme
Associates the specified notification scheme with the project.- Parameters:
projectName- the name of the project to alternotificationSchemeName- name of the notification scheme to associate.
-
setProjectLead
Sets the lead for a project- Parameters:
projectName- the project to changeuserName- the new project lead
-
addComponent
String addComponent(String projectKey, String componentName, String description, String leadUserName) Adds a component to the project- Parameters:
projectKey- the key of the projectcomponentName- the component namedescription- the description; usenullto not set oneleadUserName- the lead user's name; usenullto not set one- Returns:
- the id of the component
-