org.opensubsystems.blog.www
Class BlogEditServlet

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
                      extended by org.opensubsystems.blog.www.BlogEditServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class BlogEditServlet
extends BlogBrowserServlet

Servlet responsible for browsing and editing of blogs and their entries. This servlets ads functionality to the browser servlet to manipulate the data.

Version:
$Id: BlogEditServlet.java,v 1.10 2007/03/05 07:27:14 bastafidli Exp $
Author:
Miro Halas
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
1.5 2006/07/21 05:44:29 bastafidli

Field Summary
static java.lang.String BLOGEDIT_CONFIRMDELETE_BLOG_PAGE
          Name of the property for page to confirm deletion of blog.
static java.lang.String BLOGEDIT_CONFIRMDELETE_BLOGENTRY_PAGE
          Name of the property for page to confirm deletion of blog entry
static java.lang.String BLOGEDIT_LOGIN
          Name of the property for user name used to login.
static java.lang.String BLOGEDIT_LOGIN_PAGE
          Name of the property for page to login.
static java.lang.String BLOGEDIT_LOGOUT_PAGE
          Name of the property for page to logout.
static java.lang.String BLOGEDIT_NEW_BLOG_PAGE
          Name of the property for page to create new blog.
static java.lang.String BLOGEDIT_NEWENTRY_BLOG_PAGE
          Name of the property for page to create new blog entry.
static java.lang.String BLOGEDIT_PASSWORD
          Name of the property for password used to login.
static int FORM_CONFIRMDELETE_BLOG_ID
          Constants for action to display delete blog dialog.
static int FORM_CONFIRMDELETE_BLOGENTRY_ID
          Constants for action to display delete blog entry dialog.
static int FORM_COUNT_BLOGEDIT
          How many forms this servlet recognizes.
static int FORM_CREATE_BLOG_ID
          Constants for action to create new blog.
static java.lang.String FORM_CREATE_BLOG_NAME
          Names of the form and action to display create blog dialog.
static int FORM_CREATE_BLOGENTRY_ID
          Constants for action to create blog entry dialog.
static java.lang.String FORM_CREATE_BLOGENTRY_NAME
          Names of the form and action to create blog entry.
static int FORM_DELETE_BLOG_ID
          Constants for action to delete blog.
static java.lang.String FORM_DELETE_BLOG_NAME
          Names of the form and action to delete blog.
static int FORM_DELETE_BLOGENTRY_ID
          Constants for action to delete blog entry.
static java.lang.String FORM_DELETE_BLOGENTRY_NAME
          Names of the form and action to delete blog entry.
static int FORM_EDIT_BLOG_ID
          Constants for action to edit blog.
static java.lang.String FORM_EDIT_BLOG_NAME
          Names of the form and action to display edit blog dialog.
static java.lang.String FORM_EDIT_BLOG_NAME_CREATE
          Names of the form and action to create blog.
static java.lang.String FORM_EDIT_BLOG_NAME_CREATEENTRY
          Names of the form and action to display create blog entry dialog.
static java.lang.String FORM_EDIT_BLOG_NAME_DELETE
          Names of the form and action to display delete blog dialog.
static int FORM_EDIT_BLOGENTRY_ID
          Constants for action to edit blog entry.
static java.lang.String FORM_EDIT_BLOGENTRY_NAME
          Names of the form and action to display edit blog entry dialog.
static java.lang.String FORM_EDIT_BLOGENTRY_NAME_DELETE
          Names of the form and action to display delete blog entry dialog.
static int FORM_LOGIN_ID
          Constants for action to login to the application.
static java.lang.String FORM_LOGIN_NAME
          Names of the form and action to login to the application.
static int FORM_LOGOUT_ID
          Constants for action to logout from the application.
static java.lang.String FORM_LOGOUT_NAME
          Names of the form and action to logout from the application.
static int FORM_NEW_BLOG_ID
          Constants for action to display new blog dialog.
static int FORM_NEWENTRY_BLOG_ID
          Constants for action to display create blog entry dialog.
protected  java.lang.String m_strLogin
          User name to use to login to the application.
protected  java.lang.String m_strPassword
          Password to use to login to the application.
 
