com.xenonsoft.bridgetown.resources
Class WebConfigLoader

java.lang.Object
  extended bycom.xenonsoft.bridgetown.resources.AbstractConfigLoader
      extended bycom.xenonsoft.bridgetown.resources.XMLConfigLoader
          extended bycom.xenonsoft.bridgetown.resources.WebConfigLoader
All Implemented Interfaces:
IConfigLoader, java.io.Serializable

public class WebConfigLoader
extends XMLConfigLoader
implements java.io.Serializable

A configuration loader that loads the assembly configuration from servlet context resource.

Version:
$Id: WebConfigLoader.java,v 1.6 2005/03/17 02:38:02 peter_pilgrim Exp $
Author:
Peter Pilgrim, Aug 23, 2004 7:04:46 PM
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.xenonsoft.bridgetown.resources.XMLConfigLoader
debug, namespaceAware, registrations, validating
 
Fields inherited from class com.xenonsoft.bridgetown.resources.AbstractConfigLoader
file, inputStream, uri
 
Constructor Summary
WebConfigLoader()
          The default constructor
WebConfigLoader(javax.servlet.ServletContext newContext)
          The standard constructor
 
Method Summary
 javax.servlet.ServletContext getServletContext()
          Gets the servletContext
 AssemblyConfig load()
          Loads the service assembly configuration from the servlet context URI specified.
 void setServletContext(javax.servlet.ServletContext servletContext)
          Sets the servletContext
 java.lang.String toString()
          Dumps the human readable debuggable string
 
Methods inherited from class com.xenonsoft.bridgetown.resources.XMLConfigLoader
createParser, isDebug, isNamespaceAware, isValidating, setDebug, setNamespaceAware, setValidating
 
Methods inherited from class com.xenonsoft.bridgetown.resources.AbstractConfigLoader
load, load, load, setFile, setInputStream, setUri
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebConfigLoader

public WebConfigLoader()
The default constructor


WebConfigLoader

public WebConfigLoader(javax.servlet.ServletContext newContext)
The standard constructor

Method Detail

getServletContext

public javax.servlet.ServletContext getServletContext()
Gets the servletContext

Returns:
Returns the servletContext.

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
Sets the servletContext

Parameters:
servletContext - the new value for servletContext

load

public AssemblyConfig load()
Loads the service assembly configuration from the servlet context URI specified. The method retrieves the input stream for the parser using the ServletContext.getResourceAsStream call.

The caller must only specify the URI. No other form of loading is currently supported.

CAUTION: THIS CLASS MIGHT BE REFACTORED or REDESIGNED along with the superclasses.

Specified by:
load in interface IConfigLoader
Overrides:
load in class XMLConfigLoader
Returns:
Assembly configuration root
Throws:
AssemblyConfigException - if the configuration fails to load
See Also:
IConfigLoader.load()

toString

public java.lang.String toString()
Dumps the human readable debuggable string

Overrides:
toString in class AbstractConfigLoader
Returns:
the debug string
See Also:
Object.toString()


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.