|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.opensubsystems.core.www.WebSessionServlet
org.opensubsystems.core.www.WebUIServlet
org.opensubsystems.blog.www.BlogBrowserServlet
org.opensubsystems.blog.www.BlogEditServlet
public class BlogEditServlet
Servlet responsible for browsing and editing of blogs and their entries. This servlets ads functionality to the browser servlet to manipulate the data.
| 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 |
|---|
public static final java.lang.String BLOGEDIT_LOGIN
public static final java.lang.String BLOGEDIT_PASSWORD
public static final java.lang.String BLOGEDIT_LOGIN_PAGE
public static final java.lang.String BLOGEDIT_LOGOUT_PAGE
public static final java.lang.String BLOGEDIT_NEW_BLOG_PAGE
public static final java.lang.String BLOGEDIT_CONFIRMDELETE_BLOG_PAGE
public static final java.lang.String BLOGEDIT_NEWENTRY_BLOG_PAGE
public static final java.lang.String BLOGEDIT_CONFIRMDELETE_BLOGENTRY_PAGE
public static final java.lang.String FORM_CREATE_BLOG_NAME
public static final java.lang.String FORM_EDIT_BLOG_NAME
public static final java.lang.String FORM_EDIT_BLOG_NAME_CREATE
public static final java.lang.String FORM_EDIT_BLOG_NAME_DELETE
public static final java.lang.String FORM_EDIT_BLOG_NAME_CREATEENTRY
public static final java.lang.String FORM_DELETE_BLOG_NAME
public static final java.lang.String FORM_CREATE_BLOGENTRY_NAME
public static final java.lang.String FORM_EDIT_BLOGENTRY_NAME
public static final java.lang.String FORM_EDIT_BLOGENTRY_NAME_DELETE
public static final java.lang.String FORM_DELETE_BLOGENTRY_NAME
public static final java.lang.String FORM_LOGIN_NAME
public static final java.lang.String FORM_LOGOUT_NAME
public static final int FORM_NEW_BLOG_ID
public static final int FORM_CREATE_BLOG_ID
public static final int FORM_EDIT_BLOG_ID
public static final int FORM_CONFIRMDELETE_BLOG_ID
public static final int FORM_DELETE_BLOG_ID
public static final int FORM_NEWENTRY_BLOG_ID
public static final int FORM_CREATE_BLOGENTRY_ID
public static final int FORM_EDIT_BLOGENTRY_ID
public static final int FORM_CONFIRMDELETE_BLOGENTRY_ID
public static final int FORM_DELETE_BLOGENTRY_ID
public static final int FORM_LOGIN_ID
public static final int FORM_LOGOUT_ID
public static final int FORM_COUNT_BLOGEDIT
protected java.lang.String m_strLogin
protected java.lang.String m_strPassword
| Constructor Detail |
|---|
public BlogEditServlet()
| Method Detail |
|---|
public void init(javax.servlet.ServletConfig scConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class BlogBrowserServletjavax.servlet.ServletExceptionpublic java.lang.String getServletInfo()
getServletInfo in interface javax.servlet.ServletgetServletInfo in class BlogBrowserServlet
protected void doGet(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws javax.servlet.ServletException,
java.io.IOException
doGet in class BlogBrowserServletjavax.servlet.ServletException
java.io.IOException
protected void doPost(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws javax.servlet.ServletException,
java.io.IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletException
java.io.IOExceptionprotected int getFormToProcess(javax.servlet.http.HttpServletRequest hsrqRequest)
getFormToProcess in class org.opensubsystems.core.www.WebUIServlet
protected void processNewLoginForm(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processLoginForm(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processNewLogoutForm(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processLogoutForm(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processNewBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processCreateBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processEditBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processEditBlogError(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse,
Blog blog)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.blog - - blog with modified data submitted to the server
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processConfirmDeleteBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processDeleteBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processNewEntryBlogForm(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processCreateEntryForm(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processEditEntryForm(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processEditEntryError(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse,
Entry entry)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.entry - - entry with modified data submitted to the server
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processConfirmDeleteEntryForm(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing response
protected void processDeleteEntryForm(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws java.io.IOException,
javax.servlet.ServletException
hsrqRequest - - the servlet request.hsrpResponse - - the servlet response.
javax.servlet.ServletException - - an error while serving request
java.io.IOException - - an error while writing responseprotected Blog parseBlogFromRequest(javax.servlet.http.HttpServletRequest hsrqRequest)
hsrqRequest - - HTTP request from HTML form
protected Entry parseEntryFromRequest(javax.servlet.http.HttpServletRequest hsrqRequest)
hsrqRequest - - HTTP request from HTML form
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
verifyLogin in class org.opensubsystems.core.www.WebSessionServletjavax.servlet.ServletException
java.io.IOException
protected void redirectToLogin(javax.servlet.http.HttpServletRequest hsrqRequest,
javax.servlet.http.HttpServletResponse hsrpResponse)
throws javax.servlet.ServletException,
java.io.IOException
redirectToLogin in class org.opensubsystems.core.www.WebSessionServletjavax.servlet.ServletException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||