org.figure8.join.control.action
Class MessageActions

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.figure8.join.control.JoinAction
          extended by org.figure8.join.control.action.MessageActions

public class MessageActions
extends JoinAction

Struts action used for managing news messages within Join application.

Version:
$Revision: 1.1 $
Author:
Laurent Broudoux

Field Summary
static java.lang.String LOAD_OP
          Operation code for loading a specific Message
static java.lang.String MESSAGE_KEY
          The session scope attribute under which the Message object currently selected by our logged-in User is stored.
static java.lang.String MESSAGES_KEY
          The request scope attribute under which the retrieved Messages list is stored.
static java.lang.String OPEN_OP
          Operation code for getting open messages using release
protected  IntegrationProcessManager processManager
          The integration process manager implementation to use.
protected  ReportingManager reportingManager
          The reporting manager implementation to use.
static java.lang.String SAVE_OP
          Operation code for saving a Message (create or update)
static java.lang.String SEARCH_OP
          Operation code for searching messages using dates and release
 
Fields inherited from class org.figure8.join.control.JoinAction
BODY_ATTRIBUTE, BODY_PARAMETER, EXCEPTION_KEY, GUI_KEY, OP_PARAMETER, REND_MAIN, REND_NONE, REND_PARAMETER, REND_POPUP, XHR_PARAMETER
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
MessageActions()
          Creates a new instance of MessageActions
 
Method Summary
 org.apache.struts.action.ActionForward doExecute(java.lang.String operation, org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Abstract method that subclasses must implement.
protected  org.apache.struts.action.ActionForward getNewMessages(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Retrieve a list of open messages (ie. having publication dates corresponding to today).
protected  org.apache.struts.action.ActionForward loadMessage(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Load a specified message from datastore and fill form with it.
protected  org.apache.struts.action.ActionForward saveMessage(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Save a message into datastore.
protected  org.apache.struts.action.ActionForward searchMessages(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Retrieve a list of Messages using the release, publication and expiry date criteria.
 void setIntegrationProcessManager(IntegrationProcessManager manager)
           
 void setReportingManager(ReportingManager manager)
           
 
Methods inherited from class org.figure8.join.control.JoinAction
execute, getUserContainer, isLoggedIn, isXhrRequest, removeObsoleteForm
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOAD_OP

public static final java.lang.String LOAD_OP
Operation code for loading a specific Message

See Also:
Constant Field Values

SAVE_OP

public static final java.lang.String SAVE_OP
Operation code for saving a Message (create or update)

See Also:
Constant Field Values

OPEN_OP

public static final java.lang.String OPEN_OP
Operation code for getting open messages using release

See Also:
Constant Field Values

SEARCH_OP

public static final java.lang.String SEARCH_OP
Operation code for searching messages using dates and release

See Also:
Constant Field Values

MESSAGE_KEY

public static final java.lang.String MESSAGE_KEY
The session scope attribute under which the Message object currently selected by our logged-in User is stored.

See Also:
Constant Field Values

MESSAGES_KEY

public static final java.lang.String MESSAGES_KEY
The request scope attribute under which the retrieved Messages list is stored.

See Also:
Constant Field Values

reportingManager

protected ReportingManager reportingManager
The reporting manager implementation to use.


processManager

protected IntegrationProcessManager processManager
The integration process manager implementation to use.

Constructor Detail

MessageActions

public MessageActions()
Creates a new instance of MessageActions

Method Detail

setReportingManager

public void setReportingManager(ReportingManager manager)
Parameters:
manager - The reporting manager implementation instance to use

setIntegrationProcessManager

public void setIntegrationProcessManager(IntegrationProcessManager manager)
Parameters:
manager - The integration process manager implementation to use

doExecute

public org.apache.struts.action.ActionForward doExecute(java.lang.String operation,
                                                        org.apache.struts.action.ActionMapping mapping,
                                                        org.apache.struts.action.ActionForm form,
                                                        javax.servlet.http.HttpServletRequest request,
                                                        javax.servlet.http.HttpServletResponse response)
                                                 throws java.lang.Exception
Description copied from class: JoinAction
Abstract method that subclasses must implement. The real execution must be done here according to the specified operation. ActionForward returned by execution should only point on page fragment : this superclass is responsible of including them within a whole page.

Specified by:
doExecute in class JoinAction
Parameters:
operation - String representing the operation to invoke on Action
mapping - Mapping between forwards name and path for this action
form - The form object containing request parameters
request - The servlet container request wrapper
response - The servlet container response wrapper
Returns:
A forward to the next view to render and display
Throws:
java.lang.Exception - such as InfraStructureExceptions ...

loadMessage

protected org.apache.struts.action.ActionForward loadMessage(org.apache.struts.action.ActionMapping mapping,
                                                             org.apache.struts.action.ActionForm form,
                                                             javax.servlet.http.HttpServletRequest request,
                                                             javax.servlet.http.HttpServletResponse response)
                                                      throws java.lang.Exception
Load a specified message from datastore and fill form with it.

Returns:
A forward to the next view to render and display
Throws:
java.lang.Exception

saveMessage

protected org.apache.struts.action.ActionForward saveMessage(org.apache.struts.action.ActionMapping mapping,
                                                             org.apache.struts.action.ActionForm form,
                                                             javax.servlet.http.HttpServletRequest request,
                                                             javax.servlet.http.HttpServletResponse response)
                                                      throws java.lang.Exception
Save a message into datastore. The Message may be an already existing one or a new one (this is indeed a create or update method).

Returns:
A forward to the next view to render and display
Throws:
java.lang.Exception

getNewMessages

protected org.apache.struts.action.ActionForward getNewMessages(org.apache.struts.action.ActionMapping mapping,
                                                                org.apache.struts.action.ActionForm form,
                                                                javax.servlet.http.HttpServletRequest request,
                                                                javax.servlet.http.HttpServletResponse response)
                                                         throws java.lang.Exception
Retrieve a list of open messages (ie. having publication dates corresponding to today).

Returns:
A forward to the next view to render and display.
Throws:
java.lang.Exception

searchMessages

protected org.apache.struts.action.ActionForward searchMessages(org.apache.struts.action.ActionMapping mapping,
                                                                org.apache.struts.action.ActionForm form,
                                                                javax.servlet.http.HttpServletRequest request,
                                                                javax.servlet.http.HttpServletResponse response)
                                                         throws java.lang.Exception
Retrieve a list of Messages using the release, publication and expiry date criteria.

Returns:
A forward to the next view to render and display
Throws:
java.lang.Exception


Copyright © 2005-2008 Join. All Rights Reserved.