com.ibm.commerce.foundation.dataload

Class FeedRetriever

  • java.lang.Object
    • com.ibm.commerce.foundation.dataload.FeedRetriever


  • public class FeedRetriever
    extends java.lang.Object

    This is the main entry point of the web feed integration utility. The web feed integration utility offers a solution to work with web feeds and retrieve new content or updated content from external Content Management Systems.

    This is the class that is instantiated and called from the command line and the scheduler of the web feed integration utility. It can also be invoked from a Java application. It can be called directly from another class by instantiating this class and invoking the method execute .

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String EXIT_CODE
      The name of the parameter, exitCode, which will be in the return map from dataload.
      static java.lang.String SUMMARY_REPORT
      The name of the parameter, summaryReport, which will be in the return map form dataload.
      static int VALIDATION_FAILURE
      Deprecated. 
      it is not used.
    • Constructor Summary

      Constructors 
      Constructor and Description
      FeedRetriever()
      Default Constructor with no arguments.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.Map execute(java.lang.String configFile, java.util.Map parameters)
      This method runs the web feed retriever utility.
      static void main(java.lang.String[] args)
      This is a main entry point to run the web feed retriever through a command line.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • VALIDATION_FAILURE

        public static final int VALIDATION_FAILURE
        Deprecated. it is not used.
        Variable for parameter validation failure error code.
        See Also:
        Constant Field Values
      • EXIT_CODE

        public static final java.lang.String EXIT_CODE
        The name of the parameter, exitCode, which will be in the return map from dataload. Use this parameter to retrieve the exitCode from the map returned by the execute method.
        See Also:
        Constant Field Values
      • SUMMARY_REPORT

        public static final java.lang.String SUMMARY_REPORT
        The name of the parameter, summaryReport, which will be in the return map form dataload. Use this parameter to retrieve the summary Report from the map returned by the execute method.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FeedRetriever

        public FeedRetriever()
        Default Constructor with no arguments.
    • Method Detail

      • execute

        public java.util.Map execute(java.lang.String configFile,
                                     java.util.Map parameters)
                              throws com.ibm.commerce.foundation.dataload.exception.FeedConfigurationException,
                                     DataLoadException
        This method runs the web feed retriever utility. It reads the configuration file and invokes the data load utility. See the infocenter documentation for details on how to define the configuration file and also for an overview of the data load utility.
        Parameters:
        configFile - - the feed retriever configuration file.
        parameters - - optional parameters to be passed to data load utility. This is a Map of name-value pairs, where name is the name of the parameter and value is the value of the parameter.
        Returns:
        Map - A map which contains the exit code from the data load and the summary report from the data load. The constants defined in this class, namely, EXIT_CODE and SUMMARY_REPORT can be used to as names to retrieve corresponding values from the Map.
        Throws:
        com.ibm.commerce.foundation.dataload.exception.FeedConfigurationException
        DataLoadException
      • main

        public static void main(java.lang.String[] args)

        This is a main entry point to run the web feed retriever through a command line.

        Usage: com.ibm.commerce.foundation.dataload.FeedRetriever /full_path/CMS-Feed-config.xml [-Dname=value]* Parameter /full_path/CMS-Feed-config.xml is mandatory, parameters [-Dname=value]* are optional. Example: com.ibm.commerce.foundation.dataload.FeedRetriever ../bin/sample/CMS-Feed-config.xml -DXmlValidation=false

        Parameters:
        args -

        The parameters passed into the program from the command line. The args can contain the following parameters:

        • CMS-Feed-config.xml
        • -DXmlValidation=
        • -DGenerateDataLoadConfigOnly=
        • -DConsoleHandler.level=
        • -DFileHandler.level=
        • -D.level=
        • any other variable names defined in the dataload configuration files
        where =

        The parameter CMS-Feed-config.xml is the only mandatory parameter in toolkit environment. All other parameters are optional.