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:
ApplicationPropertiesControl, DarkFeaturesControl, DataImportControl, I18nControl, IssuesControl, MailServersControl, PermissionSchemesControl, PermissionsControl, ProjectControl, SearchRequestControl, ServicesControl, UserProfileControl, UsersAndGroupsControl

public abstract class BackdoorControl<T extends BackdoorControl<T>>
extends com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.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
com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient.Method
 
Field Summary
 int restPathRootLength
           
 
Fields inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
REST_VERSION
 
Constructor Summary
BackdoorControl(com.atlassian.jira.webtests.util.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  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(com.atlassian.jira.webtests.util.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)

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 com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.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.