com.ouncelabs.core.appserverimporter.mapping
Class Application

java.lang.Object
  extended by com.ouncelabs.core.appserverimporter.mapping.Application

public final class Application
extends java.lang.Object

Represents a particular grouping of projects within an application server profile as an AppScan Source application.


Constructor Summary
Application(java.lang.String name, AppServerProfile appServerProfile, java.util.List<Project> projects)
          Creates a new application.
 
Method Summary
 AppServerProfile getAppServerProfile()
          Returns the application server profile from which the application is drawn.
 java.lang.String getName()
          Returns the name of the application.
 java.util.List<Project> getProjects()
          Returns the projects grouped into the application.
 java.io.File getStagingDirectory(Project project)
          Returns the staging directory for the AppScan Source project corresponding to the given application server project.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Application

public Application(java.lang.String name,
                   AppServerProfile appServerProfile,
                   java.util.List<Project> projects)
Creates a new application.

Parameters:
name - the name of the application
appServerProfile - the application server profile from which the application is drawn
projects - the projects grouped into the application
Method Detail

getName

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

Returns:
the application name

getAppServerProfile

public AppServerProfile getAppServerProfile()
Returns the application server profile from which the application is drawn.

Returns:
the application server profile

getProjects

public java.util.List<Project> getProjects()
Returns the projects grouped into the application.

Returns:
a list of the application's projects

getStagingDirectory

public java.io.File getStagingDirectory(Project project)
Returns the staging directory for the AppScan Source project corresponding to the given application server project. This value is computed to match what the middletier does when creating the application project.

Parameters:
project - a project of this application
Returns:
the staging directory for the corresponding AppScan Source project
Throws:
java.lang.IllegalArgumentException - if the project is not in the list returned by getProjects()
See Also:
getProjects()

toString

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