com.caucho.server.e_app
Class EnterpriseApplication

java.lang.Object
  extended by com.caucho.server.e_app.EnterpriseApplication
All Implemented Interfaces:
DeployInstance, EnvironmentDeployInstance, EnvironmentBean, Dependency

@Module
public class EnterpriseApplication
extends java.lang.Object
implements EnvironmentBean, EnvironmentDeployInstance

An enterprise application (ear)


Nested Class Summary
 class EnterpriseApplication.Module
           
 
Method Summary
 void addSecurityRole(SecurityRole role)
          Adds a security role.
static EnterpriseApplication create(java.lang.String name)
           
 EnterpriseApplication.Module createModule()
          Adds a module.
 void destroy()
          destroys the e-application.
 WebAppController findWebAppEntry(java.lang.String name)
          Returns any matching web-app.
 java.util.ArrayList<WebAppController> getApplications()
          Returns the webapps for the enterprise-application.
 EnvironmentClassLoader getClassLoader()
          Returns the class loader.
 java.lang.String getClientRefs()
           
 java.lang.Throwable getConfigException()
          Gets the config exception.
static EnterpriseApplication getCurrent()
           
 java.lang.String getLibraryDirectory()
          Gets the library directory.
 java.lang.String getName()
          Gets the name.
 Path getRootDirectory()
          Sets the root directory.
 void init()
          Configures the application.
 boolean isDeployError()
          Returns true if it's modified.
 boolean isDeployIdle()
          Returns true if the application is idle.
 boolean isModified()
          Returns true if it's modified.
 boolean isModifiedNow()
          Returns true if it's modified.
 boolean logModified(java.util.logging.Logger log)
          Log the reason for modification.
 void preConfigInit()
          Initialization before configuration
 void setConfigException(java.lang.Throwable e)
          Sets the config exception.
 void setDescription(java.lang.String description)
          Sets the description.
 void setDisplayName(java.lang.String name)
          Sets the display name.
 void setEarPath(Path earPath)
          Sets the path to the .ear file
 void setEjbServerJndiName(java.lang.String name)
          Sets the ejb-server jndi name.
 void setEnvironmentClassLoader(EnvironmentClassLoader loader)
          Sets the class loader.
 void setIcon(Icon icon)
          Sets the icon.
 void setId(java.lang.String id)
          Sets the id
 void setLibraryDirectory(java.lang.String libraryDirectory)
          Sets the library directory.
 void setName(java.lang.String name)
          Sets the name.
 void setPrefix(java.lang.String prefix)
          Sets the prefix URL for web applications.
 void setSchemaLocation(java.lang.String schema)
          Sets the schema location
 void setVersion(java.lang.String version)
          Sets the application version.
 void setWebapps(Path webappsPath)
          Sets the path to the expanded webapps
 void start()
          Configures the application.
 void stop()
          Stops the e-application.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static EnterpriseApplication create(java.lang.String name)

getCurrent

public static EnterpriseApplication getCurrent()

setName

public void setName(java.lang.String name)
Sets the name.


getName

public java.lang.String getName()
Gets the name.


setLibraryDirectory

public void setLibraryDirectory(java.lang.String libraryDirectory)
Sets the library directory.


getLibraryDirectory

public java.lang.String getLibraryDirectory()
Gets the library directory.


setEjbServerJndiName

public void setEjbServerJndiName(java.lang.String name)
Sets the ejb-server jndi name.


getRootDirectory

public Path getRootDirectory()
Sets the root directory.


getClassLoader

public EnvironmentClassLoader getClassLoader()
Returns the class loader.

Specified by:
getClassLoader in interface DeployInstance
Specified by:
getClassLoader in interface EnvironmentBean

setEnvironmentClassLoader

public void setEnvironmentClassLoader(EnvironmentClassLoader loader)
Sets the class loader.


setEarPath

public void setEarPath(Path earPath)
Sets the path to the .ear file


setWebapps

public void setWebapps(Path webappsPath)
Sets the path to the expanded webapps


setPrefix

public void setPrefix(java.lang.String prefix)
Sets the prefix URL for web applications.


setId

public void setId(java.lang.String id)
Sets the id


setVersion

public void setVersion(java.lang.String version)
Sets the application version.


setSchemaLocation

public void setSchemaLocation(java.lang.String schema)
Sets the schema location


setDisplayName

public void setDisplayName(java.lang.String name)
Sets the display name.


setDescription

public void setDescription(java.lang.String description)
Sets the description.


setIcon

public void setIcon(Icon icon)
Sets the icon.


createModule

public EnterpriseApplication.Module createModule()
Adds a module.


addSecurityRole

public void addSecurityRole(SecurityRole role)
Adds a security role.


isModified

public boolean isModified()
Returns true if it's modified.

Specified by:
isModified in interface DeployInstance
Specified by:
isModified in interface Dependency

isModifiedNow

public boolean isModifiedNow()
Returns true if it's modified.

Specified by:
isModifiedNow in interface DeployInstance

logModified

public boolean logModified(java.util.logging.Logger log)
Log the reason for modification.

Specified by:
logModified in interface DeployInstance
Specified by:
logModified in interface Dependency

isDeployError

public boolean isDeployError()
Returns true if it's modified.


isDeployIdle

public boolean isDeployIdle()
Returns true if the application is idle.

Specified by:
isDeployIdle in interface DeployInstance

setConfigException

public void setConfigException(java.lang.Throwable e)
Sets the config exception.

Specified by:
setConfigException in interface DeployInstance

getConfigException

public java.lang.Throwable getConfigException()
Gets the config exception.

Specified by:
getConfigException in interface DeployInstance

preConfigInit

public void preConfigInit()
Initialization before configuration

Specified by:
preConfigInit in interface EnvironmentDeployInstance

init

@PostConstruct
public void init()
          throws java.lang.Exception
Configures the application.

Specified by:
init in interface EnvironmentDeployInstance
Throws:
java.lang.Exception

start

public void start()
Configures the application.

Specified by:
start in interface DeployInstance

findWebAppEntry

public WebAppController findWebAppEntry(java.lang.String name)
Returns any matching web-app.


getApplications

public java.util.ArrayList<WebAppController> getApplications()
Returns the webapps for the enterprise-application.


stop

public void stop()
Stops the e-application.


destroy

public void destroy()
destroys the e-application.

Specified by:
destroy in interface DeployInstance

getClientRefs

public java.lang.String getClientRefs()

toString

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