|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 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 | |
---|---|
Object |
clone()
|
String |
convertField(String name,
Class<?> clazz,
Set<?> valueSet,
String extraFieldName,
String userLang)
convert field to handler data |
List<String> |
duplicateHeader(String name,
Class<?> clazz)
indicate if a field have other representation (like member have id and also a name) |
void |
end(OutputStream out)
Process end of export (after any write) |
void |
exportFooter(OutputStream out,
String[] columnNames)
export footer of data |
void |
exportHeader(OutputStream out,
String[] columnNames)
Export header of data |
void |
exportLine(OutputStream out,
String[] dataArray)
Export a line of data |
String |
getAvailableCsvConfigurationEscapeMode()
|
Charset |
getCharset()
|
String |
getCharsetName()
|
String |
getConfigurationFragmentPath()
indicates the path of the jsp fragment with driver configuration fields |
String |
getContentType()
|
int |
getCsvConfigurationEscapeMode()
|
String |
getCsvConfigurationFieldSeparator()
|
String |
getCsvConfigurationTextQualifier()
|
String |
getFileExtension()
|
void |
init(OutputStream out)
Initialise the handler (before any write) |
void |
setCharset(String value)
|
void |
setCsvConfigurationEscapeMode(String csvConfigurationEscapeMode)
|
void |
setCsvConfigurationFieldSeparator(String value)
|
void |
setCsvConfigurationTextQualifier(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 String REVISION
public static char DEFAULT_TEXT_QUALIFER
protected com.csvreader.CsvWriter writer
Constructor Detail |
---|
public CSVExportRawDataHandler()
Method Detail |
---|
public String getConfigurationFragmentPath()
RawDataExportHandler
getConfigurationFragmentPath
in class RawDataExportHandler
public Object clone() throws CloneNotSupportedException
clone
in class RawDataExportHandler
CloneNotSupportedException
public Charset getCharset()
public String getCharsetName()
public void setCharset(String value)
public String getCsvConfigurationFieldSeparator()
public void setCsvConfigurationFieldSeparator(String value)
public int getCsvConfigurationEscapeMode()
public String getAvailableCsvConfigurationEscapeMode()
public void setCsvConfigurationEscapeMode(String csvConfigurationEscapeMode)
public String getCsvConfigurationTextQualifier()
public void setCsvConfigurationTextQualifier(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(OutputStream out, String[] columnNames)
RawDataExportHandler
exportFooter
in class RawDataExportHandler
out
- outputstream associated to this handlercolumnNames
- footer datapublic void exportHeader(OutputStream out, String[] columnNames) throws IOException
RawDataExportHandler
exportHeader
in class RawDataExportHandler
out
- outputstream associated to this handlercolumnNames
- the names of columns
IOException
public void exportLine(OutputStream out, String[] dataArray) throws IOException
RawDataExportHandler
exportLine
in class RawDataExportHandler
out
- outputstream associated to this handlerdataArray
- the data array
IOException
public void init(OutputStream out)
RawDataExportHandler
init
in class RawDataExportHandler
out
- outputstream associated to this handlerpublic void end(OutputStream out)
RawDataExportHandler
end
in class RawDataExportHandler
out
- outputstream associated to this handlerpublic String convertField(String name, Class<?> clazz, Set<?> valueSet, String extraFieldName, 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 language
public List<String> duplicateHeader(String name, 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 String getFileExtension()
getFileExtension
in class RawDataExportHandler
public String getContentType()
getContentType
in class RawDataExportHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |