com.ibm.commerce.foundation.dataload.feedreader

Interface FeedReader



  • public interface FeedReader

    This class defines a common interface for feed readers. If you want to implement a custom feed reader, your feed reader must implement this class. Also, the name of the custom reader must be specified in the feed configuration file. For example, UserGuides ... com.ibm.commerce.foundation.dataload.feedreader.Atom_1_0_Reader

    The interface provides method to return the feed entries in form of a list, given the end point name. For each entry, individual attributes can also be fetched using the getter methods provided.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM Copyright notice field.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.lang.String getCategory(java.lang.Object entry)
      Returns the category attribute of the feed entry
      java.lang.String getContentLanguage(java.lang.Object entry)
      Returns the content language attribute of the feed entry
      java.lang.String getContentSource(java.lang.Object entry)
      Returns the content source attribute of the feed entry
      java.lang.String getContentType(java.lang.Object entry)
      Returns the content type attribute of the feed entry
      java.lang.String getContentValue(java.lang.Object entry)
      Returns the content value attribute of the feed entry
      java.util.Map getEntries(java.lang.String endPointName)
      For a given endPointName, this function retrieves a Map of FeedID (String) to the corresponding list of entries present in the feed.
      java.lang.String getIdentifier(java.lang.Object entry)
      Returns the identifier attribute of the feed entry
      java.lang.String getLongDescription(java.lang.Object entry)
      Returns the long description attribute of the feed entry
      java.lang.String getName(java.lang.Object entry)
      Returns the name attribute of the a feed entry
      java.lang.String getShortDescription(java.lang.Object entry)
      Returns the short description attribute of the feed entry
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
    • Method Detail

      • getEntries

        java.util.Map getEntries(java.lang.String endPointName)
                          throws DataLoadApplicationException
        For a given endPointName, this function retrieves a Map of FeedID (String) to the corresponding list of entries present in the feed.
        Parameters:
        endPointName - The name of the feed end point as specified in the feed configuration file. Using the feed end point name, the information specified in the configuration file, like, feed URL and connection properties will be retrieved by the utility.
        Returns:
        Returns a Map of the feed identifier(key) and a List of feed entries(List of items for an RSS feed and List of entries for an ATOM feed) For ATOM feeds it returns a Map[String,List] and for RSS feeds it returns Map[String,List]
        Throws:
        DataLoadApplicationException
      • getIdentifier

        java.lang.String getIdentifier(java.lang.Object entry)
                                throws DataLoadApplicationException
        Returns the identifier attribute of the feed entry
        Parameters:
        entry - The feed entry object that needs to be parsed.
        Returns:
        a String containing identifier
        Throws:
        DataLoadApplicationException
      • getName

        java.lang.String getName(java.lang.Object entry)
                          throws DataLoadApplicationException
        Returns the name attribute of the a feed entry
        Parameters:
        entry - The feed entry object that needs to be parsed.
        Returns:
        a String containing name
        Throws:
        DataLoadApplicationException
      • getShortDescription

        java.lang.String getShortDescription(java.lang.Object entry)
                                      throws DataLoadApplicationException
        Returns the short description attribute of the feed entry
        Parameters:
        entry - The feed entry object that needs to be parsed.
        Returns:
        a String containing short description
        Throws:
        DataLoadApplicationException
      • getLongDescription

        java.lang.String getLongDescription(java.lang.Object entry)
                                     throws DataLoadApplicationException
        Returns the long description attribute of the feed entry
        Parameters:
        entry - The feed entry object that needs to be parsed.
        Returns:
        a String containing long description
        Throws:
        DataLoadApplicationException
      • getContentSource

        java.lang.String getContentSource(java.lang.Object entry)
                                   throws DataLoadApplicationException
        Returns the content source attribute of the feed entry
        Parameters:
        entry - The feed entry object that needs to be parsed.
        Returns:
        a String containing content source
        Throws:
        DataLoadApplicationException
      • getContentType

        java.lang.String getContentType(java.lang.Object entry)
                                 throws DataLoadApplicationException
        Returns the content type attribute of the feed entry
        Parameters:
        entry - The feed entry object that needs to be parsed.
        Returns:
        a String containing content type
        Throws:
        DataLoadApplicationException
      • getContentValue

        java.lang.String getContentValue(java.lang.Object entry)
                                  throws DataLoadApplicationException
        Returns the content value attribute of the feed entry
        Parameters:
        entry - The feed entry object that needs to be parsed.
        Returns:
        a String containing content value
        Throws:
        DataLoadApplicationException
      • getContentLanguage

        java.lang.String getContentLanguage(java.lang.Object entry)
                                     throws DataLoadApplicationException
        Returns the content language attribute of the feed entry
        Parameters:
        entry - The feed entry object that needs to be parsed.
        Returns:
        a String containing content language
        Throws:
        DataLoadApplicationException
      • getCategory

        java.lang.String getCategory(java.lang.Object entry)
                              throws DataLoadApplicationException
        Returns the category attribute of the feed entry
        Parameters:
        entry - The feed entry object that needs to be parsed.
        Returns:
        a String containing the category value
        Throws:
        DataLoadApplicationException