Class FeedPluginApi

    • Method Detail

      • getFeeds

        public com.sun.syndication.feed.synd.SyndFeed getFeeds​(String sfeeds,
                                                               boolean force)
                                                        throws IOException
        Throws:
        IOException
      • getFeeds

        public com.sun.syndication.feed.synd.SyndFeed getFeeds​(String sfeeds,
                                                               boolean ignoreInvalidFeeds,
                                                               boolean force)
                                                        throws IOException
        Throws:
        IOException
      • getFeed

        public com.sun.syndication.feed.synd.SyndFeed getFeed​(String sfeed,
                                                              boolean ignoreInvalidFeeds,
                                                              boolean force)
                                                       throws IOException
        Throws:
        IOException
      • updateFeed

        public int updateFeed​(String feedname,
                              String feedurl)
      • updateFeed

        public int updateFeed​(String feedname,
                              String feedurl,
                              boolean fullContent)
      • updateFeed

        public int updateFeed​(String feedname,
                              String feedurl,
                              boolean fullContent,
                              boolean oneDocPerEntry)
      • updateFeed

        public int updateFeed​(String feedname,
                              String feedurl,
                              boolean fullContent,
                              boolean oneDocPerEntry,
                              boolean force)
      • updateFeed

        public int updateFeed​(String feedname,
                              String feedurl,
                              boolean fullContent,
                              boolean oneDocPerEntry,
                              boolean force,
                              String space)
      • startUpdateFeedsInSpace

        public boolean startUpdateFeedsInSpace​(String space,
                                               boolean fullContent,
                                               int scheduleTimer)
                                        throws XWikiException
        Throws:
        XWikiException
      • getSyndEntrySource

        public SyndEntrySourceApi getSyndEntrySource​(String className,
                                                     Map<String,​Object> params)
        Tries to instantiate a class implementing the SyndEntrySource interface using the given parameters
        Parameters:
        className - the name of a class implementing SyndEntrySource interface
        params - constructor parameters
        Returns:
        a new SyndEntrySource instance
      • getSyndEntryArticleSource

        public SyndEntrySourceApi getSyndEntryArticleSource()
        Instantiates the default strategy for converting articles in feed entries.
        Returns:
        a new SyndEntrySourceApi
      • getSyndEntryArticleSource

        public SyndEntrySourceApi getSyndEntryArticleSource​(Map<String,​Object> params)
        Instantiates the default strategy for converting articles in feed entries, allowing you to customize it through parameters.
        Returns:
        a new SyndEntrySourceApi
      • getFeedEntry

        public com.sun.syndication.feed.synd.SyndEntry getFeedEntry()
        Creates an empty feed entry
        Returns:
        a new feed entry
      • getFeedImage

        public com.sun.syndication.feed.synd.SyndImage getFeedImage()
        Creates an empty feed image
        Returns:
        a new feed image
      • getFeedImage

        public com.sun.syndication.feed.synd.SyndImage getFeedImage​(String url,
                                                                    String link,
                                                                    String title,
                                                                    String description)
        Creates a new feed image having the given properties.
        Parameters:
        url - image URL
        title - image title
        description - image description
        Returns:
        a new feed image
      • getDefaultFeedImage

        public com.sun.syndication.feed.synd.SyndImage getDefaultFeedImage()
        Creates a new instance of the default feed image. The default image file name is taken from the logo skin preference. If this preference is missing, logo.png is used instead.
        Returns:
        a new feed image
      • getFeed

        public com.sun.syndication.feed.synd.SyndFeed getFeed()
        Creates an empty feed
        Returns:
        a new feed
      • getFeed

        public com.sun.syndication.feed.synd.SyndFeed getFeed​(List<Object> list,
                                                              SyndEntrySourceApi sourceApi,
                                                              Map<String,​Object> sourceParams)
        Computes a new feed from a list of source items and a corresponding strategy for converting them in feed entries
        Parameters:
        list - the list of source items
        sourceApi - the strategy to use for computing feed entries from source items
        sourceParams - strategy parameters
        Returns:
        a new feed
      • getArticleFeed

        public com.sun.syndication.feed.synd.SyndFeed getArticleFeed​(List<Object> list)
        Creates a new feed from a list of articles, using the default strategy for converting articles in feed entries. By articles we mean any document containing an XWiki.ArticleClass object.
        Parameters:
        list - a list of articles
        Returns:
        a new feed
        See Also:
        Document, getFeed(List, SyndEntrySourceApi, Map), SyndEntrySourceApi
      • getBlogFeed

        public com.sun.syndication.feed.synd.SyndFeed getBlogFeed​(List<Object> list)
        Instantiates the default article feed.
        Parameters:
        list - a list of articles (as document instances or document names)
        Returns:
        a new feed
        See Also:
        getArticleFeed(List)
      • getFeed

        public com.sun.syndication.feed.synd.SyndFeed getFeed​(String query,
                                                              int count,
                                                              int start,
                                                              SyndEntrySourceApi sourceApi,
                                                              Map<String,​Object> sourceParams)
        Creates a new feed from the result of an HQL query and a corresponding strategy for converting the retrieved documents in feed entries.
        Parameters:
        query - the HQL query used for retrieving the documents
        count - the maximum number of documents to retrieve
        start - the start index
        sourceApi - the strategy to use for computing feed entries from source items
        sourceParams - strategy parameters
        Returns:
        a new feed
      • getDocumentFeed

        public com.sun.syndication.feed.synd.SyndFeed getDocumentFeed​(String query,
                                                                      int count,
                                                                      int start,
                                                                      Map<String,​Object> params)
        Creates a new feed from the result of an HQL query, using the default strategy for converting documents in feed entries. You can customize this strategy using strategy parameters.
        Parameters:
        query - the HQL query used for retrieving the documents
        count - the maximum number of documents to retrieve
        start - the start index
        params - strategy parameters
        Returns:
        a new feed
        See Also:
        Document, getFeed(String, int, int, SyndEntrySourceApi, Map), SyndEntryDocumentSource
      • getArticleFeed

        public com.sun.syndication.feed.synd.SyndFeed getArticleFeed​(String query,
                                                                     int count,
                                                                     int start)
        Creates a new feed from the result of an HQL query, using the default strategy for converting articles in feed entries. By articles we mean any document containing a XWiki.ArticleClass object.
        Parameters:
        query - the HQL query used for retrieving the articles
        count - the maximum number of articles to retrieve
        start - the start index
        Returns:
        a new feed
        See Also:
        Document, getFeed(String, int, int, SyndEntrySourceApi, Map), SyndEntrySourceApi
      • getWebFeed

        public com.sun.syndication.feed.synd.SyndFeed getWebFeed​(String query,
                                                                 int count,
                                                                 int start)
        Instantiates the default document feed.
        Parameters:
        query - the HQL query used for retrieving the documents
        count - the maximum number of documents to retrieve
        start - the start index
        Returns:
        a new feed
        See Also:
        getDocumentFeed(String, int, int, Map)
      • getBlogFeed

        public com.sun.syndication.feed.synd.SyndFeed getBlogFeed​(String query,
                                                                  int count,
                                                                  int start)
        Instantiates the default article feed.
        Parameters:
        query - the HQL query used for retrieving the articles
        count - the maximum number of articles to retrieve
        start - the start index
        Returns:
        a new feed
        See Also:
        getArticleFeed(String, int, int)
      • getFeed

        public com.sun.syndication.feed.synd.SyndFeed getFeed​(List<Object> list,
                                                              SyndEntrySourceApi sourceApi,
                                                              Map<String,​Object> sourceParams,
                                                              Map<String,​Object> metadata)
        Computes a new feed from a list of source items and a corresponding strategy for converting them in feed entries, filling in the feed meta data.
        Parameters:
        list - the list of source items
        sourceApi - the strategy to use for computing feed entries from source items
        sourceParams - strategy parameters
        metadata - feed meta data (includes the author, description, copyright, encoding, url, title)
        Returns:
        a new feed
      • getDocumentFeed

        public com.sun.syndication.feed.synd.SyndFeed getDocumentFeed​(List<Object> list,
                                                                      Map<String,​Object> params,
                                                                      Map<String,​Object> metadata)
        Creates a new feed from a list of documents, using the default strategy for converting documents in feed entries, filling in the feed meta data. You can customize the default strategy by using strategy parameters.
        Parameters:
        list - a list of Document objects, XWikiDocument objects or document names
        params - strategy parameters
        metadata - feed meta data (includes the author, description, copyright, encoding, url, title)
        Returns:
        a new feed
        See Also:
        Document, getFeed(List, SyndEntrySourceApi, Map, Map), SyndEntryDocumentSource
      • getArticleFeed

        public com.sun.syndication.feed.synd.SyndFeed getArticleFeed​(List<Object> list,
                                                                     Map<String,​Object> metadata)
        Creates a new feed from a list of articles, using the default strategy for converting articles in feed entries, filling in the feed meta data. By articles we mean any document containing an XWiki.ArticleClass object.
        Parameters:
        list - a list of articles
        metadata - feed meta data (includes the author, description, copyright, encoding, url, title)
        Returns:
        a new feed
        See Also:
        Document, getFeed(List, SyndEntrySourceApi, Map, Map), SyndEntrySourceApi
      • getWebFeed

        public com.sun.syndication.feed.synd.SyndFeed getWebFeed​(List<Object> list,
                                                                 Map<String,​Object> metadata)
        Instantiates the default document feed.
        Parameters:
        list - a list of Document objects, XWikiDocument objects or document names
        metadata - feed meta data (includes the author, description, copyright, encoding, url, title)
        Returns:
        a new feed
        See Also:
        getDocumentFeed(List, Map)
      • getBlogFeed

        public com.sun.syndication.feed.synd.SyndFeed getBlogFeed​(List<Object> list,
                                                                  Map<String,​Object> metadata)
        Instantiates the default article feed.
        Parameters:
        list - a list of articles (as document instances or document names)
        metadata - feed meta data (includes the author, description, copyright, encoding, url, title)
        Returns:
        a new feed
        See Also:
        getArticleFeed(List, Map)
      • getFeed

        public com.sun.syndication.feed.synd.SyndFeed getFeed​(String query,
                                                              int count,
                                                              int start,
                                                              SyndEntrySourceApi sourceApi,
                                                              Map<String,​Object> sourceParams,
                                                              Map<String,​Object> metadata)
        Creates a new feed from the result of an HQL query and a corresponding strategy for converting the retrieved documents in feed entries, filling in the feed meta data.
        Parameters:
        query - the HQL query used for retrieving the documents
        count - the maximum number of documents to retrieve
        start - the start index
        sourceApi - the strategy to use for computing feed entries from source items
        sourceParams - strategy parameters
        metadata - feed meta data (includes the author, description, copyright, encoding, url, title)
        Returns:
        a new feed
      • getDocumentFeed

        public com.sun.syndication.feed.synd.SyndFeed getDocumentFeed​(String query,
                                                                      int count,
                                                                      int start,
                                                                      Map<String,​Object> params,
                                                                      Map<String,​Object> metadata)
        Creates a new feed from the result of an HQL query, using the default strategy for converting documents in feed entries, filling in the feed meta data. You can customize the default strategy by using strategy parameters.
        Parameters:
        query - the HQL query used for retrieving the documents
        count - the maximum number of documents to retrieve
        start - the start index
        params - strategy parameters
        metadata - feed meta data (includes the author, description, copyright, encoding, url, title)
        Returns:
        a new feed
        See Also:
        Document, getFeed(String, int, int, SyndEntrySourceApi, Map, Map), SyndEntryDocumentSource
      • getArticleFeed

        public com.sun.syndication.feed.synd.SyndFeed getArticleFeed​(String query,
                                                                     int count,
                                                                     int start,
                                                                     Map<String,​Object> metadata)
        Creates a new feed from the result of an HQL query, using the default strategy for converting articles in feed entries, filling in the feed meta data. By articles we mean any document containing a XWiki.ArticleClass object.
        Parameters:
        query - the HQL query used for retrieving the articles
        count - the maximum number of articles to retrieve
        start - the start index
        metadata - feed meta data (includes the author, description, copyright, encoding, url, title)
        Returns:
        a new feed
        See Also:
        Document, getFeed(String, int, int, SyndEntrySourceApi, Map, Map), SyndEntrySourceApi
      • getWebFeed

        public com.sun.syndication.feed.synd.SyndFeed getWebFeed​(String query,
                                                                 int count,
                                                                 int start,
                                                                 Map<String,​Object> metadata)
        Instantiates the default document feed.
        Parameters:
        query - the HQL query used for retrieving the documents
        count - the maximum number of documents to retrieve
        start - the start index
        metadata - feed meta data (includes the author, description, copyright, encoding, url, title)
        Returns:
        a new feed
        See Also:
        getDocumentFeed(String, int, int, Map)
      • getBlogFeed

        public com.sun.syndication.feed.synd.SyndFeed getBlogFeed​(String query,
                                                                  int count,
                                                                  int start,
                                                                  Map<String,​Object> metadata)
        Instantiates the default article feed.
        Parameters:
        query - the HQL query used for retrieving the articles
        count - the maximum number of articles to retrieve
        start - the start index
        metadata - feed meta data (includes the author, description, copyright, encoding, url, title)
        Returns:
        a new feed
        See Also:
        getArticleFeed(String, int, int, Map)
      • getBlogFeed

        public com.sun.syndication.feed.synd.SyndFeed getBlogFeed​(String query,
                                                                  int count,
                                                                  int start,
                                                                  String blogPostClassName,
                                                                  Map<String,​Object> metadata)
        Instantiates the default article feed.
        Parameters:
        query - the HQL query used for retrieving the articles
        count - the maximum number of articles to retrieve
        start - the start index
        blogPostClassName - The name of the Blog Class the data are retrieved from. If null the Default Blog Application is used.
        metadata - feed meta data (includes the author, description, copyright, encoding, url, title)
        Returns:
        a new feed
        See Also:
        getArticleFeed(String, int, int, Map)
      • getFeedOutput

        public String getFeedOutput​(com.sun.syndication.feed.synd.SyndFeed feed,
                                    String type)
        Converts a feed into its string representation using the specified syntax
        Parameters:
        feed - any type of feed, implementing the SyndFeed interface
        type - the feed type (syntax) to use, null if none. It can be any version of RSS or Atom. Some possible values are "rss_1.0", "rss_2.0" and "atom_1.0"
        Returns:
        the string representation of the given feed using the syntax associated with the specified feed type