com.flexive.shared
Class FxDropApplication

java.lang.Object
  extended by com.flexive.shared.FxDropApplication
All Implemented Interfaces:
java.io.Serializable

public class FxDropApplication
extends java.lang.Object
implements java.io.Serializable

Information about a "drop application" deployed as part of the flexive EAR.

Some properties can be configured in a file called flexive-application.properties in the root folder of the application shared JAR file:

 # Application name
 name=hello-flexive
 displayName=Hello-World Application

 # Context root (must match the path specified in application.xml, used for the backend start page)
 contextRoot=war
 

Since:
3.0.2
Version:
$Rev: 949 $
Author:
Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Constructor Summary
FxDropApplication(java.lang.String name)
          Create a new application descriptor.
FxDropApplication(java.lang.String name, java.lang.String contextRoot, java.lang.String displayName, java.lang.String resourceJarURL)
          Create a new application descriptor.
 
Method Summary
 java.lang.String getContextRoot()
          Return the context root of the web application.
 java.lang.String getDisplayName()
          Returns a human-readable name of the application.
 java.lang.String getName()
          Return the unique name of the application.
 java.util.jar.JarInputStream getResourceJarStream()
          Returns a stream to the JAR file containing the resources of the drop applications.
 java.lang.String getResourceJarURL()
          Returns the URL of the JAR file containing the resources of the drop application, usually the "shared" module (but it could be any JAR file).
 boolean isWebContextAvailable()
          Returns true when the drop application has a web context available (i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FxDropApplication

public FxDropApplication(java.lang.String name,
                         java.lang.String contextRoot,
                         java.lang.String displayName,
                         java.lang.String resourceJarURL)
Create a new application descriptor.

Parameters:
name - the unique name of the application
contextRoot - the context root of the web application
displayName - a human-readable name of the application
resourceJarURL - the URL of the JAR file containing the resources of the drop application

FxDropApplication

public FxDropApplication(java.lang.String name)
Create a new application descriptor. The application name will also be used for the display name and the context root path.

Parameters:
name - the unique name of the application
Method Detail

getName

public java.lang.String getName()
Return the unique name of the application. It should not contain spaces or non-alphanumeric characters (excluding "-" and "_").

Returns:
the unique name of the application

getContextRoot

public java.lang.String getContextRoot()
Return the context root of the web application. This defaults to the name, but can be customized in flexive-application.properties.

When an application uses

flexive-application.properties

but does not specify a contextRoot, it is assumed that the application does not provide a web context.

Returns:
the context root of the web application

isWebContextAvailable

public boolean isWebContextAvailable()
Returns true when the drop application has a web context available (i.e. a context root has been set).

Returns:
true when the drop application has a web context available (i.e. a context root has been set).
Since:
3.0.3

getDisplayName

public java.lang.String getDisplayName()
Returns a human-readable name of the application. This defaults to the name, but can be customized in flexive-application.properties.

Returns:
a human-readable name of the application

getResourceJarURL

public java.lang.String getResourceJarURL()
Returns the URL of the JAR file containing the resources of the drop application, usually the "shared" module (but it could be any JAR file).

Returns:
the URL of the JAR file containing the resources of the drop application

getResourceJarStream

public java.util.jar.JarInputStream getResourceJarStream()
                                                  throws java.io.IOException
Returns a stream to the JAR file containing the resources of the drop applications.

Returns:
a stream to the JAR file containing the resources of the drop applications.
Throws:
java.io.IOException - if the JAR file stream could not be opened