org.opensubsystems.core.www
Class WebModuleDefinitionManager

java.lang.Object
  extended by org.opensubsystems.core.www.WebModuleDefinitionManager

public class WebModuleDefinitionManager
extends java.lang.Object

This manager is used for collecting all web client modules that are available in the system.

Version:
$Id: WebModuleDefinitionManager.java,v 1.5 2007/01/07 06:14:09 bastafidli Exp $
Author:
Julian Legeny
Code reviewer:
Miro Halas
Code reviewed:
1.3 2006/06/07 08:44:06 jlegeny

Field Summary
protected  java.util.Map m_mapWebModules
          Map of all web modules.
 
Constructor Summary
WebModuleDefinitionManager()
          Default constructor
 
Method Summary
 void add(WebModule moduleDefinition)
          Add new web module definition to the cache.
static WebModuleDefinitionManager getInstance()
          Get the default instance.
 java.lang.String getModuleNameFromURL(java.lang.String strURL)
          Get web module name from URL.
 java.util.Map getWebModuleDefinitions()
           
static void setInstance(WebModuleDefinitionManager defaultInstance)
          Set default instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_mapWebModules

protected java.util.Map m_mapWebModules
Map of all web modules. Key is a module name, value is WebModule object.

Constructor Detail

WebModuleDefinitionManager

public WebModuleDefinitionManager()
Default constructor

Method Detail

getInstance

public static WebModuleDefinitionManager getInstance()
                                              throws OSSException
Get the default instance. This method is here to make the manager configurable. Once can specify in configuration file derived class to used instead of this one [WebModuleDefinitionManager.class]=new class to use.

Returns:
WebModuleDefinitionManager - default instance
Throws:
OSSException - - an error has occured

setInstance

public static void setInstance(WebModuleDefinitionManager defaultInstance)
Set default instance. This instance will be returned by getInstance method until it is changed.

Parameters:
defaultInstance - - new default instance
See Also:
getInstance()

getWebModuleDefinitions

public java.util.Map getWebModuleDefinitions()
Returns:
Map - Key is a web module name, value is ModuleDefinition object describing complete set information for this web module.

add

public void add(WebModule moduleDefinition)
Add new web module definition to the cache.

Parameters:
moduleDefinition - - web module definition to add.

getModuleNameFromURL

public java.lang.String getModuleNameFromURL(java.lang.String strURL)
Get web module name from URL.

Parameters:
strURL - - URL the module name has to be found for
Returns:
- module name for specified URL


Copyright © 2003 - 2006 OpenSubsystems s.r.o.