Class 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).
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static int DEFAULT_MAX_CELL_LENGTH
      Default maximum length of a cell's value.
      protected java.util.Map<java.lang.String,​com.saperion.intf.SaFieldDescription> fieldDescriptions
      Field descriptions for DDC in use.
      protected java.lang.String filename
      Filename for export.
      static java.lang.String PARAM_COLUMNS
      Name for columns-parameter in paramters-map.
      static java.lang.String PARAM_FIELDINFOS
      Name for fieldinfos-parameter in parameters-map.
      static java.lang.String PARAM_FILENAME
      Name for filename-parameter in parameters-map.
      static java.lang.String PARAM_QUERY
      Name for query-parameter in parameters-map.
      protected com.saperion.rmi.SaQueryInfo query
      The query to execute to get search result.
      protected java.util.Map<java.lang.String,​java.lang.String> selectedColumns
      Selected columns to export (map from name to display-name).
      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • 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 CellFormatter getFormatter​(com.saperion.intf.SaPropertyValue value)
      Returns a formatter for the specified value.
      • 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
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 process
        session - 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