com.softslate.commerce.administrator.importexport
Class CommonExportAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by com.softslate.commerce.customer.core.BaseAction
          extended by com.softslate.commerce.administrator.importexport.CommonExportAction
Direct Known Subclasses:
CategoriesExportAction, OptionsExportAction, OrdersExportAction, ProductsExportAction

public class CommonExportAction
extends BaseAction

Action class corresponding to the common text file exports (for attributes and categories). Also base class for ProductsExport and OptionsExport.

Author:
Ashish Jain

Field Summary
(package private) static org.apache.commons.logging.Log log
           
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
CommonExportAction()
           
 
Method Summary
protected  java.lang.String[][] buildFileData(java.lang.String[] headerStr, java.util.Collection businessObjects, boolean includeHeader)
           
protected  java.lang.String buildFileRowColumnData(java.lang.String headerStr, BusinessObject businessObject)
          This method has been extracted so that extending classes can override it for custom data access.
protected  java.lang.String[] buildHeader(ExportForm baseForm)
           
 org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void generateOutput(javax.servlet.http.HttpServletResponse response, ExportForm baseForm, java.util.Collection businessObjects)
           
protected  void writeToOutput(java.io.Writer pw, java.lang.String[][] data, char delimiter)
           
 
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, 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

log

static org.apache.commons.logging.Log log
Constructor Detail

CommonExportAction

public CommonExportAction()
Method Detail

execute

public org.apache.struts.action.ActionForward execute(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
Overrides:
execute in class org.apache.struts.action.Action
Throws:
java.lang.Exception

generateOutput

protected void generateOutput(javax.servlet.http.HttpServletResponse response,
                              ExportForm baseForm,
                              java.util.Collection businessObjects)
                       throws java.lang.IllegalAccessException,
                              java.lang.reflect.InvocationTargetException,
                              java.lang.NoSuchMethodException,
                              java.io.IOException
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.io.IOException

writeToOutput

protected void writeToOutput(java.io.Writer pw,
                             java.lang.String[][] data,
                             char delimiter)
                      throws java.io.IOException
Throws:
java.io.IOException

buildHeader

protected java.lang.String[] buildHeader(ExportForm baseForm)

buildFileData

protected java.lang.String[][] buildFileData(java.lang.String[] headerStr,
                                             java.util.Collection businessObjects,
                                             boolean includeHeader)
                                      throws java.lang.IllegalAccessException,
                                             java.lang.reflect.InvocationTargetException,
                                             java.lang.NoSuchMethodException
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException

buildFileRowColumnData

protected java.lang.String buildFileRowColumnData(java.lang.String headerStr,
                                                  BusinessObject businessObject)
                                           throws java.lang.IllegalAccessException,
                                                  java.lang.reflect.InvocationTargetException
This method has been extracted so that extending classes can override it for custom data access.

Parameters:
headerStr -
businessObject -
Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException


Copyright ? SoftSlate, LLC 2003?2005