org.torweg.pulse.component.util.retailer.imports
Class AbstractRetailerImporter
java.lang.Object
org.torweg.pulse.component.util.retailer.imports.AbstractRetailerImporter
- Direct Known Subclasses:
- CSVRetailerImporter
public abstract class AbstractRetailerImporter
- extends java.lang.Object
Subclasses of AbstractRetailerImporter are used for importing
Retailers from files.
- Version:
- $Revision: 1581 $
- Author:
- Christian Schatt, Daniel Dietz
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRetailerImporter
public AbstractRetailerImporter()
importAllRetailersFromFile
protected abstract int importAllRetailersFromFile(org.hibernate.Session session,
java.io.File file,
java.lang.String countryCode, ImportRetailerConfiguration conf)
throws RetailerImporterException
- Imports the
Retailers from the given File and
stores them in the database.
- Parameters:
session - the Session used for accessing the database.file - the File containing the data.countryCode - the country the Retailers have to be from.conf - the current ImportRetailerConfiguration
- Returns:
- the amount of stored
Retailers.
- Throws:
RetailerImporterException - if an exception occurs while importing the
Retailers.
getRetailerLogo
protected final VirtualFile getRetailerLogo(org.hibernate.Session session, Retailer retailer,
java.lang.String logoFolderPath)
- Returns the logo file of the given
Retailer. If none can be
found, null will be returned.
- Parameters:
session - the Session used for accessing the database.retailer - the Retailer whose logo file is sought after.logoFolderPath - the path to the folder containing the logo files.
- Returns:
- the logo file of the given
Retailer or
null.