com.ibm.team.fvt.tests.topology
Class Topology

java.lang.Object
  extended by com.ibm.team.fvt.tests.topology.Topology

public abstract class Topology
extends java.lang.Object

Manage the scenario topology. A topology is made of applications (e.g. CLM applications: JTS, CCM, QM, RM, and LPA) which can be deployed either on collocated or distributed machines.

The topology has a baseUrl computed from "baseUrl" parameter. Each application might have its own address if the "baseUrlAPPLI" parameter is specified.

The topology manages user login to each application and typically provides service to know whether a login is necessary before going to a specific location.


Constructor Summary
Topology()
          Initialize the topology from a given CLM version.
 
Method Summary
 Application getApplication(java.lang.String url)
          Return the application matching the given url address.
 User getLoggedUser(java.lang.String url)
           
 java.lang.String getPageUrl(java.lang.String currentUrl)
          Return the modified page URL if necessary.
 void login(java.lang.String location, User user)
          Login the given user to the application matching the given location and do the same for all other applications on the same server.
 boolean logout(java.lang.String location, User newUser)
          Logout the given user from the application matching the given location and do the same for all other applications on the same server.
 boolean needLogin(java.lang.String location, User user)
          Returns whether the given user needs to login before accessing the given location.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Topology

public Topology()
Initialize the topology from a given CLM version.

Method Detail

getApplication

public Application getApplication(java.lang.String url)
Return the application matching the given url address.

Parameters:
url - The address
Returns:
The Application corresponding to the given address.
Throws:
ScenarioFailedError - If not application is found for the given address.

getLoggedUser

public User getLoggedUser(java.lang.String url)

login

public void login(java.lang.String location,
                  User user)
Login the given user to the application matching the given location and do the same for all other applications on the same server.

Parameters:
location - The location concerned by the login
user - The user concerned by the login

logout

public boolean logout(java.lang.String location,
                      User newUser)
Logout the given user from the application matching the given location and do the same for all other applications on the same server.

Parameters:
location - The location concerned by the logout
newUser - The user concerned by the login TODO Should use login(String, User) instead...

needLogin

public boolean needLogin(java.lang.String location,
                         User user)
Returns whether the given user needs to login before accessing the given location.

Parameters:
location - The location to go to
user - The user to use when going to the location
Returns:
true if the user has never accessed to the application matching the location and neither to no any other application of the same server, false otherwise.

getPageUrl

public java.lang.String getPageUrl(java.lang.String currentUrl)
Return the modified page URL if necessary.

Returns:
The page URL as a String.
See Also:
Application.getPageUrl(String)