Class MessageAction

java.lang.Object
org.apache.struts.action.Action
org.apache.struts.actions.BaseAction
org.apache.struts.actions.DispatchAction
org.bgerp.action.base.BaseAction
org.bgerp.action.MessageAction

public class MessageAction extends BaseAction
Message actions: viewing, listing, linking to processes and process messages
  • Field Details

    • UNPROCESSED_MESSAGES_PERSONAL_KEY

      public static final String UNPROCESSED_MESSAGES_PERSONAL_KEY
      Key for storing counter in personalization map.
      See Also:
    • ACTION_MODIFY_NOT_OWNED

      public static final String ACTION_MODIFY_NOT_OWNED
      Special action for edit and delete not owned messages.
  • Constructor Details

    • MessageAction

      public MessageAction()
      Default constructor
  • Method Details

    • unspecified

      public org.apache.struts.action.ActionForward unspecified(DynActionForm form, ConnectionSet conSet) throws Exception
      Description copied from class: BaseAction
      Default action method if no parameter 'action' passed. Overwrite and implement.
      Overrides:
      unspecified in class BaseAction
      Parameters:
      form -
      conSet -
      Returns:
      Throws:
      Exception
    • message

      public org.apache.struts.action.ActionForward message(DynActionForm form, ConnectionSet conSet) throws Exception
      Opens a single message, processed or newly loaded by type and system ID
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      HTML view forward
      Throws:
      Exception - on any error
    • messageUpdateProcess

      public org.apache.struts.action.ActionForward messageUpdateProcess(DynActionForm form, Connection con) throws Exception
      Links a message to a process, optionally saving a contact and notifying. Important, called also in processCreate(DynActionForm, ConnectionSet)
      Parameters:
      form - request form
      con - database connection
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • messageUpdateTags

      public org.apache.struts.action.ActionForward messageUpdateTags(DynActionForm form, Connection con) throws Exception
      Replaces the set of tags of a message
      Parameters:
      form - request form
      con - database connection
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • messageToggleTags

      public org.apache.struts.action.ActionForward messageToggleTags(DynActionForm form, Connection con) throws SQLException
      Adds or removes the given tags of a message
      Parameters:
      form - request form
      con - database connection
      Returns:
      JSON response
      Throws:
      SQLException - on a database error
    • messageUpdateRead

      public org.apache.struts.action.ActionForward messageUpdateRead(DynActionForm form, Connection con) throws Exception
      Sets or clears the read mark of a message
      Parameters:
      form - request form
      con - database connection
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • messageUpdateProcessToCopy

      public org.apache.struts.action.ActionForward messageUpdateProcessToCopy(DynActionForm form, Connection con) throws Exception
      Moves a message to a newly created copy of its process
      Parameters:
      form - request form
      con - database connection
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • messageDelete

      public org.apache.struts.action.ActionForward messageDelete(DynActionForm form, ConnectionSet conSet) throws Exception
      Deletes the selected messages, grouped by type, up to a maximum quantity
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • messageList

      public org.apache.struts.action.ActionForward messageList(DynActionForm form, ConnectionSet conSet) throws Exception
      Returns the list of processed or unprocessed messages across the allowed types
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      HTML view forward
      Throws:
      Exception - on any error
    • newMessageLoad

      public org.apache.struts.action.ActionForward newMessageLoad(DynActionForm form, ConnectionSet conSet) throws Exception
      Loads a new message of the given type from the external system
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • processCreate

      public org.apache.struts.action.ActionForward processCreate(DynActionForm form, ConnectionSet conSet) throws Exception
      Creates a process from a message and links it, then attaches the message to the process
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • processMessageList

      public org.apache.struts.action.ActionForward processMessageList(DynActionForm form, ConnectionSet conSet) throws Exception
      Returns the messages of a process and optionally its linked processes
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      HTML view forward
      Throws:
      Exception - on any error
    • processMessageCreateEdit

      public org.apache.struts.action.ActionForward processMessageCreateEdit(DynActionForm form, ConnectionSet conSet) throws Exception
      Opens the editor for creating a process message
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      HTML view forward
      Throws:
      Exception - on any error
    • processMessageCreateUpdate

      public org.apache.struts.action.ActionForward processMessageCreateUpdate(DynActionForm form, Connection con) throws Exception
      Saves a newly created process message
      Parameters:
      form - request form
      con - database connection
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • processMessageEdit

      public org.apache.struts.action.ActionForward processMessageEdit(DynActionForm form, ConnectionSet conSet) throws Exception
      Opens the editor for an existing or reply process message
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      HTML view forward
      Throws:
      Exception - on any error
    • processMessageUpdate

      public org.apache.struts.action.ActionForward processMessageUpdate(DynActionForm form, Connection con) throws Exception
      Creates or updates an outgoing process message
      Parameters:
      form - request form
      con - database connection
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • processMessageDelete

      public org.apache.struts.action.ActionForward processMessageDelete(DynActionForm form, ConnectionSet conSet) throws Exception
      Deletes a process message
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • modifyNotOwned

      public org.apache.struts.action.ActionForward modifyNotOwned(DynActionForm form, ConnectionSet conSet)
      Permission marker action for editing messages not owned by the user
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      never returns normally
    • template

      public org.apache.struts.action.ActionForward template(DynActionForm form, ConnectionSet conSet)
      Returns a message template by ID
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      JSON response