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

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

public class DataImportControl
extends BackdoorControl<DataImportControl>

Use this class from func/selenium/page-object tests that need to import data. Which is all of them. See DataImportBackdoor 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
static String FS
           
static String IMPORT
           
 
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
DataImportControl(JIRAEnvironmentData environmentData)
           
 
Method Summary
 boolean isSetUp()
           
 void restoreBlankInstance()
          Restores the instance with the default XML file.
 void restoreData(String xmlFileName)
          Deprecated. this method relies on JIRAEnvironmentData to get the file to restore and thus makes assumptions about the working directory the test process is running in. Use restoreDataFromResource(String) where possible and provide path to a classpath resource instead to stay independent from the environment
 void restoreDataFromResource(String resourcePath)
          

Restores the instance with the specified XML resource on the classpath (as it should to stay independent from the filesystem).

 void turnOffDangerMode()
           
 void turnOnDangerMode()
           
 
Methods inherited from class com.atlassian.jira.functest.framework.backdoor.BackdoorControl
createResource, delete, get, get, get, getId, log, log, post, post, 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
 

Field Detail

FS

public static final String FS

IMPORT

public static final String IMPORT
See Also:
Constant Field Values
Constructor Detail

DataImportControl

public DataImportControl(JIRAEnvironmentData environmentData)
Method Detail

isSetUp

public boolean isSetUp()

restoreBlankInstance

public void restoreBlankInstance()
Restores the instance with the default XML file. A commercial license is used.


restoreData

@Deprecated
public void restoreData(String xmlFileName)
Deprecated. this method relies on JIRAEnvironmentData to get the file to restore and thus makes assumptions about the working directory the test process is running in. Use restoreDataFromResource(String) where possible and provide path to a classpath resource instead to stay independent from the environment

Restores the instance with the specified XML file. A commercial license is used.

Parameters:
xmlFileName - the name of the file to import

restoreDataFromResource

public void restoreDataFromResource(String resourcePath)

Restores the instance with the specified XML resource on the classpath (as it should to stay independent from the filesystem). A commercial license is used.

This will also try to match a resource with prefix 'xml/'. This is to keep compatibility with the old way of restoring that searched in the 'xml' directory by default. That means that if your classpath resource that you want to restore is in an 'xml' package, this method will work even if you just provide the bare resource name.

Parameters:
resourcePath - path to the class path resource containing the file to restore

turnOffDangerMode

public void turnOffDangerMode()

turnOnDangerMode

public void turnOnDangerMode()


Copyright © 2002-2012 Atlassian. All Rights Reserved.