public class CSVExportRawDataHandler extends RawDataExportHandler
RawDataExportHandler
to generate CSV fileModifier 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, setUserLang
public static final java.lang.String REVISION
public static char DEFAULT_TEXT_QUALIFER
protected com.csvreader.CsvWriter writer
public java.lang.String getConfigurationFragmentPath()
RawDataExportHandler
getConfigurationFragmentPath
in class RawDataExportHandler
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class RawDataExportHandler
java.lang.CloneNotSupportedException
public 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)
RawDataExportHandler
setParameters
in class RawDataExportHandler
jspContext
- the current JcmsContext
public boolean validateParameters(JcmsContext context)
RawDataExportHandler
validateParameters
in class RawDataExportHandler
context
- the JcmsContext
public void exportFooter(java.io.OutputStream out, java.lang.String[] columnNames)
RawDataExportHandler
exportFooter
in class RawDataExportHandler
out
- outputstream associated to this handlercolumnNames
- footer datapublic void exportHeader(java.io.OutputStream out, java.lang.String[] columnNames) throws java.io.IOException
RawDataExportHandler
exportHeader
in class RawDataExportHandler
out
- outputstream associated to this handlercolumnNames
- the names of columnsjava.io.IOException
public void exportLine(java.io.OutputStream out, java.lang.String[] dataArray) throws java.io.IOException
RawDataExportHandler
exportLine
in class RawDataExportHandler
out
- outputstream associated to this handlerdataArray
- the data arrayjava.io.IOException
public void init(java.io.OutputStream out)
RawDataExportHandler
init
in class RawDataExportHandler
out
- outputstream associated to this handlerpublic void end(java.io.OutputStream out)
RawDataExportHandler
end
in class RawDataExportHandler
out
- 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)
RawDataExportHandler
convertField
in class RawDataExportHandler
name
- 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)
RawDataExportHandler
duplicateHeader
in class RawDataExportHandler
name
- 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 RawDataExportHandler
public java.lang.String getContentType()
getContentType
in class RawDataExportHandler
Copyright © 2001-2010 Jalios SA. All Rights Reserved.