com.atlassian.jira.functest.framework.backdoor
Class ProjectControl

java.lang.Object
  extended by com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient<T>
      extended by com.atlassian.jira.functest.framework.backdoor.BackdoorControl<ProjectControl>
          extended by com.atlassian.jira.functest.framework.backdoor.ProjectControl
All Implemented Interfaces:
FuncTestLogger

public class ProjectControl
extends BackdoorControl<ProjectControl>

Use this class from func/selenium/page-object tests that need to manipulate Projects. See ProjectBackdoor for the code this plugs into at the back-end.

Since:
v5.0

Nested Class Summary
 
Nested classes/interfaces inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
RestApiClient.Method
 
Field Summary
 
Fields inherited from class com.atlassian.jira.functest.framework.backdoor.BackdoorControl
restPathRootLength
 
Fields inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
REST_VERSION
 
Constructor Summary
ProjectControl(JIRAEnvironmentData environmentData)
           
 
Method Summary
 void addProject(String name, String key, String lead)
          Adds a project, or if a project with that name exists, does almost nothing.
 void setDefaultIssueType(long projectId, String issueTypeId)
           
 void setIssueTypeScreenScheme(long projectId, long issueTypeScreenSchemeId)
           
 void setPermissionScheme(long projectId, long schemeId)
          Sets the permission scheme for the given Project to be the given Scheme.
 void setProjectDefaultAssignee(long projectId, boolean setToProjectLead)
          Sets the project's default assignee (i.e., the "Automatic" assignee) to either the project lead or to "Unassigned" (should JIRA be configured to allow assigning issues to Unassigned).
 void setProjectLead(long projectId, String username)
          Sets the project lead to the specified username.
 
Methods inherited from class com.atlassian.jira.functest.framework.backdoor.BackdoorControl
createResource, delete, get, get, get, getId, log, log, post
 
Methods inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
anonymous, errorResponse, expanded, loginAs, loginAs, percentEncode, resourceRoot, setOf, toResponse, toResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectControl

public ProjectControl(JIRAEnvironmentData environmentData)
Method Detail

addProject

public void addProject(String name,
                       String key,
                       String lead)
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.

setPermissionScheme

public void setPermissionScheme(long projectId,
                                long schemeId)
Sets the permission scheme for the given Project to be the given Scheme.

Parameters:
projectId - the id of the project.
schemeId - the id of the Permission Scheme.

setIssueTypeScreenScheme

public void setIssueTypeScreenScheme(long projectId,
                                     long issueTypeScreenSchemeId)

setDefaultIssueType

public void setDefaultIssueType(long projectId,
                                String issueTypeId)

setProjectLead

public void setProjectLead(long projectId,
                           String username)
Sets the project lead to the specified username.

Parameters:
projectId - the id of the project
username - the username of the user to set as the project lead.

setProjectDefaultAssignee

public void setProjectDefaultAssignee(long projectId,
                                      boolean setToProjectLead)
Sets the project's default assignee (i.e., the "Automatic" assignee) to either the project lead or to "Unassigned" (should JIRA be configured to allow assigning issues to Unassigned). Calling this resource may throw an exception should Unassigned not be a valid assignee for the project.

Parameters:
projectId - the id of the project
setToProjectLead - if true, the assignee will be set to the project lead. If false, it will attempt to set to Unassigned.
See Also:
com.atlassian.jira.bc.project.ProjectService.UpdateProjectValidationResult}


Copyright © 2002-2012 Atlassian. All Rights Reserved.