Class FeedGenerator

java.lang.Object
org.apache.maven.plugins.changes.FeedGenerator

public class FeedGenerator extends Object
Author:
ltheussl
  • Constructor Details

    • FeedGenerator

      public FeedGenerator(Locale locale)
      Initialize feedGenerator for a given locale.
      Parameters:
      locale - a locale for i18n
  • Method Details

    • getAuthor

      public String getAuthor()
      The author of the feed.
      Returns:
      the author
    • setAuthor

      public void setAuthor(String author)
      Set the author of the feed.
      Parameters:
      author - not null
    • getTitle

      public String getTitle()
      The title of the feed.
      Returns:
      the title
    • setTitle

      public void setTitle(String title)
      Set the title of the feed.
      Parameters:
      title - not null
    • getDateFormat

      public DateFormat getDateFormat()
      The DateFormat.
      Returns:
      may be null
    • setDateFormat

      public void setDateFormat(DateFormat dateFormat)
      Set the date format. This should match the date format used for the release dates in changes.xml.
      Parameters:
      dateFormat - may be null
    • getLink

      public String getLink()
      The main link of the feed.
      Returns:
      the link
    • setLink

      public void setLink(String link)
      Set the main link of the feed.
      Parameters:
      link - not null
    • isSupportedFeedType

      public boolean isSupportedFeedType(String type)
      Determine if a given feed type is supported. The currently supported values are: "rss_0.9", "rss_0.91N" (RSS 0.91 Netscape), "rss_0.91U" (RSS 0.91 Userland), "rss_0.92", "rss_0.93", "rss_0.94", "rss_1.0", "rss_2.0", "atom_0.3", "atom_1.0".
      Parameters:
      type - the feed type to check. May be null.
      Returns:
      true if if the given type is supported by the rome library, false otherwise.
    • getSupportedFeedTypes

      public List<String> getSupportedFeedTypes()
      A List of supported feed types.
      Returns:
      a List of supported feed types
      See Also:
    • export

      public void export(List<Release> releases, String feedType, Writer writer) throws IOException
      Extract a feed and export it to a Writer.
      Parameters:
      releases - the List of Releases. Only the last release is used in the feed.
      feedType - The type of the feed to generate. See isSupportedFeedType(java.lang.String) for supported values.
      writer - a Writer. Note that this is not flushed nor closed upon exit.
      Throws:
      IOException - if an error occurs during export