|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.stat.RawDataExportHandler
com.jalios.jcms.stat.CSVExportRawDataHandler
public class CSVExportRawDataHandler
implementation of RawDataExportHandler to generate CSV file
| Field Summary | |
|---|---|
static char |
DEFAULT_TEXT_QUALIFER
|
static java.lang.String |
REVISION
|
protected com.csvreader.CsvWriter |
writer
|
| Fields inherited from class com.jalios.jcms.stat.RawDataExportHandler |
|---|
key, out, realOutput, useCompressStream, userLang |
| Constructor Summary | |
|---|---|
CSVExportRawDataHandler()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class com.jalios.jcms.stat.RawDataExportHandler |
|---|
getKey, getOut, getUserLang, isUseCompressStream, setKey, setOut, setUseCompressStream, setUserLang |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String REVISION
public static char DEFAULT_TEXT_QUALIFER
protected com.csvreader.CsvWriter writer
| Constructor Detail |
|---|
public CSVExportRawDataHandler()
| Method Detail |
|---|
public java.lang.String getConfigurationFragmentPath()
RawDataExportHandler
getConfigurationFragmentPath in class RawDataExportHandler
public 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)
RawDataExportHandler
setParameters in class RawDataExportHandlerjspContext - the current JcmsContextpublic boolean validateParameters(JcmsContext context)
RawDataExportHandler
validateParameters in class RawDataExportHandlercontext - the JcmsContext
public void exportFooter(java.io.OutputStream out,
java.lang.String[] columnNames)
RawDataExportHandler
exportFooter in class RawDataExportHandlerout - outputstream associated to this handlercolumnNames - footer data
public void exportHeader(java.io.OutputStream out,
java.lang.String[] columnNames)
throws java.io.IOException
RawDataExportHandler
exportHeader in class RawDataExportHandlerout - outputstream associated to this handlercolumnNames - the names of columns
java.io.IOException
public void exportLine(java.io.OutputStream out,
java.lang.String[] dataArray)
throws java.io.IOException
RawDataExportHandler
exportLine in class RawDataExportHandlerout - outputstream associated to this handlerdataArray - the data array
java.io.IOExceptionpublic void init(java.io.OutputStream out)
RawDataExportHandler
init in class RawDataExportHandlerout - outputstream associated to this handlerpublic void end(java.io.OutputStream out)
RawDataExportHandler
end in class RawDataExportHandlerout - outputstream associated to this handler
public 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 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 language
public java.util.List<java.lang.String> duplicateHeader(java.lang.String name,
java.lang.Class<?> clazz)
RawDataExportHandler
duplicateHeader 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 RawDataExportHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||