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

      @NonNull public @NonNull JsonFeed build()
    • version

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

      @NonNull public @NonNull JsonFeed.Builder title(@NonNull @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

      @NonNull public @NonNull JsonFeed.Builder homePageUrl(@NonNull @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

      @NonNull public @NonNull JsonFeed.Builder feedUrl(@NonNull @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

      @NonNull public @NonNull JsonFeed.Builder description(@NonNull @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

      @NonNull public @NonNull JsonFeed.Builder userComment(@NonNull @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

      @NonNull public @NonNull JsonFeed.Builder nextUrl(@NonNull @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

      @NonNull public @NonNull JsonFeed.Builder icon(@NonNull @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

      @NonNull public @NonNull JsonFeed.Builder favicon(@NonNull @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

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

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

      @NonNull public @NonNull JsonFeed.Builder language(@NonNull @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

      @NonNull public @NonNull JsonFeed.Builder language(@NonNull @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

      @NonNull public @NonNull JsonFeed.Builder expired(@NonNull @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

      @NonNull public @NonNull JsonFeed.Builder hub(@NonNull @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

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