atg.service.webappregistry
Class FileSystemWebAppRegistry

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.service.webappregistry.WebAppRegistry
              extended by atg.service.webappregistry.FileSystemWebAppRegistry
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class FileSystemWebAppRegistry
extends WebAppRegistry

FileSystemWebAppRegistry is an implementation of WebAppRegistry. This class scans a list of files/directories to configure the registry. Each file/dir is assumed to contain a WebApp. Currently this will only work if there is an WEB_INF/application.xml file present in each dir. This class may be used to create property files for use by StaticWebAppRegistry. For example, to create a property files for QuincyFunds (Dynamo/DSSJ2EEDemo/j2ee-apps): java atg.service.webappregistry.FileSystemWebAppRegistry quincy.ear -c For a directory, replace the quincy.ear file with QuincyFunds.

See Also:
WebAppRegistry, WebAppServletContextListener, WebAppStaticRegistry

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String REGISTRY_FILE_NAME
           
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
FileSystemWebAppRegistry()
           
 
Method Summary
 java.io.File[] getDeployedApps()
          Get the value of DeployedApps.
static java.lang.String getNodeTypeName(org.w3c.dom.Node node)
           
 java.util.Map getWebApps()
          Get the Map of currently deployed web applications
static void main(java.lang.String[] pArgs)
          Test method.
static void printNode(org.w3c.dom.Node node, java.lang.String indent)
           
 void register(java.io.File pApp)
          It is assumed that this is a list of directories, that each contain a single web application or they are ear/war files.
 void saveRegistryPropFile(java.lang.String pPath, java.lang.String pFile, boolean pPropListOnly)
           
 void setDeployedApps(java.io.File[] pDeployedApps)
          It is assumed that this is a list of directories, that each contain a single web application or they are ear/war files.
 void setWebApps(java.util.Map pWebApps)
           
 
Methods inherited from class atg.service.webappregistry.WebAppRegistry
addListener, createAdminServlet, doStartService, doStopService, getHiddenWebApps, getSiteHttpServerName, getSiteHttpServerPort, getUrl, getUrl, getWebAppByContextRoot, getWebAppByName, getWebAppByProperty, isHiddenWebApp, register, removeListener, removeWebApp, savePropertyFilesToDir, setHiddenWebApps, setSiteHttpServerName, setSiteHttpServerPort, toString, unregister
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


REGISTRY_FILE_NAME

public static final java.lang.String REGISTRY_FILE_NAME
See Also:
Constant Field Values
Constructor Detail

FileSystemWebAppRegistry

public FileSystemWebAppRegistry()
Method Detail

getWebApps

public java.util.Map getWebApps()
Description copied from class: WebAppRegistry
Get the Map of currently deployed web applications

Specified by:
getWebApps in class WebAppRegistry
Returns:
a Map of deployed WebApps

setWebApps

public void setWebApps(java.util.Map pWebApps)

getDeployedApps

public java.io.File[] getDeployedApps()
Get the value of DeployedApps.

Returns:
value of DeployedApps.

setDeployedApps

public void setDeployedApps(java.io.File[] pDeployedApps)
It is assumed that this is a list of directories, that each contain a single web application or they are ear/war files.

Parameters:
v - Value to assign to DeployedApps.

register

public void register(java.io.File pApp)
It is assumed that this is a list of directories, that each contain a single web application or they are ear/war files.

Parameters:
v - Value to assign to DeployedApps.

getNodeTypeName

public static java.lang.String getNodeTypeName(org.w3c.dom.Node node)

printNode

public static void printNode(org.w3c.dom.Node node,
                             java.lang.String indent)

main

public static void main(java.lang.String[] pArgs)
                 throws WebAppRegistryException
Test method.

Throws:
WebAppRegistryException

saveRegistryPropFile

public void saveRegistryPropFile(java.lang.String pPath,
                                 java.lang.String pFile,
                                 boolean pPropListOnly)