Class CustomerAction

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.CustomerAction

public class CustomerAction extends BaseAction
Customer actions: creation, viewing, updating, deletion and merging
  • Constructor Details

    • CustomerAction

      public CustomerAction()
      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
    • customerCreate

      public org.apache.struts.action.ActionForward customerCreate(DynActionForm form, ConnectionSet conSet) throws Exception
      Creates a new customer
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • customerGet

      public org.apache.struts.action.ActionForward customerGet(DynActionForm form, ConnectionSet conSet) throws Exception
      Loads a customer for editing
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      HTML view forward
      Throws:
      Exception - on any error
    • customerUpdate

      public org.apache.struts.action.ActionForward customerUpdate(DynActionForm form, ConnectionSet conSet) throws Exception
      Updates a customer's title and groups
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • customerDelete

      public org.apache.struts.action.ActionForward customerDelete(DynActionForm form, ConnectionSet conSet) throws Exception
      Deletes a customer with its parameters and links
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • customer

      public org.apache.struts.action.ActionForward customer(DynActionForm form, ConnectionSet conSet) throws Exception
      Opens the customer view page
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      HTML view forward
      Throws:
      Exception - on any error
    • customerTitleList

      public org.apache.struts.action.ActionForward customerTitleList(DynActionForm form, ConnectionSet conSet) throws Exception
      Returns customer titles matching the given substring, for autocompletion
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      HTML view forward
      Throws:
      Exception - on any error
    • customerMerge

      public org.apache.struts.action.ActionForward customerMerge(DynActionForm form, ConnectionSet conSet) throws Exception
      Merges one customer into another, copying parameters and links and deleting the merged one
      Parameters:
      form - request form
      conSet - connection set
      Returns:
      JSON response
      Throws:
      Exception - on any error
    • formatCustomerTitle

      protected void formatCustomerTitle(Customer customer, CustomerDAO customerDAO, ParamValueDAO paramDAO, Connection con) throws Exception
      Formats and stores the customer title from its title pattern
      Parameters:
      customer - customer to format the title for
      customerDAO - customer DAO used to store the result
      paramDAO - parameter value DAO
      con - database connection
      Throws:
      Exception - on any error