org.opensubsystems.blog.www
Class BlogBrowserServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.opensubsystems.core.www.WebSessionServlet
              extended by org.opensubsystems.core.www.WebUIServlet
                  extended by org.opensubsystems.blog.www.BlogBrowserServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
BlogEditServlet

public class BlogBrowserServlet
extends org.opensubsystems.core.www.WebUIServlet

Servlet responsible for browsing blogs and their entries as if they were displayed using a static website consisting of pages with .html extension. his servlet contains read-only functionality so it can be safely used, when user shouldn't be allowed to modify the data.

Version:
$Id: BlogBrowserServlet.java,v 1.6 2007/02/20 02:01:38 bastafidli Exp $
Author:
Miro Halas
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
Initial revision

Field Summary
static java.lang.String BLOGBROWSER_BLOG_INDEX_PAGE
          Name of the property for page which is the main entry point to the blog functionality.
static java.lang.String BLOGBROWSER_BLOG_VIEWER_PAGE
          Name of the property for page to view single blog.
static java.lang.String BLOGBROWSER_BLOGENTRY_VIEWER_PAGE
          Name of the property for page to view single blog entry.
static int FORM_COUNT_BLOGBROWSER
          Constant for number of forms recognized by this servlet
 
Fields inherited from class org.opensubsystems.core.www.WebUIServlet
DATA_ATTRIBUTE_REQUEST_PARAM, FORCE_MAXIMIZE_PARAM, FORM_COUNT_WEBUI, FORM_NAME_REQUEST_PARAM, FORM_UNKNOWN_ID, LOGGEDIN_REQUEST_PARAM, m_strMessageStyleSheet, ORIGINAL_REQUEST_INFO_REQUEST_PARAM, PAGE_TITLE_REQUEST_PARAM, WEBUI_MESSAGEBOX_PAGE, WEBUI_MESSAGEBOX_STYLE_SHEET
 
Fields inherited from class org.opensubsystems.core.www.WebSessionServlet
APPLICATION_SECURE, ATTACH_INTERNAL_SESSION_ID_URL_PARAM, DEFAULT_APPLICATION_SECURE, DEFAULT_LOGIN_SECURE, LOGIN_FORWARD_SESSION_PARAM, LOGIN_SECURE, m_scServletContext, m_sessionValidator, m_strHandshakeURL, s_bApplicationSecure, s_bLoginSecure, SERVLET_PATH_REQUEST_PARAM, SESSION_VALIDATOR_CLASS, WEBSESSION_DISPATCHER_CACHED, WEBSESSION_DISPATCHER_CACHED_DEFAULT, WEBSESSION_HADSHAKE_REQUIRED_DEFAULT, WEBSESSION_HANDSHAKE_REQUIRED, WEBSESSION_HANDSHAKE_URL, WEBSESSION_LOGIN_REQUIRED, WEBSESSION_LOGIN_REQUIRED_DEFAULT, WEBSESSION_LOGIN_URL
 
Constructor Summary
BlogBrowserServlet()
           
 
Method Summary
protected  void createBlogEntryPage(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Create blog page for the path requested by user
protected  void createIndexPage(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Create index page of all entries in the blog.
protected  void createMainIndexPage(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Create main index page of all blogs.
protected  void doGet(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          
protected  BlogController getController()
          Get controller to invoke business logic.
protected  BlogNavigator getNavigator(javax.servlet.http.HttpServletRequest hsrqRequest)
          Get instance of navigator object suitable for processing current request.
 java.lang.String getServletInfo()
          
 void init(javax.servlet.ServletConfig scConfig)
          
 
Methods inherited from class org.opensubsystems.core.www.WebUIServlet
cacheDispatcher, cacheUIPath, displayUI, getFormToProcess, messageBoxPage, messageBoxPage, preservice, setLoggedInFlag
 
Methods inherited from class org.opensubsystems.core.www.WebSessionServlet
destroy, getLoginRedirect, handleNewSession, isApplicationSecure, isDispatcherCachingEnabled, isLoginSecure, redirect, redirectToHandshake, redirectToLogin, resetLoginRedirect, saveLoginRedirect, service, shouldRequestBeSecure, verifyLogin
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOGBROWSER_BLOG_INDEX_PAGE

public static final java.lang.String BLOGBROWSER_BLOG_INDEX_PAGE
Name of the property for page which is the main entry point to the blog functionality.

See Also:
Constant Field Values

BLOGBROWSER_BLOG_VIEWER_PAGE

public static final java.lang.String BLOGBROWSER_BLOG_VIEWER_PAGE
Name of the property for page to view single blog.

See Also:
Constant Field Values

BLOGBROWSER_BLOGENTRY_VIEWER_PAGE

public static final java.lang.String BLOGBROWSER_BLOGENTRY_VIEWER_PAGE
Name of the property for page to view single blog entry.

See Also:
Constant Field Values

FORM_COUNT_BLOGBROWSER

public static final int FORM_COUNT_BLOGBROWSER
Constant for number of forms recognized by this servlet

See Also:
Constant Field Values
Constructor Detail

BlogBrowserServlet

public BlogBrowserServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig scConfig)
          throws javax.servlet.ServletException

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class org.opensubsystems.core.www.WebUIServlet
Throws:
javax.servlet.ServletException

doGet

protected void doGet(javax.servlet.http.HttpServletRequest hsrqRequest,
                     javax.servlet.http.HttpServletResponse hsrpResponse)
              throws javax.servlet.ServletException,
                     java.io.IOException

Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
java.io.IOException

getServletInfo

public java.lang.String getServletInfo()

Specified by:
getServletInfo in interface javax.servlet.Servlet
Overrides:
getServletInfo in class org.opensubsystems.core.www.WebUIServlet

createMainIndexPage

protected void createMainIndexPage(javax.servlet.http.HttpServletRequest hsrqRequest,
                                   javax.servlet.http.HttpServletResponse hsrpResponse)
                            throws java.io.IOException,
                                   javax.servlet.ServletException
Create main index page of all blogs.

Parameters:
hsrqRequest - - the servlet request
hsrpResponse - - the servlet response
Throws:
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response

createIndexPage

protected void createIndexPage(javax.servlet.http.HttpServletRequest hsrqRequest,
                               javax.servlet.http.HttpServletResponse hsrpResponse)
                        throws java.io.IOException,
                               javax.servlet.ServletException
Create index page of all entries in the blog.

Parameters:
hsrqRequest - - the servlet request
hsrpResponse - - the servlet response
Throws:
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response

createBlogEntryPage

protected void createBlogEntryPage(javax.servlet.http.HttpServletRequest hsrqRequest,
                                   javax.servlet.http.HttpServletResponse hsrpResponse)
                            throws java.io.IOException,
                                   javax.servlet.ServletException
Create blog page for the path requested by user

Parameters:
hsrqRequest - - the servlet request
hsrpResponse - - the servlet response
Throws:
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response

getNavigator

protected BlogNavigator getNavigator(javax.servlet.http.HttpServletRequest hsrqRequest)
Get instance of navigator object suitable for processing current request.

Parameters:
hsrqRequest - - current request
Returns:
BlogNavigator - navigator for current request

getController

protected BlogController getController()
                                throws org.opensubsystems.core.error.OSSException
Get controller to invoke business logic.

Returns:
BlogController
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured


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