Fields inherited from class org.opensubsystems.blog.www.BlogBrowserServlet
BLOGBROWSER_BLOG_INDEX_PAGE, BLOGBROWSER_BLOG_VIEWER_PAGE, BLOGBROWSER_BLOGENTRY_VIEWER_PAGE, FORM_COUNT_BLOGBROWSER
 
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
BlogEditServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          
protected  void doPost(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          
protected  int getFormToProcess(javax.servlet.http.HttpServletRequest hsrqRequest)
          
 java.lang.String getServletInfo()
          
 void init(javax.servlet.ServletConfig scConfig)
          
protected  Blog parseBlogFromRequest(javax.servlet.http.HttpServletRequest hsrqRequest)
          Create new instance of blog from a HTTP request.
protected  Entry parseEntryFromRequest(javax.servlet.http.HttpServletRequest hsrqRequest)
          Create new instance of blog entry from a HTTP request..
protected  void processConfirmDeleteBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Process form to display dialog to confirm deletion of a blog.
protected  void processConfirmDeleteEntryForm(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Process form to display dialog to confirm deletion of a blog entry.
protected  void processCreateBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Process form to actually create new blog from supplied information.
protected  void processCreateEntryForm(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Process form to actually create new blog entry.
protected  void processDeleteBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Process form to delete specified blog.
protected  void processDeleteEntryForm(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Process form to delete specified blog entry.
protected  void processEditBlogError(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse, Blog blog)
          Process recoverable error, which has occured while saving blog.
protected  void processEditBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Process form to save modified information about blog.
protected  void processEditEntryError(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse, Entry entry)
          Process recoverable error, which has occured while saving entry.
protected  void processEditEntryForm(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Process form to save modified blog entry.
protected  void processLoginForm(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Process form to login to the application.
protected  void processLogoutForm(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Process form to logout from the application.
protected  void processNewBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Process form to display dialog to create new blog.
protected  void processNewEntryBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Process form to display dialog to create new blog entry.
protected  void processNewLoginForm(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Process form to display login dialog.
protected  void processNewLogoutForm(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          Process form to display logout dialog.
protected  void redirectToLogin(javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          
protected  java.security.Principal verifyLogin(javax.servlet.http.HttpSession hsSession, javax.servlet.http.HttpServletRequest hsrqRequest, javax.servlet.http.HttpServletResponse hsrpResponse)
          
 
Methods inherited from class org.opensubsystems.blog.www.BlogBrowserServlet
createBlogEntryPage, createIndexPage, createMainIndexPage, getController, getNavigator
 
Methods inherited from class org.opensubsystems.core.www.WebUIServlet
cacheDispatcher, cacheUIPath, displayUI, messageBoxPage, messageBoxPage, preservice, setLoggedInFlag
 
Methods inherited from class org.opensubsystems.core.www.WebSessionServlet
destroy, getLoginRedirect, handleNewSession, isApplicationSecure, isDispatcherCachingEnabled, isLoginSecure, redirect, redirectToHandshake, resetLoginRedirect, saveLoginRedirect, service, shouldRequestBeSecure
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, 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

BLOGEDIT_LOGIN

public static final java.lang.String BLOGEDIT_LOGIN
Name of the property for user name used to login.

See Also:
Constant Field Values

BLOGEDIT_PASSWORD

public static final java.lang.String BLOGEDIT_PASSWORD
Name of the property for password used to login.

See Also:
Constant Field Values

BLOGEDIT_LOGIN_PAGE

public static final java.lang.String BLOGEDIT_LOGIN_PAGE
Name of the property for page to login.

See Also:
Constant Field Values

BLOGEDIT_LOGOUT_PAGE

public static final java.lang.String BLOGEDIT_LOGOUT_PAGE
Name of the property for page to logout.

See Also:
Constant Field Values

BLOGEDIT_NEW_BLOG_PAGE

public static final java.lang.String BLOGEDIT_NEW_BLOG_PAGE
Name of the property for page to create new blog.

See Also:
Constant Field Values

BLOGEDIT_CONFIRMDELETE_BLOG_PAGE

public static final java.lang.String BLOGEDIT_CONFIRMDELETE_BLOG_PAGE
Name of the property for page to confirm deletion of blog.

See Also:
Constant Field Values

BLOGEDIT_NEWENTRY_BLOG_PAGE

public static final java.lang.String BLOGEDIT_NEWENTRY_BLOG_PAGE
Name of the property for page to create new blog entry.

See Also:
Constant Field Values

BLOGEDIT_CONFIRMDELETE_BLOGENTRY_PAGE

public static final java.lang.String BLOGEDIT_CONFIRMDELETE_BLOGENTRY_PAGE
Name of the property for page to confirm deletion of blog entry

See Also:
Constant Field Values

FORM_CREATE_BLOG_NAME

public static final java.lang.String FORM_CREATE_BLOG_NAME
Names of the form and action to display create blog dialog.

See Also:
Constant Field Values

FORM_EDIT_BLOG_NAME

public static final java.lang.String FORM_EDIT_BLOG_NAME
Names of the form and action to display edit blog dialog.

See Also:
Constant Field Values

FORM_EDIT_BLOG_NAME_CREATE

public static final java.lang.String FORM_EDIT_BLOG_NAME_CREATE
Names of the form and action to create blog.

See Also:
Constant Field Values

FORM_EDIT_BLOG_NAME_DELETE

public static final java.lang.String FORM_EDIT_BLOG_NAME_DELETE
Names of the form and action to display delete blog dialog.

See Also:
Constant Field Values

FORM_EDIT_BLOG_NAME_CREATEENTRY

public static final java.lang.String FORM_EDIT_BLOG_NAME_CREATEENTRY
Names of the form and action to display create blog entry dialog.

See Also:
Constant Field Values

FORM_DELETE_BLOG_NAME

public static final java.lang.String FORM_DELETE_BLOG_NAME
Names of the form and action to delete blog.

See Also:
Constant Field Values

FORM_CREATE_BLOGENTRY_NAME

public static final java.lang.String FORM_CREATE_BLOGENTRY_NAME
Names of the form and action to create blog entry.

See Also:
Constant Field Values

FORM_EDIT_BLOGENTRY_NAME

public static final java.lang.String FORM_EDIT_BLOGENTRY_NAME
Names of the form and action to display edit blog entry dialog.

See Also:
Constant Field Values

FORM_EDIT_BLOGENTRY_NAME_DELETE

public static final java.lang.String FORM_EDIT_BLOGENTRY_NAME_DELETE
Names of the form and action to display delete blog entry dialog.

See Also:
Constant Field Values

FORM_DELETE_BLOGENTRY_NAME

public static final java.lang.String FORM_DELETE_BLOGENTRY_NAME
Names of the form and action to delete blog entry.

See Also:
Constant Field Values

FORM_LOGIN_NAME

public static final java.lang.String FORM_LOGIN_NAME
Names of the form and action to login to the application.

See Also:
Constant Field Values

FORM_LOGOUT_NAME

public static final java.lang.String FORM_LOGOUT_NAME
Names of the form and action to logout from the application.

See Also:
Constant Field Values

FORM_NEW_BLOG_ID

public static final int FORM_NEW_BLOG_ID
Constants for action to display new blog dialog.

See Also:
Constant Field Values

FORM_CREATE_BLOG_ID

public static final int FORM_CREATE_BLOG_ID
Constants for action to create new blog.

See Also:
Constant Field Values

FORM_EDIT_BLOG_ID

public static final int FORM_EDIT_BLOG_ID
Constants for action to edit blog.

See Also:
Constant Field Values

FORM_CONFIRMDELETE_BLOG_ID

public static final int FORM_CONFIRMDELETE_BLOG_ID
Constants for action to display delete blog dialog.

See Also:
Constant Field Values

FORM_DELETE_BLOG_ID

public static final int FORM_DELETE_BLOG_ID
Constants for action to delete blog.

See Also:
Constant Field Values

FORM_NEWENTRY_BLOG_ID

public static final int FORM_NEWENTRY_BLOG_ID
Constants for action to display create blog entry dialog.

See Also:
Constant Field Values

FORM_CREATE_BLOGENTRY_ID

public static final int FORM_CREATE_BLOGENTRY_ID
Constants for action to create blog entry dialog.

See Also:
Constant Field Values

FORM_EDIT_BLOGENTRY_ID

public static final int FORM_EDIT_BLOGENTRY_ID
Constants for action to edit blog entry.

See Also:
Constant Field Values

FORM_CONFIRMDELETE_BLOGENTRY_ID

public static final int FORM_CONFIRMDELETE_BLOGENTRY_ID
Constants for action to display delete blog entry dialog.

See Also:
Constant Field Values

FORM_DELETE_BLOGENTRY_ID

public static final int FORM_DELETE_BLOGENTRY_ID
Constants for action to delete blog entry.

See Also:
Constant Field Values

FORM_LOGIN_ID

public static final int FORM_LOGIN_ID
Constants for action to login to the application.

See Also:
Constant Field Values

FORM_LOGOUT_ID

public static final int FORM_LOGOUT_ID
Constants for action to logout from the application.

See Also:
Constant Field Values

FORM_COUNT_BLOGEDIT

public static final int FORM_COUNT_BLOGEDIT
How many forms this servlet recognizes.

See Also:
Constant Field Values

m_strLogin

protected java.lang.String m_strLogin
User name to use to login to the application.


m_strPassword

protected java.lang.String m_strPassword
Password to use to login to the application.

Constructor Detail

BlogEditServlet

public BlogEditServlet()
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 BlogBrowserServlet
Throws:
javax.servlet.ServletException

getServletInfo

public java.lang.String getServletInfo()

Specified by:
getServletInfo in interface javax.servlet.Servlet
Overrides:
getServletInfo in class BlogBrowserServlet

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 BlogBrowserServlet
Throws:
javax.servlet.ServletException
java.io.IOException

doPost

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

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

getFormToProcess

protected int getFormToProcess(javax.servlet.http.HttpServletRequest hsrqRequest)

Overrides:
getFormToProcess in class org.opensubsystems.core.www.WebUIServlet

processNewLoginForm

protected void processNewLoginForm(javax.servlet.http.HttpServletRequest hsrqRequest,
                                   javax.servlet.http.HttpServletResponse hsrpResponse)
                            throws java.io.IOException,
                                   javax.servlet.ServletException
Process form to display login dialog.

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

processLoginForm

protected void processLoginForm(javax.servlet.http.HttpServletRequest hsrqRequest,
                                javax.servlet.http.HttpServletResponse hsrpResponse)
                         throws java.io.IOException,
                                javax.servlet.ServletException
Process form to login to the application.

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

processNewLogoutForm

protected void processNewLogoutForm(javax.servlet.http.HttpServletRequest hsrqRequest,
                                    javax.servlet.http.HttpServletResponse hsrpResponse)
                             throws java.io.IOException,
                                    javax.servlet.ServletException
Process form to display logout dialog.

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

processLogoutForm

protected void processLogoutForm(javax.servlet.http.HttpServletRequest hsrqRequest,
                                 javax.servlet.http.HttpServletResponse hsrpResponse)
                          throws java.io.IOException,
                                 javax.servlet.ServletException
Process form to logout from the application.

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

processNewBlogForm

protected void processNewBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest,
                                  javax.servlet.http.HttpServletResponse hsrpResponse)
                           throws java.io.IOException,
                                  javax.servlet.ServletException
Process form to display dialog to create new blog. It supplies template object with default information for new 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

processCreateBlogForm

protected void processCreateBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest,
                                     javax.servlet.http.HttpServletResponse hsrpResponse)
                              throws java.io.IOException,
                                     javax.servlet.ServletException
Process form to actually create new blog from supplied information.

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

processEditBlogForm

protected void processEditBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest,
                                   javax.servlet.http.HttpServletResponse hsrpResponse)
                            throws java.io.IOException,
                                   javax.servlet.ServletException
Process form to save modified information about 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

processEditBlogError

protected void processEditBlogError(javax.servlet.http.HttpServletRequest hsrqRequest,
                                    javax.servlet.http.HttpServletResponse hsrpResponse,
                                    Blog blog)
                             throws java.io.IOException,
                                    javax.servlet.ServletException
Process recoverable error, which has occured while saving blog. This will show again the edit blog page but with the modified data and explanative error message.

Parameters:
hsrqRequest - - the servlet request.
hsrpResponse - - the servlet response.
blog - - blog with modified data submitted to the server
Throws:
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response

processConfirmDeleteBlogForm

protected void processConfirmDeleteBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest,
                                            javax.servlet.http.HttpServletResponse hsrpResponse)
                                     throws java.io.IOException,
                                            javax.servlet.ServletException
Process form to display dialog to confirm deletion of a 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

processDeleteBlogForm

protected void processDeleteBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest,
                                     javax.servlet.http.HttpServletResponse hsrpResponse)
                              throws java.io.IOException,
                                     javax.servlet.ServletException
Process form to delete specified 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

processNewEntryBlogForm

protected void processNewEntryBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest,
                                       javax.servlet.http.HttpServletResponse hsrpResponse)
                                throws java.io.IOException,
                                       javax.servlet.ServletException
Process form to display dialog to create new blog entry.

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

processCreateEntryForm

protected void processCreateEntryForm(javax.servlet.http.HttpServletRequest hsrqRequest,
                                      javax.servlet.http.HttpServletResponse hsrpResponse)
                               throws java.io.IOException,
                                      javax.servlet.ServletException
Process form to actually create new blog entry.

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

processEditEntryForm

protected void processEditEntryForm(javax.servlet.http.HttpServletRequest hsrqRequest,
                                    javax.servlet.http.HttpServletResponse hsrpResponse)
                             throws java.io.IOException,
                                    javax.servlet.ServletException
Process form to save modified blog entry.

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

processEditEntryError

protected void processEditEntryError(javax.servlet.http.HttpServletRequest hsrqRequest,
                                     javax.servlet.http.HttpServletResponse hsrpResponse,
                                     Entry entry)
                              throws java.io.IOException,
                                     javax.servlet.ServletException
Process recoverable error, which has occured while saving entry. This will show again the edit entry page but with the modified data and explanative error message.

Parameters:
hsrqRequest - - the servlet request.
hsrpResponse - - the servlet response.
entry - - entry with modified data submitted to the server
Throws:
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response

processConfirmDeleteEntryForm

protected void processConfirmDeleteEntryForm(javax.servlet.http.HttpServletRequest hsrqRequest,
                                             javax.servlet.http.HttpServletResponse hsrpResponse)
                                      throws java.io.IOException,
                                             javax.servlet.ServletException
Process form to display dialog to confirm deletion of a blog entry.

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

processDeleteEntryForm

protected void processDeleteEntryForm(javax.servlet.http.HttpServletRequest hsrqRequest,
                                      javax.servlet.http.HttpServletResponse hsrpResponse)
                               throws java.io.IOException,
                                      javax.servlet.ServletException
Process form to delete specified blog entry.

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

parseBlogFromRequest

protected Blog parseBlogFromRequest(javax.servlet.http.HttpServletRequest hsrqRequest)
Create new instance of blog from a HTTP request.

Parameters:
hsrqRequest - - HTTP request from HTML form
Returns:
Blog

parseEntryFromRequest

protected Entry parseEntryFromRequest(javax.servlet.http.HttpServletRequest hsrqRequest)
Create new instance of blog entry from a HTTP request..

Parameters:
hsrqRequest - - HTTP request from HTML form
Returns:
Entry

verifyLogin

protected java.security.Principal verifyLogin(javax.servlet.http.HttpSession hsSession,
                                              javax.servlet.http.HttpServletRequest hsrqRequest,
                                              javax.servlet.http.HttpServletResponse hsrpResponse)
                                       throws javax.servlet.ServletException,
                                              java.io.IOException

Overrides:
verifyLogin in class org.opensubsystems.core.www.WebSessionServlet
Throws:
javax.servlet.ServletException
java.io.IOException

redirectToLogin

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

Overrides:
redirectToLogin in class org.opensubsystems.core.www.WebSessionServlet
Throws:
javax.servlet.ServletException
java.io.IOException


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