Class JsonFeed.Builder

java.lang.Object
io.micronaut.rss.jsonfeed.JsonFeed.Builder
Enclosing class:
JsonFeed

public static final class JsonFeed.Builder extends Object
JSON Feed Builder.
  • Method Details

    • build

      public @NonNull JsonFeed build()
    • version

      public @NonNull JsonFeed.Builder version(@NonNull String version)
    • title

      public @NonNull JsonFeed.Builder title(@NonNull String title)
      The name of the feed, which will often correspond to the name of the website.
      Parameters:
      title - the name of the feed
      Returns:
      Builder
    • homePageUrl

      public @NonNull JsonFeed.Builder homePageUrl(@NonNull String homePageUrl)
      The URL of the resource that the feed describes. This resource may or may not actually be a “home” page, but it should be an HTML page
      Parameters:
      homePageUrl - The URL of the resource that the feed describes
      Returns:
      Builder
    • feedUrl

      public @NonNull JsonFeed.Builder feedUrl(@NonNull String feedUrl)
      The URL of the feed, and serves as the unique identifier for the feed.
      Parameters:
      feedUrl - the URL of the feed, and serves as the unique identifier for the feed
      Returns:
      Builder
    • description

      public @NonNull JsonFeed.Builder description(@NonNull String description)
      Detail on what the feed is about. A feed reader may display this text.
      Parameters:
      description - detail on what the feed is about
      Returns:
      Builder
    • userComment

      public @NonNull JsonFeed.Builder userComment(@NonNull String userComment)
      Description of the purpose of the feed. This is for the use of people looking at the raw JSON, and should be ignored by feed readers
      Parameters:
      userComment - description of the purpose of the feed.
      Returns:
      Builder
    • nextUrl

      public @NonNull JsonFeed.Builder nextUrl(@NonNull String nextURL)
      The URL of a feed that provides the next n items, where n is determined by the publisher. This allows for pagination, but with the expectation that reader software is not required to use it and probably won’t use it very often
      Parameters:
      nextURL - the URL of a feed that provides the next n items
      Returns:
      Builder
    • icon

      public @NonNull JsonFeed.Builder icon(@NonNull String icon)
      The URL of an image for the feed suitable to be used in a timeline, much the way an avatar might be used. It should be square and relatively large — such as 512 x 512 pixels
      Parameters:
      icon - the URL of an image for the feed suitable to be used in a timeline
      Returns:
      Builder
    • favicon

      public @NonNull JsonFeed.Builder favicon(@NonNull String favicon)
      The URL of an image for the feed suitable to be used in a source list. It should be square and relatively small, but not smaller than 64 x 64 pixels
      Parameters:
      favicon - the URL of an image for the feed suitable to be used in a source list
      Returns:
      Builder
    • item

      public @NonNull JsonFeed.Builder item(@NonNull JsonFeedItem item)
      Content of the feed.
      Parameters:
      item - content of the feed
      Returns:
      Builder
    • author

      public @NonNull JsonFeed.Builder author(@NonNull JsonFeedAuthor author)
      Adds an author to the feed.
      Parameters:
      author - An author of the feed
      Returns:
      Builder
    • language

      public @NonNull JsonFeed.Builder language(@NonNull RssLanguage language)
      The primary language for the feed in the format specified in RFC 5646.
      Parameters:
      language - the primary language for the feed
      Returns:
      Builder
    • language

      public @NonNull JsonFeed.Builder language(@NonNull String language)
      The primary language for the feed in the format specified in RFC 5646.
      Parameters:
      language - the primary language for the feed
      Returns:
      Builder
    • expired

      public @NonNull JsonFeed.Builder expired(@NonNull Boolean expired)
      Says whether or not the feed is finished — that is, whether or not it will ever update again.
      Parameters:
      expired - says whether or not the feed is finished
      Returns:
      Builder
    • hub

      public @NonNull JsonFeed.Builder hub(@NonNull JsonHub hub)
      Describes endpoints that can be used to subscribe to real-time notifications from the publisher of this feed.
      Parameters:
      hub - Describes endpoints that can be used to subscribe to real-time notifications
      Returns:
      Builder
    • items

      public @NonNull JsonFeed.Builder items(@NonNull List<JsonFeedItem> items)
      Parameters:
      items - Feed items
      Returns:
      The Builder.