com.wewebu.ow.server.ui
Class OwWebApplication

java.lang.Object
  extended by com.wewebu.ow.server.ui.OwWebApplication

public class OwWebApplication
extends Object

Main Application Class, handles Request Response and maps to document view.

See Also:

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
static String BODY_ID
          HTML element ID of the body tag
static String CONTEXT_KEY
          session key for the context
static String LOGIN_VIEW_KEY
          target ID for the login view
protected  OwAppContext m_Context
          Main Context Object
protected  Class m_ContextClass
          class definition for the context class to be created for the web application
protected  Class m_LoginClass
          class definition for the login view class to be created for the web application
protected  OwView m_LoginView
          Login View Object
protected  OwView m_MainView
          Main View Object
protected  String m_strMainJspPage
          path the the main view page
protected  Class m_ViewClass
          class definition for the view class to be created for the web application
static String SESSION_KEY_LOGGEDOUT_HEADER
          session attribute name for the header of the loggedout.jsp page
static String SESSION_KEY_LOGGEDOUT_MESSAGE
          session attribute name for the message of the loggedout.jsp page
 
Constructor Summary
OwWebApplication()
          Creates a new instance of WdWebApplication
 
Method Summary
 void checkSessionObjects(javax.servlet.ServletContext context_p, javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p, javax.servlet.http.HttpSession session_p)
          creates the session objects if not done already optionally set a prefix to distinguish several different applications.
 OwAppContext getContext()
           
static OwAppContext getContext(javax.servlet.http.HttpSession session_p)
          get the context
static OwView getLoginView(javax.servlet.http.HttpSession session_p)
          get the login view
static OwView getMainView(javax.servlet.http.HttpSession session_p)
          get the main view
 void handleAjaxRequest(javax.servlet.ServletContext context_p, javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
          Main request handler for all AJAX based requests
 void handleRequest(javax.servlet.ServletContext context_p, javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p)
          Main request handler for all JSP based requests allows only one request at a time
protected  void handleRequestPendingSessionException(javax.servlet.ServletContext srvContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Forward to serverBusy.jsp in case of an concurrent session.
Invoked by handleRequest(ServletContext, HttpServletRequest, HttpServletResponse).
static void invalidateSessionObjects(javax.servlet.http.HttpServletRequest request_p)
          invalidates the session objects, recreates all
 void logSessionInfo(javax.servlet.http.HttpServletRequest request_p, boolean fAllSessions_p)
          log a session info for analysis
protected  void printHandleRequestException(PrintWriter out_p, String resetUri_p, Throwable t_p)
          Prints the error page in case of an Exception to the given PrintWriter.
Invoked by handleRequest(ServletContext, HttpServletRequest, HttpServletResponse).
protected  void printHandleRequestException(PrintWriter out_p, String resetUri_p, Throwable t_p, javax.servlet.ServletContext context_p)
          Prints the error page in case of an Exception to the given PrintWriter.
Invoked by handleRequest(ServletContext, HttpServletRequest, HttpServletResponse).
protected  void printHandleRequestPendingSessionException(PrintWriter out_p, OwAppContext context_p)
          Deprecated. since 4.1.1.0 replaced with handleRequestPendingSessionException(ServletContext, HttpServletRequest, HttpServletResponse)
 void setContextClass(Class docClass_p)
          sets the Context class
 void setJspPath(String strJspPath_p)
          sets the path to the main JSP page
 void setLoginClass(Class loginClass_p)
          sets the login view class
 void setViewClass(Class viewClass_p)
          sets the view class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGIN_VIEW_KEY

public static final String LOGIN_VIEW_KEY
target ID for the login view

See Also:
Constant Field Values

CONTEXT_KEY

public static final String CONTEXT_KEY
session key for the context

See Also:
Constant Field Values

BODY_ID

public static final String BODY_ID
HTML element ID of the body tag

See Also:
Constant Field Values

SESSION_KEY_LOGGEDOUT_HEADER

public static final String SESSION_KEY_LOGGEDOUT_HEADER
session attribute name for the header of the loggedout.jsp page

See Also:
Constant Field Values

SESSION_KEY_LOGGEDOUT_MESSAGE

public static final String SESSION_KEY_LOGGEDOUT_MESSAGE
session attribute name for the message of the loggedout.jsp page

See Also:
Constant Field Values

m_LoginClass

protected Class m_LoginClass
class definition for the login view class to be created for the web application


m_ContextClass

protected Class m_ContextClass
class definition for the context class to be created for the web application


m_ViewClass

protected Class m_ViewClass
class definition for the view class to be created for the web application


m_strMainJspPage

protected String m_strMainJspPage
path the the main view page


m_MainView

protected OwView m_MainView
Main View Object


m_LoginView

protected OwView m_LoginView
Login View Object


m_Context

protected OwAppContext m_Context
Main Context Object

Constructor Detail

OwWebApplication

public OwWebApplication()
Creates a new instance of WdWebApplication

Method Detail

setContextClass

public void setContextClass(Class docClass_p)
sets the Context class

Parameters:
docClass_p - Class of the Context

setViewClass

public void setViewClass(Class viewClass_p)
sets the view class

Parameters:
viewClass_p - Class of the view

setLoginClass

public void setLoginClass(Class loginClass_p)
sets the login view class

Parameters:
loginClass_p - Class of the login view

setJspPath

public void setJspPath(String strJspPath_p)
sets the path to the main JSP page

Parameters:
strJspPath_p -

getMainView

public static OwView getMainView(javax.servlet.http.HttpSession session_p)
get the main view

Returns:
OwView

getLoginView

public static OwView getLoginView(javax.servlet.http.HttpSession session_p)
get the login view

Returns:
OwView

getContext

public static OwAppContext getContext(javax.servlet.http.HttpSession session_p)
get the context

Returns:
OwView

invalidateSessionObjects

public static void invalidateSessionObjects(javax.servlet.http.HttpServletRequest request_p)
invalidates the session objects, recreates all


logSessionInfo

public void logSessionInfo(javax.servlet.http.HttpServletRequest request_p,
                           boolean fAllSessions_p)
log a session info for analysis

Parameters:
request_p - HttpServletRequest
fAllSessions_p - true = all sessions, false = only newly created sessions

checkSessionObjects

public void checkSessionObjects(javax.servlet.ServletContext context_p,
                                javax.servlet.http.HttpServletRequest request_p,
                                javax.servlet.http.HttpServletResponse response_p,
                                javax.servlet.http.HttpSession session_p)
                         throws Exception
creates the session objects if not done already optionally set a prefix to distinguish several different applications. The rolemanager will filter the allowed plugins, MIME settings and design with the prefix. The default is empty. e.g. used for the Zero-Install Desktop Integration (ZIDI) to display a different set of plugins, MIME table and design for the Zero-Install Desktop Integration (ZIDI)

Parameters:
context_p - ServletContext
request_p - HttpServletRequest
response_p - HttpServletResponse
Throws:
Exception

handleAjaxRequest

public void handleAjaxRequest(javax.servlet.ServletContext context_p,
                              javax.servlet.http.HttpServletRequest request_p,
                              javax.servlet.http.HttpServletResponse response_p)
                       throws Exception
Main request handler for all AJAX based requests

Parameters:
context_p - ServletContext
request_p - HttpServletRequest
response_p - HttpServletResponse
Throws:
Exception - If any errors occurred

handleRequest

public void handleRequest(javax.servlet.ServletContext context_p,
                          javax.servlet.http.HttpServletRequest request_p,
                          javax.servlet.http.HttpServletResponse response_p)
                   throws Exception
Main request handler for all JSP based requests allows only one request at a time

Parameters:
context_p - ServletContext
request_p - HttpServletRequest
response_p - HttpServletResponse
Throws:
Exception - If any errors occurred

printHandleRequestPendingSessionException

protected void printHandleRequestPendingSessionException(PrintWriter out_p,
                                                         OwAppContext context_p)
Deprecated. since 4.1.1.0 replaced with handleRequestPendingSessionException(ServletContext, HttpServletRequest, HttpServletResponse)

Prints the error page in case of an concurrent session to the given PrintWriter.
Invoked by handleRequest(ServletContext, HttpServletRequest, HttpServletResponse).

Parameters:
out_p - the PrintWriter to write the error page to

handleRequestPendingSessionException

protected void handleRequestPendingSessionException(javax.servlet.ServletContext srvContext,
                                                    javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
                                             throws Exception
Forward to serverBusy.jsp in case of an concurrent session.
Invoked by handleRequest(ServletContext, HttpServletRequest, HttpServletResponse).

Parameters:
srvContext - ServletContext
request - HttpServletRequest
response - HttpServletResponse
Throws:
Exception
Since:
4.1.1.0

printHandleRequestException

protected void printHandleRequestException(PrintWriter out_p,
                                           String resetUri_p,
                                           Throwable t_p)
                                    throws IOException
Prints the error page in case of an Exception to the given PrintWriter.
Invoked by handleRequest(ServletContext, HttpServletRequest, HttpServletResponse).

Parameters:
out_p - the PrintWriter to write the error page to
resetUri_p - URL where to jump for reset
t_p - Exception to print out
Throws:
IOException - write error

printHandleRequestException

protected void printHandleRequestException(PrintWriter out_p,
                                           String resetUri_p,
                                           Throwable t_p,
                                           javax.servlet.ServletContext context_p)
                                    throws IOException
Prints the error page in case of an Exception to the given PrintWriter.
Invoked by handleRequest(ServletContext, HttpServletRequest, HttpServletResponse).

Parameters:
out_p - the PrintWriter to write the error page to
resetUri_p - URL where to jump for reset
t_p - Exception to print out
context_p - ServletContext
Throws:
IOException - write error

getContext

public OwAppContext getContext()
Returns:
the m_Context
Since:
4.1.1.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.