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
Customer actions: creation, viewing, updating, deletion and merging
-
Field Summary
Fields inherited from class BaseAction
l, log, MAPPER, PATH_JSP_ADMIN, PATH_JSP_OPEN, PATH_JSP_USER, PATH_JSP_USERMOB, setupFields inherited from class org.apache.struts.actions.DispatchAction
clazz, methods, typesFields inherited from class org.apache.struts.actions.BaseAction
messagesFields inherited from class org.apache.struts.action.Action
servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.struts.action.ActionForwardcustomer(DynActionForm form, ConnectionSet conSet) Opens the customer view pageorg.apache.struts.action.ActionForwardcustomerCreate(DynActionForm form, ConnectionSet conSet) Creates a new customerorg.apache.struts.action.ActionForwardcustomerDelete(DynActionForm form, ConnectionSet conSet) Deletes a customer with its parameters and linksorg.apache.struts.action.ActionForwardcustomerGet(DynActionForm form, ConnectionSet conSet) Loads a customer for editingorg.apache.struts.action.ActionForwardcustomerMerge(DynActionForm form, ConnectionSet conSet) Merges one customer into another, copying parameters and links and deleting the merged oneorg.apache.struts.action.ActionForwardcustomerTitleList(DynActionForm form, ConnectionSet conSet) Returns customer titles matching the given substring, for autocompletionorg.apache.struts.action.ActionForwardcustomerUpdate(DynActionForm form, ConnectionSet conSet) Updates a customer's title and groupsprotected voidformatCustomerTitle(Customer customer, CustomerDAO customerDAO, ParamValueDAO paramDAO, Connection con) Formats and stores the customer title from its title patternorg.apache.struts.action.ActionForwardunspecified(DynActionForm form, ConnectionSet conSet) Default action method if no parameter 'action' passed.Methods inherited from class BaseAction
checkModified, dispatchMethod, getParameter, html, html, json, json, permissionCheck, restoreRequestParams, unspecified, updatePersonalizationMethods inherited from class org.apache.struts.actions.DispatchAction
cancelled, execute, getMethod, getMethodName, unspecifiedMethods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
-
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:BaseActionDefault action method if no parameter 'action' passed. Overwrite and implement.- Overrides:
unspecifiedin classBaseAction- 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 formconSet- 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 formconSet- 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 formconSet- 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 formconSet- 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 formconSet- 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 formconSet- 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 formconSet- 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 forcustomerDAO- customer DAO used to store the resultparamDAO- parameter value DAOcon- database connection- Throws:
Exception- on any error
-