Class ExportProcess
- java.lang.Object
-
- java.lang.Thread
-
- com.saperion.ngc.servlet.process.LongRunningProcess
-
- com.saperion.ngc.servlet.process.export.ExportProcess
-
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
CSVExportProcess,XLSXExportProcess
public abstract class ExportProcess extends LongRunningProcess
Abstract superclass for processes that export data from a result list (no content).
-
-
Field Summary
Fields Modifier and Type Field Description protected static intDEFAULT_MAX_CELL_LENGTHDefault maximum length of a cell's value.protected java.util.Map<java.lang.String,com.saperion.intf.SaFieldDescription>fieldDescriptionsField descriptions for DDC in use.protected java.lang.StringfilenameFilename for export.static java.lang.StringPARAM_COLUMNSName for columns-parameter in paramters-map.static java.lang.StringPARAM_FIELDINFOSName for fieldinfos-parameter in parameters-map.static java.lang.StringPARAM_FILENAMEName for filename-parameter in parameters-map.static java.lang.StringPARAM_QUERYName for query-parameter in parameters-map.protected com.saperion.rmi.SaQueryInfoqueryThe query to execute to get search result.protected java.util.Map<java.lang.String,java.lang.String>selectedColumnsSelected columns to export (map from name to display-name).-
Fields inherited from class com.saperion.ngc.servlet.process.LongRunningProcess
bean, canceled, connectionProvider, CONTROL_BEAN_SESSION_ATTR, error, progress, session
-
-
Constructor Summary
Constructors Constructor Description ExportProcess(LRPControlBean bean, javax.servlet.http.HttpSession session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.List<java.lang.String>collectColumnNames(com.saperion.intf.SaDocumentInfo first)Collects a list of column names to export.protected CellFormattergetFormatter(com.saperion.intf.SaPropertyValue value)Returns a formatter for the specified value.-
Methods inherited from class com.saperion.ngc.servlet.process.LongRunningProcess
cancel, getProgress, isError, updateProgress, writeResult
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
PARAM_COLUMNS
public static final java.lang.String PARAM_COLUMNS
Name for columns-parameter in paramters-map.- See Also:
- Constant Field Values
-
PARAM_QUERY
public static final java.lang.String PARAM_QUERY
Name for query-parameter in parameters-map.- See Also:
- Constant Field Values
-
PARAM_FILENAME
public static final java.lang.String PARAM_FILENAME
Name for filename-parameter in parameters-map.- See Also:
- Constant Field Values
-
PARAM_FIELDINFOS
public static final java.lang.String PARAM_FIELDINFOS
Name for fieldinfos-parameter in parameters-map.- See Also:
- Constant Field Values
-
DEFAULT_MAX_CELL_LENGTH
protected static final int DEFAULT_MAX_CELL_LENGTH
Default maximum length of a cell's value.- See Also:
- Constant Field Values
-
query
protected final com.saperion.rmi.SaQueryInfo query
The query to execute to get search result.
-
selectedColumns
protected final java.util.Map<java.lang.String,java.lang.String> selectedColumns
Selected columns to export (map from name to display-name).
-
filename
protected final java.lang.String filename
Filename for export.
-
fieldDescriptions
protected final java.util.Map<java.lang.String,com.saperion.intf.SaFieldDescription> fieldDescriptions
Field descriptions for DDC in use.
-
-
Constructor Detail
-
ExportProcess
public ExportProcess(LRPControlBean bean, javax.servlet.http.HttpSession session)
- Parameters:
bean- control-bean for this processsession- current session
-
-
Method Detail
-
collectColumnNames
protected java.util.List<java.lang.String> collectColumnNames(com.saperion.intf.SaDocumentInfo first)
Collects a list of column names to export.- Parameters:
first- first result of the query- Returns:
- list of column names
-
getFormatter
protected CellFormatter getFormatter(com.saperion.intf.SaPropertyValue value)
Returns a formatter for the specified value.- Parameters:
value- value to format- Returns:
- formatter-instance
-
-