public class CSVExportRawDataHandler extends RawDataExportHandler
RawDataExportHandler to generate CSV file| Modifier and Type | Field and Description |
|---|---|
static char |
DEFAULT_TEXT_QUALIFER |
static java.lang.String |
REVISION |
protected com.csvreader.CsvWriter |
writer |
filenameBase, key, out, realOutput, useCompressStream, userLang| Constructor and Description |
|---|
CSVExportRawDataHandler() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
java.lang.String |
convertField(java.lang.String name,
java.lang.Class<?> clazz,
java.util.Set<?> valueSet,
java.lang.String extraFieldName,
java.lang.String userLang)
convert field to handler data
|
java.util.List<java.lang.String> |
duplicateHeader(java.lang.String name,
java.lang.Class<?> clazz)
indicate if a field have other representation (like member have id and also a name)
|
void |
end(java.io.OutputStream out)
Process end of export (after any write)
|
void |
exportFooter(java.io.OutputStream out,
java.lang.String[] columnNames)
export footer of data
|
void |
exportHeader(java.io.OutputStream out,
java.lang.String[] columnNames)
Export header of data
|
void |
exportLine(java.io.OutputStream out,
java.lang.String[] dataArray)
Export a line of data
|
java.lang.String |
getAvailableCsvConfigurationEscapeMode() |
java.nio.charset.Charset |
getCharset() |
java.lang.String |
getCharsetName() |
java.lang.String |
getConfigurationFragmentPath()
indicates the path of the jsp fragment with driver configuration fields
|
java.lang.String |
getContentType() |
int |
getCsvConfigurationEscapeMode() |
java.lang.String |
getCsvConfigurationFieldSeparator() |
java.lang.String |
getCsvConfigurationTextQualifier() |
java.lang.String |
getFileExtension() |
void |
init(java.io.OutputStream out)
Initialise the handler (before any write)
|
void |
setCharset(java.lang.String value) |
void |
setCsvConfigurationEscapeMode(java.lang.String csvConfigurationEscapeMode) |
void |
setCsvConfigurationFieldSeparator(java.lang.String value) |
void |
setCsvConfigurationTextQualifier(java.lang.String csvConfigurationTextQualifier) |
void |
setParameters(JcmsContext jspContext)
update handler from parameters form
|
boolean |
validateParameters(JcmsContext context)
validate current parameter.
|
getFilenameBase, getKey, getOut, getUserLang, isUseCompressStream, setFilenameBase, setKey, setOut, setUseCompressStream, setUserLangpublic static final java.lang.String REVISION
public static char DEFAULT_TEXT_QUALIFER
protected com.csvreader.CsvWriter writer
public java.lang.String getConfigurationFragmentPath()
RawDataExportHandlergetConfigurationFragmentPath in class RawDataExportHandlerpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class RawDataExportHandlerjava.lang.CloneNotSupportedExceptionpublic java.nio.charset.Charset getCharset()
public java.lang.String getCharsetName()
public void setCharset(java.lang.String value)
public java.lang.String getCsvConfigurationFieldSeparator()
public void setCsvConfigurationFieldSeparator(java.lang.String value)
public int getCsvConfigurationEscapeMode()
public java.lang.String getAvailableCsvConfigurationEscapeMode()
public void setCsvConfigurationEscapeMode(java.lang.String csvConfigurationEscapeMode)
public java.lang.String getCsvConfigurationTextQualifier()
public void setCsvConfigurationTextQualifier(java.lang.String csvConfigurationTextQualifier)
public void setParameters(JcmsContext jspContext)
RawDataExportHandlersetParameters in class RawDataExportHandlerjspContext - the current JcmsContextpublic boolean validateParameters(JcmsContext context)
RawDataExportHandlervalidateParameters in class RawDataExportHandlercontext - the JcmsContextpublic void exportFooter(java.io.OutputStream out,
java.lang.String[] columnNames)
RawDataExportHandlerexportFooter in class RawDataExportHandlerout - outputstream associated to this handlercolumnNames - footer datapublic void exportHeader(java.io.OutputStream out,
java.lang.String[] columnNames)
throws java.io.IOException
RawDataExportHandlerexportHeader in class RawDataExportHandlerout - outputstream associated to this handlercolumnNames - the names of columnsjava.io.IOExceptionpublic void exportLine(java.io.OutputStream out,
java.lang.String[] dataArray)
throws java.io.IOException
RawDataExportHandlerexportLine in class RawDataExportHandlerout - outputstream associated to this handlerdataArray - the data arrayjava.io.IOExceptionpublic void init(java.io.OutputStream out)
RawDataExportHandlerinit in class RawDataExportHandlerout - outputstream associated to this handlerpublic void end(java.io.OutputStream out)
RawDataExportHandlerend in class RawDataExportHandlerout - outputstream associated to this handlerpublic java.lang.String convertField(java.lang.String name,
java.lang.Class<?> clazz,
java.util.Set<?> valueSet,
java.lang.String extraFieldName,
java.lang.String userLang)
RawDataExportHandlerconvertField in class RawDataExportHandlername - the name of the field (see StatEntry.STAT_FIELDS)clazz - the class of the field (see StatEntry.STAT_FIELDS_CLASS)valueSet - the Set of valueextraFieldName - the duplicate field name if useduserLang - the current languagepublic java.util.List<java.lang.String> duplicateHeader(java.lang.String name,
java.lang.Class<?> clazz)
RawDataExportHandlerduplicateHeader in class RawDataExportHandlername - the name of the field (see StatEntry.STAT_FIELDS)clazz - the class of the field (see StatEntry.STAT_FIELDS_CLASS)List of other representation namepublic java.lang.String getFileExtension()
getFileExtension in class RawDataExportHandlerpublic java.lang.String getContentType()
getContentType in class RawDataExportHandlerCopyright © 2001-2010 Jalios SA. All Rights Reserved.