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

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

public abstract class Application
extends java.lang.Object

Abstract class for a topology application.

An application is identified by its location which is assumed to be the prefix for any web page URL of this application.

It's also assumed that this location is the concatenation of two strings:

  1. the server address: expected format is https:Server_DNS_Name:port_value (e.g. https://jbslnxvh02.ottawa.ibm.com:9443)
  2. the context root: usually a simple name (e.g. jts)

A user might be stored in the application let the topology know who is connected to this application.

An application is responsible to provide web pages address to client.

Following functionalities are also defined by this page:


Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getContextRoot()
          Return the context root of the application.
 java.lang.String getHostUrl()
          Return the host name and port number of the machine hosting this application.
 java.lang.String getLicense()
          Returns the license that the application uses.
 java.lang.String[] getLicenses()
          Returns the application licenses.
 java.lang.String getLocation()
          The application location.
 java.lang.String getName()
          Returns the application name.
 java.lang.String getPageUrl(java.lang.String pageUrl)
          Return the modified page URL if necessary.
 java.lang.String getProductName()
          Returns the application product name.
 java.lang.String getSuffix()
          Returns the application suffix.
 java.lang.String getTitle()
          Returns the application title.
 java.lang.String getTitleSuffix()
          Deprecated. Use getSuffix() instead
 java.lang.String getType()
          Returns the application type.
 java.lang.String getTypeSuffix()
          Returns the type suffix.
 User getUser()
           
 int hashCode()
           
 boolean login(User newUser)
          Login the given user to the application.
 boolean logout()
          Logout the current user from the application.
 boolean needLogin(User newUser)
          Tells whether the current application would need login for the given user.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getContextRoot

public java.lang.String getContextRoot()
Return the context root of the application.

Returns:
The context root as a String.

getHostUrl

public java.lang.String getHostUrl()
Return the host name and port number of the machine hosting this application.

Returns:
The host url, including the port number, as a String

getLicense

public java.lang.String getLicense()
Returns the license that the application uses.

Returns:
The application license as a String.

getLicenses

public java.lang.String[] getLicenses()
Returns the application licenses.

Returns:
The application licenses as an array of String.

getLocation

public java.lang.String getLocation()
The application location.

Returns:
The location as a String.

getName

public java.lang.String getName()
Returns the application name.

Returns:
The name as a String.

getPageUrl

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

Default is not to modify the page url.

Returns:
The page URL as a String.

getProductName

public java.lang.String getProductName()
Returns the application product name.

Returns:
The application product name as a String.

getTitle

public java.lang.String getTitle()
Returns the application title.

Returns:
The application title as a String.

getSuffix

public java.lang.String getSuffix()
Returns the application suffix.

Default is no suffix.

Returns:
The application suffix as a String

getTitleSuffix

@Deprecated
public java.lang.String getTitleSuffix()
Deprecated. Use getSuffix() instead

Returns the title suffix.

Default is no suffix.

Returns:
The title suffix as a String

getType

public java.lang.String getType()
Returns the application type.

Returns:
The application type as a String.

getTypeSuffix

public java.lang.String getTypeSuffix()
Returns the type suffix.

Default is no suffix.

Returns:
The type suffix as a String

getUser

public User getUser()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

login

public boolean login(User newUser)
Login the given user to the application.

Parameters:
newUser - The new user which would be connected to the application
Returns:
true if the user was changed on the current application, false otherwise.

logout

public boolean logout()
Logout the current user from the application.

Returns:
true if the user was logged out from the current application, false otherwise.

needLogin

public boolean needLogin(User newUser)
Tells whether the current application would need login for the given user.

Parameters:
newUser - The new user which would be connected to the application
Returns:
true if the user implied a login operation if it would connect to the application, false otherwise

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object