com.atlassian.jira.functest.framework.admin
Class ProjectImpl

java.lang.Object
  extended by com.atlassian.jira.functest.framework.AbstractFuncTestUtil
      extended by com.atlassian.jira.functest.framework.admin.ProjectImpl
All Implemented Interfaces:
Project, FuncTestLogger

public class ProjectImpl
extends AbstractFuncTestUtil
implements Project

Implementation of Project interface

Since:
v3.13

Field Summary
 
Fields inherited from class com.atlassian.jira.functest.framework.AbstractFuncTestUtil
environmentData, FS, locators, logger, logIndentLevel, tester
 
Constructor Summary
ProjectImpl(net.sourceforge.jwebunit.WebTester tester, com.atlassian.jira.webtests.util.JIRAEnvironmentData environmentData, Navigation navigation, Assertions assertions, AsynchronousTasks asynchronousTasks)
           
 
Method Summary
 String addComponent(String projectKey, String componentName, String description, String leadUserName)
          Adds a component to the project
 long addProject(String name, String key, String lead)
          Adds a project, or if a project with that name exists, does almost nothing.
 String 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 associateFieldConfigurationScheme(String projectName, String newFieldConfigurationSchemeName)
          Associates the specified configuration scheme with the project.
 void associateNotificationScheme(String projectName, 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 deleteProject(long projectId)
          Delete a project
 void deleteProject(String project)
          Delete project with the given name
 void 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 projectExists(String project)
          Checks whether or not the specified project exists.
 void releaseVersion(String projectKey, String versionName, String releaseDate)
          Releases a version of a project.
 void setProjectLead(String projectName, String userName)
          Sets the lead for a project
 void unreleaseVersion(String projectKey, String versionName, String releaseDate)
          Unreleases a version of a project.
 void viewProject(String project)
          Browses to the View Project administration screen.
 
Methods inherited from class com.atlassian.jira.functest.framework.AbstractFuncTestUtil
childLogIndentLevel, getAssertions, getEnvironmentData, getFuncTestHelperFactory, getLogger, log, log, navigation, submitAtPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectImpl

public ProjectImpl(net.sourceforge.jwebunit.WebTester tester,
                   com.atlassian.jira.webtests.util.JIRAEnvironmentData environmentData,
                   Navigation navigation,
                   Assertions assertions,
                   AsynchronousTasks asynchronousTasks)
Method Detail

addProject

public long addProject(String name,
                       String key,
                       String lead)
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 interface Project
Parameters:
name - the name of the project.
key - the project key.
lead - the username of the project lead.
Returns:
the project id.

viewProject

public void viewProject(String project)
Description copied from interface: Project
Browses to the View Project administration screen.

Specified by:
viewProject in interface Project
Parameters:
project - the name of the project

editProject

public void editProject(long projectId,
                        String name,
                        String description,
                        String url)
Description copied from interface: Project
Change the parameters for the passed project.

Specified by:
editProject in interface 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

public void deleteProject(long projectId)
Description copied from interface: Project
Delete a project

Specified by:
deleteProject in interface Project
Parameters:
projectId - the id of the project

deleteProject

public void deleteProject(String project)
Description copied from interface: Project
Delete project with the given name

Specified by:
deleteProject in interface Project
Parameters:
project - 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 interface Project
Parameters:
projectKey - the key of the project
componentName - the component name
description - the description; use null to not set one
leadUserName - the lead user's name; use null 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 interface 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 description
releaseDate - the new release date of the version; use null to not provide a release date
Returns:
the version id.

archiveVersion

public void archiveVersion(String projectKey,
                           String versionName)
Description copied from interface: Project
Archives a version of a project.

Specified by:
archiveVersion in interface Project
Parameters:
projectKey - the name of the project e.g. "HSP"
versionName - the name of the version e.g. "New Version 5"

releaseVersion

public void releaseVersion(String projectKey,
                           String versionName,
                           String releaseDate)
Description copied from interface: Project
Releases a version of a project.

Specified by:
releaseVersion in interface 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

public void unreleaseVersion(String projectKey,
                             String versionName,
                             String releaseDate)
Description copied from interface: Project
Unreleases a version of a project.

Specified by:
unreleaseVersion in interface 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

public void deleteVersion(String projectKey,
                          String versionName)
Description copied from interface: Project
Deletes a version of a project.

Specified by:
deleteVersion in interface 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

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 interface Project
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 value
description - the new description of the version; use null to retain previous value
releaseDate - 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 interface 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 value
description - the new description of the component; use null to retain previous value
leadUserName - 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 interface Project
Parameters:
projectName - the name of the project to alter
newFieldConfigurationSchemeName - the name of the new field configuration scheme; use null or "None" to restore the System Default Field Configuration Scheme.

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 interface Project
Parameters:
projectName - the name of the project to alter
workflowSchemeName - name of the workflow scheme to associate.
statusMapping - mapping for statuses

associateWorkflowScheme

public void associateWorkflowScheme(String projectName,
                                    String workflowSchemeName)
Description copied from interface: Project
Associates the specified workflow scheme with the project.

Specified by:
associateWorkflowScheme in interface Project
Parameters:
projectName - the name of the project to alter
workflowSchemeName - name of the workflow scheme to associate.

associateNotificationScheme

public void associateNotificationScheme(String projectName,
                                        String notificationSchemeName)
Description copied from interface: Project
Associates the specified notification scheme with the project.

Specified by:
associateNotificationScheme in interface Project
Parameters:
projectName - the name of the project to alter
notificationSchemeName - name of the notification scheme to associate.

setProjectLead

public void setProjectLead(String projectName,
                           String userName)
Description copied from interface: Project
Sets the lead for a project

Specified by:
setProjectLead in interface Project
Parameters:
projectName - the project to change
userName - the new project lead

projectExists

public boolean projectExists(String project)
Description copied from interface: Project
Checks whether or not the specified project exists.

Specified by:
projectExists in interface Project
Parameters:
project - the name of the project to check e.g. "homosapien"
Returns:
true if the project already exists; false otherwise


Copyright © 2002-2011 Atlassian. All Rights Reserved.