Class RssGenerator

    • Method Detail

      • of

        public static RssGenerator of​(String baseUrl,
                                      boolean root,
                                      String webTitle,
                                      String webDescription)
        Helper method to create an instance of SitemapGenerator
        Parameters:
        baseUrl - Base URL
        root - If Base URL is root (for example http://www.javavids.com or if it's some path like http://www.javalibs.com/blog)
        webTitle - Web title
        webDescription - Web description
        Returns:
        Instance of RssGenerator
      • of

        public static RssGenerator of​(String baseUrl,
                                      boolean root)
        Helper method to create an instance of SitemapGenerator
        Parameters:
        baseUrl - Base URL
        root - If Base URL is root (for example http://www.javavids.com or if it's some path like http://www.javalibs.com/blog)
        Returns:
        Instance of RssGenerator
      • of

        public static RssGenerator of​(String baseUrl,
                                      String webTitle,
                                      String webDescription)
        Helper method to create an instance of SitemapGenerator
        Parameters:
        baseUrl - Base URL
        webTitle - Web title
        webDescription - Web description
        Returns:
        Instance of RssGenerator
      • of

        public static RssGenerator of​(String baseUrl)
        Helper method to create an instance of SitemapGenerator
        Parameters:
        baseUrl - Base URL
        Returns:
        Instance of RssGenerator
      • webTitle

        public RssGenerator webTitle​(String webTitle)
        Set Web title
        Parameters:
        webTitle - Web title
        Returns:
        this
      • webDescription

        public RssGenerator webDescription​(String webDescription)
        Set Web description
        Parameters:
        webDescription - Web description
        Returns:
        this
      • toString

        public String toString()
        This will construct RSS from web pages. Web pages are sorted using lastMod in descending order (latest is first)
        Overrides:
        toString in class Object
        Returns:
        Constructed RSS
      • defaultDir

        public RssGenerator defaultDir​(String dirName)
        Sets default prefix dir to name for all subsequent WebPages. Final name will be "dirName/name"
        Parameters:
        dirName - Dir name
        Returns:
        this
      • defaultDir

        public RssGenerator defaultDir​(String... dirNames)
        Sets default prefix dirs to name for all subsequent WebPages. For dirs: ["a", "b", "c"], the final name will be "a/b/c/name"
        Parameters:
        dirNames - Dir names
        Returns:
        this
      • resetDefaultDir

        public RssGenerator resetDefaultDir()
        Reset default dir value
        Returns:
        this
      • defaultExtension

        public RssGenerator defaultExtension​(String extension)
        Sets default suffix extension for all subsequent WebPages. Final name will be "name.extension"
        Parameters:
        extension - Extension
        Returns:
        this
      • resetDefaultExtension

        public RssGenerator resetDefaultExtension()
        Reset default extension value
        Returns:
        this