org.torweg.pulse.component.util.retailer.exports
Class AbstractRetailerExporter
java.lang.Object
org.torweg.pulse.component.util.retailer.exports.AbstractRetailerExporter
- Direct Known Subclasses:
- CSVRetailerExporter, XLSXRetailerExporter
public abstract class AbstractRetailerExporter
- extends java.lang.Object
Abstract base-class to derive Retailer-exporters from.
- Version:
- $Revision: 1581 $
- Author:
- Daniel Dietz
|
Method Summary |
protected java.lang.String |
convertBitSetToString(java.util.BitSet bs,
int maxSize)
Converts the given BitSet to a String of '0's
and '1's. |
abstract java.lang.Object |
createExportDownload(ServiceRequest request,
java.util.List<Retailer> retailers,
java.lang.String fileName,
int retailStoreFilterSize,
int webShopFilterSize)
Creates the export to a file named fileName for the given list
of Retailers and adds a DownloadEvent to the
given ServiceRequest. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRetailerExporter
public AbstractRetailerExporter()
createExportDownload
public abstract java.lang.Object createExportDownload(ServiceRequest request,
java.util.List<Retailer> retailers,
java.lang.String fileName,
int retailStoreFilterSize,
int webShopFilterSize)
- Creates the export to a file named fileName for the given list
of
Retailers and adds a DownloadEvent to the
given ServiceRequest.
- Parameters:
request - the current ServiceRequestretailers - the Retailers to be exportedfileName - the fileName for the downloadretailStoreFilterSize - the size of Retailer.retailStoreFilterwebShopFilterSize - the size of Retailer.webShopFilter
- Returns:
null, is supposed to add a
DownloadEvent to the request
convertBitSetToString
protected final java.lang.String convertBitSetToString(java.util.BitSet bs,
int maxSize)
- Converts the given
BitSet to a String of '0's
and '1's. If the bit at a certain index of the BitSet is
set, the resulting String will contain a '1' at that index.
Else, the String will contain a '0' at that index. If the
given parameter maxSize is greater than the size of the
BitSet, the length of the resulting String will
match the size of the BitSet. Otherwise, the length of the
resulting String will match the parameter maxSize. If the
BitSet is null, null will be
returned.
- Parameters:
bs - the BitSet to be converted to a
String.maxSize - the maximum size of the resulting String.
- Returns:
- the
String representation of the given
BitSet.