public class ImportIntelligentOfferAssociationsCmdImpl extends AsyncControllerCommandImpl implements ImportIntelligentOfferAssociationsCmd
To import all the files in a directory, specify the following parameter:
To import one flat file, specify the following parameters:
Modifier and Type | Field and Description |
---|---|
static java.lang.Integer | CANCELLED_STATUS
Constant used to represent Canceled status for PROCESSFILE table
|
static java.lang.String | COPYRIGHT
IBM copyright notice field.
|
static java.lang.Integer | FAILED_STATUS
Constant used to represent Failed status for PROCESSFILE table
|
static java.lang.Integer | NEW_FILE
Constant used to represent New file for PROCESSFILE table
|
static java.lang.Integer | PROCESSING_STATUS
Constant used to represent Processing status for PROCESSFILE table
|
static java.lang.Integer | SUCCESS_STATUS
Constant used to represent Complete status for PROCESSFILE table
|
Constructor and Description |
---|
ImportIntelligentOfferAssociationsCmdImpl()
Default constructor for this command.
|
Modifier and Type | Method and Description |
---|---|
protected void | callDataLoadInvoker()
This method calls the catalog data load to import the merchandising associations.
|
boolean | checkForExistingAssociationType(java.lang.String massocTypeId)
This method checks if the specified merchandising association type already exists in the MASSOCTYPE database table.
|
boolean | createAssociationType(java.lang.String massocTypeId)
This method creates the specified merchandising association type in the MASSOCTYPE database table.
|
boolean | deleteExistingAssociations(java.lang.String massocTypeId, java.lang.Integer massocStoreId)
This method deletes merchandising associations of the specified type from a store.
|
int | fileImportedStatus(java.lang.String fileName)
This method will return the process status of the flat file.
|
java.lang.String | getDataLoadFilename()
This method gets the name of the data load configuration file to use when calling the catalog data load.
|
protected java.util.Map | getDataLoadParameters()
This method gets the parameters passed to the catalog data load.
|
java.lang.String[] | getFileNameList(java.lang.String dirName)
This method returns a list of the flat file names under the specified directory.
|
long | getProcessFileId(java.lang.String fileName)
This method will retrieve the unique id of the flat file from PROCESSFILE table.
|
boolean | isReadyToCallExecute()
This method returns true.
|
void | manageAssociations(java.lang.String fileName)
This method parses the flat file name to find the associated offer and performs the following tasks: If necessary, create a new entry in the MASSOCTYPE database table. If necessary, delete any existing merchandising associations in the store of the specified offer name.
|
java.lang.String[] | parseFileName(java.lang.String flatFileName)
This method parses the Intelligent Offer flat file name.
|
void | performExecute()
For each file to be imported, this method performs the following tasks: If necessary, create a new entry in the MASSOCTYPE database table. If necessary, delete any existing merchandising associations in the store of the specified offer name. Create an entry in the UPLOADFILE, PROCESSFILE and FILEPROCREL tables. Status will be set in the PROCESSFILE table for each flat file import. Status is set 2 if import is successful, 3 if import is failed or 4 if the import is canceled. Status of the import is set to 1 i.e Processing, while processing the import and then set to 2 if the import is Successful or 3 if import is Failed. Files with Status 1 i.e Processing and 3 i.e Failed will be considered for re-import, if the command is scheduled again Files with Status 2 i.e Successful and 4 i.e Canceled will not be considered for re-import. Call the catalog data load to import the merchandising associations.
|
void | setRequestProperties(TypedProperty reqParms)
This method extracts the required parameters from the request properties.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.Integer NEW_FILE
public static final java.lang.Integer PROCESSING_STATUS
public static final java.lang.Integer SUCCESS_STATUS
public static final java.lang.Integer FAILED_STATUS
public static final java.lang.Integer CANCELLED_STATUS
public ImportIntelligentOfferAssociationsCmdImpl()
public boolean isReadyToCallExecute()
public boolean checkForExistingAssociationType(java.lang.String massocTypeId)
public boolean createAssociationType(java.lang.String massocTypeId)
public java.lang.String[] parseFileName(java.lang.String flatFileName) throws com.ibm.commerce.marketing.commands.logging.ImportIntelligentOfferAssociationsException
public boolean deleteExistingAssociations(java.lang.String massocTypeId, java.lang.Integer massocStoreId)
public void performExecute() throws ECException
public int fileImportedStatus(java.lang.String fileName)
public long getProcessFileId(java.lang.String fileName)
public void manageAssociations(java.lang.String fileName) throws com.ibm.commerce.marketing.commands.logging.ImportIntelligentOfferAssociationsException
public void setRequestProperties(TypedProperty reqParms) throws ECException
public java.lang.String getDataLoadFilename() throws ECException
protected void callDataLoadInvoker() throws ECException
protected java.util.Map getDataLoadParameters()
public java.lang.String[] getFileNameList(java.lang.String dirName) throws ECException