com.atlassian.jira.functest.framework.backdoor
Class BackdoorControl<T extends BackdoorControl<T>>

java.lang.Object
  extended by com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient<T>
      extended by com.atlassian.jira.functest.framework.backdoor.BackdoorControl<T>
All Implemented Interfaces:
FuncTestLogger
Direct Known Subclasses:
AdvancedSettingsControl, ApplicationPropertiesControl, DarkFeaturesControl, DashboardControl, DataImportControl, FieldConfigurationControl, GeneralConfigurationControl, I18nControl, IssueLinkingControl, IssuesControl, IssueTypeControl, IssueTypeScreenSchemesControl, MailServersControl, PermissionSchemesControl, PermissionsControl, PluginsControl, ProjectControl, SearchRequestControl, ServicesControl, SubtaskControl, TestRunnerControl, UserProfileControl, UsersAndGroupsControl, WebSudoControl, WorkflowSchemesControl, WorkflowsControl

public abstract class BackdoorControl<T extends BackdoorControl<T>>
extends RestApiClient<T>
implements FuncTestLogger

Parent class for Backdoor controllers making func-test REST requests to set up test state without the UI overhead. See the Backdoor classes in com.atlassian.jira.pageobjects.config of the jira-func-test-plugin module for more.

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
 int restPathRootLength
           
 
Fields inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
REST_VERSION
 
Constructor Summary
BackdoorControl(JIRAEnvironmentData environmentData)
           
 
Method Summary
protected  com.sun.jersey.api.client.WebResource createResource()
          Creates the resource that corresponds to the root of the func-test REST API.
protected  void delete(com.sun.jersey.api.client.WebResource webResource)
           
protected  String get(com.sun.jersey.api.client.WebResource webResource)
          Helper method for making easy GET calls.
protected
<T> T
get(com.sun.jersey.api.client.WebResource webResource, Class<T> returnClass)
           
protected
<T> T
get(com.sun.jersey.api.client.WebResource webResource, com.sun.jersey.api.client.GenericType<T> returnType)
           
protected  long getId(com.sun.jersey.api.client.WebResource webResource)
           
 void log(Object logData)
          This will data via a String.valueOf(logData) in the specified object.
 void log(Throwable t)
           
protected
<T> T
post(com.sun.jersey.api.client.WebResource webResource, Object bean, Class<T> returnClass)
           
 
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
 

Field Detail

restPathRootLength

public final int restPathRootLength
Constructor Detail

BackdoorControl

public BackdoorControl(JIRAEnvironmentData environmentData)
Method Detail

get

protected String get(com.sun.jersey.api.client.WebResource webResource)
Helper method for making easy GET calls. Feel free to add overloads to accept paths and parameter maps.

Parameters:
webResource - web resource
Returns:
response string

get

protected <T> T get(com.sun.jersey.api.client.WebResource webResource,
                    com.sun.jersey.api.client.GenericType<T> returnType)

get

protected <T> T get(com.sun.jersey.api.client.WebResource webResource,
                    Class<T> returnClass)

getId

protected long getId(com.sun.jersey.api.client.WebResource webResource)

post

protected <T> T post(com.sun.jersey.api.client.WebResource webResource,
                     Object bean,
                     Class<T> returnClass)

delete

protected void delete(com.sun.jersey.api.client.WebResource webResource)

createResource

protected com.sun.jersey.api.client.WebResource createResource()
Creates the resource that corresponds to the root of the func-test REST API.

Overrides:
createResource in class RestApiClient<T extends BackdoorControl<T>>
Returns:
a WebResource for the REST API root

log

public void log(Object logData)
Description copied from interface: FuncTestLogger
This will data via a String.valueOf(logData) in the specified object.

Specified by:
log in interface FuncTestLogger
Parameters:
logData - the objct to log via String.valueOf().

log

public void log(Throwable t)
Specified by:
log in interface FuncTestLogger


Copyright © 2002-2012 Atlassian. All Rights Reserved.