org.objectweb.jonas.web
Class War

java.lang.Object
  extended by org.objectweb.jonas.web.War
All Implemented Interfaces:
WarMBean

public class War
extends java.lang.Object
implements WarMBean

This class is representing a War (a web application) structure which is composed of : - the URL of the war file. - the URL of the ear containing this war. - the name of the host on which this war is deployed. - the context root of this war. - compliance to the java 2 delegation model. - Content of the web.xml file - Content of the jonas-web.xml file - List of the servlets name - A permission manager

Author:
Florent Benoit

Constructor Summary
War(java.net.URL warURL, java.net.URL earURL, java.lang.String hostName, java.lang.String contextRoot, boolean java2DelegationModel, java.lang.String xmlContent, java.lang.String jonasXmlContent, java.lang.String[] servletsName)
          Construct a War with the specified name, of the specified ear.
 
Method Summary
 boolean equals(War war)
          Return true if only if the specified war is equal to this war.
 java.lang.String getContextId()
          Gets a contextId for this module
 java.lang.String getContextRoot()
          Get the context root of this war.
 java.net.URL getEarURL()
          Get the URL of the ear containing this war.
 java.lang.String getHostName()
          Get the name of the host on which this war is deployed.
 boolean getJava2DelegationModel()
          Context classloader must follow the java2 delegation model ?
 java.lang.String getJOnASXmlContent()
          Return the jonas-specific xml file
 PermissionManager getPermissionManager()
          Gets the permission manager
 java.lang.String[] getServletsName()
          Return a list of all servlets available
 java.net.URL getWarURL()
          Get the URL of the war file.
 java.lang.String getXmlContent()
          Return the standard xml file
 int hashCode()
           
 boolean isInEarCase()
          Return true if only if this war is in an ear file.
 void setPermissionManager(PermissionManager permissionManager)
          Set the permission manager
 java.lang.String toString()
          Return a string representation of the war.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

War

public War(java.net.URL warURL,
           java.net.URL earURL,
           java.lang.String hostName,
           java.lang.String contextRoot,
           boolean java2DelegationModel,
           java.lang.String xmlContent,
           java.lang.String jonasXmlContent,
           java.lang.String[] servletsName)
Construct a War with the specified name, of the specified ear. (Used in the case of an ear application).

Parameters:
warURL - the URL of the war.
earURL - the URL of the ear containing this war.
hostName - the name of the host on which this war is deployed.
contextRoot - the context root of this war.
java2DelegationModel - the java2 delegation model compliance
xmlContent - content of the web.xml file
jonasXmlContent - content of the jonas-web.xml file
servletsName - name of the servlets
Method Detail

isInEarCase

public boolean isInEarCase()
Return true if only if this war is in an ear file.

Specified by:
isInEarCase in interface WarMBean
Returns:
true if only if this war is in an ear file.

getWarURL

public java.net.URL getWarURL()
Get the URL of the war file.

Specified by:
getWarURL in interface WarMBean
Returns:
the URL of the war file.

getEarURL

public java.net.URL getEarURL()
Get the URL of the ear containing this war.

Specified by:
getEarURL in interface WarMBean
Returns:
the URL of the war file.

getHostName

public java.lang.String getHostName()
Get the name of the host on which this war is deployed.

Specified by:
getHostName in interface WarMBean
Returns:
the name of the host on which this war is deployed.

getContextRoot

public java.lang.String getContextRoot()
Get the context root of this war.

Specified by:
getContextRoot in interface WarMBean
Returns:
the context root of this war.

getJava2DelegationModel

public boolean getJava2DelegationModel()
Context classloader must follow the java2 delegation model ?

Specified by:
getJava2DelegationModel in interface WarMBean
Returns:
true if the context's classloader must follow the java 2 delegation model.

getXmlContent

public java.lang.String getXmlContent()
Return the standard xml file

Specified by:
getXmlContent in interface WarMBean
Returns:
the standard xml file

getJOnASXmlContent

public java.lang.String getJOnASXmlContent()
Return the jonas-specific xml file

Specified by:
getJOnASXmlContent in interface WarMBean
Returns:
the jonas-specific xml file

getServletsName

public java.lang.String[] getServletsName()
Return a list of all servlets available

Specified by:
getServletsName in interface WarMBean
Returns:
a list of all servlets available

setPermissionManager

public void setPermissionManager(PermissionManager permissionManager)
Set the permission manager

Parameters:
permissionManager - permission manager to set

getPermissionManager

public PermissionManager getPermissionManager()
Gets the permission manager

Returns:
permission manager

getContextId

public java.lang.String getContextId()
Gets a contextId for this module

Returns:
contextId

equals

public boolean equals(War war)
Return true if only if the specified war is equal to this war.

Parameters:
war - the war to compare for the equality.
Returns:
true if only if the specified war is equal to this war.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
an hashcode for this object
See Also:
Object.hashCode()

toString

public java.lang.String toString()
Return a string representation of the war. Used for debug.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the war.