|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AppServerImporter
The interface to implement for an application server importer.
Custom importer applications must extend BaseAppServerImporter
, which provides additional functionality
required by the framework.
A single instance of this class can be used repeatedly to import from different installations of an application
server, so implementations must not cache any data related to a specific installation of an application server.
Such information rightly belongs on the AppServer
returned by importAppServer(String)
.
Method Summary | |
---|---|
BaseAppServerClasspathProvider |
createClasspathProvider()
Oprtionally creates an instance of the AppServerClasspathProvider implementation for the application
server, defining the runtime classpath for it. |
JSPCompilerSupport |
createJSPCompilerSupprt()
Optionally creates an instance of the JSPCompilerSupport implementation for the application server,
defining JSP precompilation behavior for it. |
java.lang.String |
getId()
Returns the ID used to register this application server importer. |
JSPCompilerType |
getJSPCompilerType()
Specifies the JSP compiler to use for created projects. |
java.lang.String |
getName()
Returns the name for the application server importer, which is also the name of the application server it handles. |
boolean |
handleImportResult(org.eclipse.core.runtime.IStatus result,
java.lang.Object shell)
Displays, logs, or otherwise handles the IStatus representing the result of the import process. |
AppServer |
importAppServer(java.lang.String installDirectory)
Analyzes an application server directory and returns an AppServer object representing the server and
the applications on it. |
boolean |
isMultiProfile()
Indicates whether or not the application server type supports multiple profiles. |
boolean |
isValidLocation(java.lang.String installDirectory)
Determines if the specified install directory represents an instance of the application server that can be imported by this importer. |
void |
precompileJSPs(AppServer appServer)
Optionally precompiles the JSPs for the application server. |
Method Detail |
---|
java.lang.String getId()
java.lang.String getName()
boolean isMultiProfile()
For example, WebSphere Application Sever does, Tomcat does not.
boolean isValidLocation(java.lang.String installDirectory)
installDirectory
- The root directory of the application server
AppServer importAppServer(java.lang.String installDirectory) throws java.lang.Exception
AppServer
object representing the server and
the applications on it. This method is only called if isValidLocation(String)
returns true for the same
directory.
installDirectory
- The root directory of the application server
java.lang.Exception
- exceptions thrown by the implementations of this method are handled by the callerisValidLocation(String)
JSPCompilerType getJSPCompilerType()
Implementations that return JSPCompilerType.PRECOMPILED
here must implement
createJSPCompilerSupprt()
, createClasspathProvider()
, and precompileJSPs(AppServer)
.
precompileJSPs(AppServer)
,
createJSPCompilerSupprt()
,
createClasspathProvider()
JSPCompilerSupport createJSPCompilerSupprt()
JSPCompilerSupport
implementation for the application server,
defining JSP precompilation behavior for it. This only needs to be implemented if
getJSPCompilerType()
returns precompiled
. It is not needed in
importers that rely on shipped JSP compilers (e.g. Tomcat) being used at scan-time.
JSPCompilerSupport
or nullgetJSPCompilerType()
,
JSPCompilerType.PRECOMPILED
BaseAppServerClasspathProvider createClasspathProvider()
AppServerClasspathProvider
implementation for the application
server, defining the runtime classpath for it. This only needs to be implemented if
getJSPCompilerType()
returns precompiled
. It is not needed in
importers that rely on shipped JSP compilers (e.g. Tomcat) being used at scan-time.
BaseAppServerClasspathProvider
or nullAppServerClasspathProvider
,
getJSPCompilerType()
,
JSPCompilerType.PRECOMPILED
void precompileJSPs(AppServer appServer) throws java.lang.Exception
getJSPCompilerType()
returns precompiled
. It is not needed in
importers that rely on shipped JSP compilers (e.g. Tomcat) being used at scan-time.
Implementors should use AppServer.getMapping()
to obtain a Mapping
mapping to the imported
AppScan Source applications, and Application.getStagingDirectory(Project)
to obtain the staging directory
for a project.
appServer
- the application server
java.lang.Exception
- exceptions thrown by the implementations of this method are handled by the callergetJSPCompilerType()
,
JSPCompilerType.PRECOMPILED
,
AppServer.getMapping()
,
Mapping
,
Application.getStagingDirectory(Project)
boolean handleImportResult(org.eclipse.core.runtime.IStatus result, java.lang.Object shell)
IStatus
representing the result of the import process.
Implementations may do nothing and return false to let the caller provide default handling.
In a UI environment, the active window shell is supplied as the second argument, shell
. In a
non-UI environment, that argument will be null. Implementors wishing to display UI should do so only if
shell
is non-null. The parameter is declared as an Object
so that implementors do not
need to depend on SWT, but if the argument is non-null, it can always be cast safely to Shell
. If
displaying a dialog, the supplied active window shell should be used as its parent.
result
- result of the import processshell
- the shell of the active window, or null in a non-UI environment
Shell
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |