com.wewebu.ow.server.servlets
Class OwInitialisingContextListener

java.lang.Object
  extended by com.wewebu.ow.server.servlets.OwInitialisingContextListener
All Implemented Interfaces:
OwBaseInitializer, EventListener, javax.servlet.ServletContextListener
Direct Known Subclasses:
OwConfigurationInitialisingContextListener, OwStandardRoleManagerInitialisingContextListener

public abstract class OwInitialisingContextListener
extends Object
implements javax.servlet.ServletContextListener, OwBaseInitializer

Init listener that initializes the Alfresco Workdesk shared data.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Field Summary
protected  javax.servlet.ServletContext m_ServletContext
          servlet context reference for this session
static String STARTUP_ERROR_KEY
          key used to write the startup errors (configuration) in the context, used to be displayed on the logon page
 
Constructor Summary
OwInitialisingContextListener()
           
 
Method Summary
protected abstract  void applicationInitalize()
          init function for derived classes
 void contextDestroyed(javax.servlet.ServletContextEvent arg0_p)
          Notification that the servlet context is about to be shut down.
 void contextInitialized(javax.servlet.ServletContextEvent event_p)
          Notification that the web application initialization process is starting.
 Object getApplicationAttribute(String key_p)
          get a attribute from the application scope
 String getBasePath()
          get the base path to the application
 URL getConfigURL(String strName_p)
          loads a URL for a configuration either from local file, external file or from a JNDI context
 String getInitParameter(String strParamName_p)
          get a parameter from the web.xml config file
 InputStream getXMLConfigDoc(String strName_p)
          loads a XML Document either from local file, external file or from a JNDI context
 void init(javax.servlet.ServletContext servletContext_p)
          initialization
 Object setApplicationAttribute(String key_p, Object object_p)
          get a attribute from the application scope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STARTUP_ERROR_KEY

public static final String STARTUP_ERROR_KEY
key used to write the startup errors (configuration) in the context, used to be displayed on the logon page

See Also:
Constant Field Values

m_ServletContext

protected javax.servlet.ServletContext m_ServletContext
servlet context reference for this session

Constructor Detail

OwInitialisingContextListener

public OwInitialisingContextListener()
Method Detail

init

public void init(javax.servlet.ServletContext servletContext_p)
initialization

Parameters:
servletContext_p -

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent event_p)
Notification that the web application initialization process is starting. All ServletContextListeners are notified of context initialization before any filter or servlet in the web application is initialized

Specified by:
contextInitialized in interface javax.servlet.ServletContextListener
Parameters:
event_p - ServletContextEvent

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent arg0_p)
Notification that the servlet context is about to be shut down. All servlets and filters have been destroyed before any ServletContextListeners are notified of context destruction.

Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener
Parameters:
arg0_p - ServletContextEvent

applicationInitalize

protected abstract void applicationInitalize()
                                      throws OwConfigurationException,
                                             OwServerException
init function for derived classes

Throws:
OwConfigurationException
OwServerException

getApplicationAttribute

public Object getApplicationAttribute(String key_p)
get a attribute from the application scope

Specified by:
getApplicationAttribute in interface OwBaseInitializer
Parameters:
key_p -
Returns:
an Object

setApplicationAttribute

public Object setApplicationAttribute(String key_p,
                                      Object object_p)
get a attribute from the application scope

Specified by:
setApplicationAttribute in interface OwBaseInitializer
Parameters:
key_p -
object_p - null removes the attribute
Returns:
the previous object

getBasePath

public String getBasePath()
get the base path to the application

Specified by:
getBasePath in interface OwBaseInitializer
Returns:
String

getInitParameter

public String getInitParameter(String strParamName_p)
get a parameter from the web.xml config file

Specified by:
getInitParameter in interface OwBaseInitializer
Parameters:
strParamName_p - Name of the requested parameter
Returns:
parameter value, of null if not set.

getXMLConfigDoc

public InputStream getXMLConfigDoc(String strName_p)
                            throws Exception
loads a XML Document either from local file, external file or from a JNDI context

Specified by:
getXMLConfigDoc in interface OwBaseInitializer
Parameters:
strName_p - Name of the resource to look for
Returns:
OwXMLUtil wrapped DOM Node, or null if not found
Throws:
Exception

getConfigURL

public URL getConfigURL(String strName_p)
                 throws Exception
loads a URL for a configuration either from local file, external file or from a JNDI context

Specified by:
getConfigURL in interface OwBaseInitializer
Parameters:
strName_p - Name of the configuration to look for
Returns:
URL wrapped DOM Node, or null if not found
Throws:
Exception


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.