com.atlassian.crowd.acceptance.tests.rest
Enum RestServerImpl

java.lang.Object
  extended by java.lang.Enum<RestServerImpl>
      extended by com.atlassian.crowd.acceptance.tests.rest.RestServerImpl
All Implemented Interfaces:
RestServer, Serializable, Comparable<RestServerImpl>

public enum RestServerImpl
extends Enum<RestServerImpl>
implements RestServer


Enum Constant Summary
INSTANCE
           
 
Method Summary
 void after()
          This method is called after each test is run, and it should free resources.
 void before()
          This method is called before each test is run, and it should reset the server in a predictable state.
 com.sun.jersey.api.client.Client decorateClient(com.sun.jersey.api.client.Client client)
          Perform custom processing on the Jersey client, such as adding any necessary headers for multitenant tests.
 String getContextPath()
          Returns the context path of the server.
 String getHost()
          Returns the host name of the server.
 int getPort()
          Returns the port of the server.
 void intendToModifyData()
           
static RestServerImpl valueOf(String name)
          Returns the enum constant of this type with the specified name.
static RestServerImpl[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INSTANCE

public static final RestServerImpl INSTANCE
Method Detail

values

public static RestServerImpl[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (RestServerImpl c : RestServerImpl.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static RestServerImpl valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

before

public void before()
            throws Exception
Description copied from interface: RestServer
This method is called before each test is run, and it should reset the server in a predictable state.

Specified by:
before in interface RestServer
Throws:
Exception - if the server could not be restored

after

public void after()
Description copied from interface: RestServer
This method is called after each test is run, and it should free resources.

Specified by:
after in interface RestServer

intendToModifyData

public void intendToModifyData()
Specified by:
intendToModifyData in interface RestServer

getHost

public String getHost()
Description copied from interface: RestServer
Returns the host name of the server.

Specified by:
getHost in interface RestServer
Returns:
host name of the server

getPort

public int getPort()
Description copied from interface: RestServer
Returns the port of the server.

Specified by:
getPort in interface RestServer
Returns:
port of the server

getContextPath

public String getContextPath()
Description copied from interface: RestServer
Returns the context path of the server.

Specified by:
getContextPath in interface RestServer
Returns:
context path of the server

decorateClient

public com.sun.jersey.api.client.Client decorateClient(com.sun.jersey.api.client.Client client)
Description copied from interface: RestServer
Perform custom processing on the Jersey client, such as adding any necessary headers for multitenant tests.

Specified by:
decorateClient in interface RestServer
Parameters:
client - The client to decorate
Returns:
The decorated client


Copyright © 2012 Atlassian. All Rights Reserved.