yawda.data.model.application
Class CApplication

java.lang.Object
  extended byyawda.data.model.application.CApplication

public final class CApplication
extends Object

This class represent an application.

Author:
Quentin Anciaux

Field Summary
static String CONTEXT_KEY
          Comment for CONTEXT_KEY This is the key of the CApplication object in the Servlet Context
 
Constructor Summary
CApplication(String name, String version)
          Create a new application.
 
Method Summary
 CStrutsApplication createStrutsApplication()
          Create a struts application object from this application.
static CApplication getInstance(javax.servlet.ServletContext context)
          Return an instance of the Application Object
 String getName()
           
 CModule getRootModule()
           
 String getVersion()
           
 void initialize()
           
 void setRootModule(CModule applicationRootModule)
          Set the root module
 String toString()
           
static CApplication unmarshall(Node node)
          Unmarshall a parsed configuration file in an CApplication object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTEXT_KEY

public static final String CONTEXT_KEY
Comment for CONTEXT_KEY This is the key of the CApplication object in the Servlet Context

See Also:
Constant Field Values
Constructor Detail

CApplication

public CApplication(String name,
                    String version)
Create a new application.

Parameters:
name - The name of the application
version - The version of the application
Method Detail

getInstance

public static final CApplication getInstance(javax.servlet.ServletContext context)
Return an instance of the Application Object

Parameters:
context - the servlet context in which to search for the object
Returns:
an instance of the Application Object

setRootModule

public final void setRootModule(CModule applicationRootModule)
Set the root module

Parameters:
applicationRootModule -

initialize

public final void initialize()

getName

public final String getName()
Returns:
The name of the application

getVersion

public final String getVersion()
Returns:
The version of the application

getRootModule

public final CModule getRootModule()
Returns:
The root module

toString

public final String toString()
See Also:
Object.toString()

unmarshall

public static final CApplication unmarshall(Node node)
Unmarshall a parsed configuration file in an CApplication object

Parameters:
node - an <application> tag node
Returns:
an unmarshalled application

createStrutsApplication

public final CStrutsApplication createStrutsApplication()
Create a struts application object from this application.

Returns:
A struts application.