com.esri.adf.web.data
Class WebApplication

java.lang.Object
  extended by com.esri.adf.web.data.WebApplication
All Implemented Interfaces:
Serializable

public class WebApplication
extends Object
implements Serializable

Stores information for the current web application.

See Also:
Serialized Form

Field Summary
static String APPLICATION_ATTRIBUTE_NAME
          The attribute name for the WebApplication object to be retrieved from request scope.
static String DEFAULT_LOG_LEVEL
           
static String DEFAULT_RESOURCE_BUNDLE
          The name of the resource bundle for the web controls.
static String DEFAULT_XML_RESOURCE_BUNDLE
          The name of the XML resource bundle.
static String LOCALIZED_STRINGS
           
static String RESOURCE_BUNDLE_DIR
           
static String TASK_DEFINITIONS_DIR
           
static String XSL_DIR
           
 
Constructor Summary
WebApplication()
          Initializes the WebApplication.
 
Method Summary
 void addWebSession(WebSession session)
          Adds a new WebSession to the WebApplication.
 void destroy()
          Destroys a WebApplication and clears all the active sessions.
 Collection<WebSession> getActiveWebSessions()
          Returns a collection of active WebSession objects.
 String getCacheDirectory()
          Deprecated. This method is deprecated as of ArcGIS Java Server 9.3.1, no replacement
static HashMap<String,String> getLocalizedStrings()
          Returns the set of localized strings defined in the bundle
static ResourceBundle getResourceBundle()
          Returns the name of the resource bundle for the web controls.
static String getResourceString(String resourceKey)
          Returns the string corresponding to this key from the associated resource bundle.
static String getResourceString(String resourceKey, Object[] params)
          Returns the parameterized string corresponding to this key from the associated resource bundle.
static String getXMLResourceBundle()
          Returns the name of the XML resource bundle.
 boolean removeWebSession(WebSession session)
          Removes a WebSession from the WebApplication.
 void setCacheDirectory(String cacheDirectory)
          Deprecated. This method is deprecated as of ArcGIS Java Server 9.3.1, no replacement
static void setResourceBundleFilePath(String path)
          Deprecated. This method is deprecated as of ArcGIS Java Server 9.3.1, no replacement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPLICATION_ATTRIBUTE_NAME

public static final String APPLICATION_ATTRIBUTE_NAME
The attribute name for the WebApplication object to be retrieved from request scope.

See Also:
Constant Field Values

DEFAULT_XML_RESOURCE_BUNDLE

public static final String DEFAULT_XML_RESOURCE_BUNDLE
The name of the XML resource bundle.

See Also:
Constant Field Values

DEFAULT_RESOURCE_BUNDLE

public static final String DEFAULT_RESOURCE_BUNDLE
The name of the resource bundle for the web controls.

See Also:
Constant Field Values

RESOURCE_BUNDLE_DIR

public static final String RESOURCE_BUNDLE_DIR
See Also:
Constant Field Values

DEFAULT_LOG_LEVEL

public static final String DEFAULT_LOG_LEVEL
See Also:
Constant Field Values

XSL_DIR

public static final String XSL_DIR
See Also:
Constant Field Values

TASK_DEFINITIONS_DIR

public static final String TASK_DEFINITIONS_DIR
See Also:
Constant Field Values

LOCALIZED_STRINGS

public static final String LOCALIZED_STRINGS
See Also:
Constant Field Values
Constructor Detail

WebApplication

public WebApplication()
Initializes the WebApplication. The properties are retrieved from the property file.

Method Detail

getLocalizedStrings

public static HashMap<String,String> getLocalizedStrings()
Returns the set of localized strings defined in the bundle

Returns:
localizedStrings

addWebSession

public void addWebSession(WebSession session)
Adds a new WebSession to the WebApplication.

Parameters:
session - the WebSession

removeWebSession

public boolean removeWebSession(WebSession session)
Removes a WebSession from the WebApplication.

Parameters:
session - the WebSession to remove
Returns:
boolean- if true, destroying. If false, the session is removed.

getActiveWebSessions

public Collection<WebSession> getActiveWebSessions()
Returns a collection of active WebSession objects.

Returns:
Collection- the active sessions

destroy

public void destroy()
Destroys a WebApplication and clears all the active sessions.


getXMLResourceBundle

public static String getXMLResourceBundle()
Returns the name of the XML resource bundle.

Returns:
String- the name of the bundle

getResourceBundle

public static ResourceBundle getResourceBundle()
Returns the name of the resource bundle for the web controls.

Returns:
ResourceBundle- the ResourceBundle

getResourceString

public static String getResourceString(String resourceKey)
Returns the string corresponding to this key from the associated resource bundle.

Parameters:
resourceKey - the resource key
Returns:
String- the string associated with this key

getResourceString

public static String getResourceString(String resourceKey,
                                       Object[] params)
Returns the parameterized string corresponding to this key from the associated resource bundle.

Parameters:
resourceKey - the resource key
params - the parameter values
Returns:
String- the parameterized string associated with this key

getCacheDirectory

@Deprecated
public String getCacheDirectory()
Deprecated. This method is deprecated as of ArcGIS Java Server 9.3.1, no replacement

Returns the directory where MIME data bytes are cached.

Returns:
String- the cache directory. If no directory, null is returned.

setResourceBundleFilePath

@Deprecated
public static void setResourceBundleFilePath(String path)
Deprecated. This method is deprecated as of ArcGIS Java Server 9.3.1, no replacement

Sets the absolute resource path; The path is used at the design time of Creator; At the run-time, it should be not used. e.g. C:/Projects/SunStudio/WebApplication1/src/web/WEB-INF/classes/res/Res.properties

Parameters:
path - String a absolute path string.

setCacheDirectory

@Deprecated
public void setCacheDirectory(String cacheDirectory)
Deprecated. This method is deprecated as of ArcGIS Java Server 9.3.1, no replacement