Class JsonFeedItem

java.lang.Object
io.micronaut.rss.jsonfeed.JsonFeedItem

@Introspected public class JsonFeedItem extends Object
Object in a JSON Feed.
Since:
2.2.0
Author:
Sergio del Amo, mark1626
See Also:
  • Field Details

  • Constructor Details

    • JsonFeedItem

      public JsonFeedItem()
  • Method Details

    • builder

      public static JsonFeedItem.Builder builder()
      Returns:
      A Builder to build a JsonFeedItem.
    • builder

      public static JsonFeedItem.Builder builder(String id)
      Parameters:
      id - Id of the feed entry
      Returns:
      A Builder to build a JsonFeedItem.
    • getId

      @NonNull public @NonNull String getId()
      Unique id for that item for that feed over time. If an item is ever updated, the id should be unchanged
      Returns:
      unique id of the item
    • setId

      public void setId(@NonNull @NonNull String id)
      Unique id for that item for that feed over time. If an item is ever updated, the id should be unchanged
      Parameters:
      id - unique id of the item
    • getUrl

      @Nullable public @Nullable String getUrl()
      The URL of the resource described by the item. It’s the permalink.
      Returns:
      the URL of the resource described by the item
    • setUrl

      public void setUrl(@Nullable @Nullable String url)
      The URL of the resource described by the item. It’s the permalink.
      Parameters:
      url - the URL of the resource described by the item
    • getExternalUrl

      @Nullable public @Nullable String getExternalUrl()
      The URL of a page elsewhere. This is especially useful for linkblogs
      Returns:
      the URL of a page
    • setExternalUrl

      public void setExternalUrl(@Nullable @Nullable String externalUrl)
      The URL of a page elsewhere. This is especially useful for linkblogs
      Parameters:
      externalUrl - the URL of a page
    • getTitle

      @Nullable public @Nullable String getTitle()
      Title of the item in feed.
      Returns:
      title of the item in feed
    • setTitle

      public void setTitle(@Nullable @Nullable String title)
      Title of the item in feed.
      Parameters:
      title - title of the item in feed
    • getContentHtml

      @Nullable public @Nullable String getContentHtml()
      The html content of the item in the feed.
      Returns:
      the html content of the item in the feed
    • setContentHtml

      public void setContentHtml(@Nullable @Nullable String contentHtml)
      The html content of the item in the feed.
      Parameters:
      contentHtml - the html content of the item in the feed
    • getContentText

      @Nullable public @Nullable String getContentText()
      The text content of the item in the feed.
      Returns:
      the text content of the item in the feed
    • setContentText

      public void setContentText(@Nullable @Nullable String contentText)
      The text content of the item in the feed.
      Parameters:
      contentText - the text content of the item in the feed
    • getSummary

      @Nullable public @Nullable String getSummary()
      Plain text sentence or two describing the item.
      Returns:
      plain text sentence or two describing the item
    • setSummary

      public void setSummary(@Nullable @Nullable String summary)
      Plain text sentence or two describing the item.
      Parameters:
      summary - plain text sentence or two describing the item
    • getImage

      @Nullable public @Nullable String getImage()
      The URL of the main image for the item.
      Returns:
      the URL of the main image for the item
    • setImage

      public void setImage(@Nullable @Nullable String image)
      The URL of the main image for the item.
      Parameters:
      image - the URL of the main image for the item
    • getBannerImage

      @Nullable public @Nullable String getBannerImage()
      The URL of an image to use as a banner.
      Returns:
      the URL of an image to use as a banner
    • setBannerImage

      public void setBannerImage(@Nullable @Nullable String bannerImage)
      The URL of an image to use as a banner.
      Parameters:
      bannerImage - the URL of an image to use as a banner
    • getDatePublished

      @Nullable public @Nullable String getDatePublished()
      Specifies the publishing date in RFC 3339.
      Returns:
      specifies the publishing date in RFC 3339
    • setDatePublished

      public void setDatePublished(@Nullable @Nullable String datePublished)
      Specifies the publishing date in RFC 3339.
      Parameters:
      datePublished - specifies the publishing date in RFC 3339
    • getDateModified

      @Nullable public @Nullable String getDateModified()
      Specifies the last modified date in RFC 3339.
      Returns:
      specifies the last modified date in RFC 3339
    • setDateModified

      public void setDateModified(@Nullable @Nullable String dateModified)
      Specifies the last modified date in RFC 3339.
      Parameters:
      dateModified - specifies the last modified date in RFC 3339
    • getAuthors

      @Nullable public @Nullable List<JsonFeedAuthor> getAuthors()
      List of authors of the item.
      Returns:
      list of authors of the item
    • setAuthors

      public void setAuthors(@Nullable @Nullable List<JsonFeedAuthor> authors)
      List of authors of the item.
      Parameters:
      authors - list of authors of the item
    • getTags

      @Nullable public @Nullable List<String> getTags()
      Tags associated with the item.
      Returns:
      tags associated with the item
    • setTags

      public void setTags(@Nullable @Nullable List<String> tags)
      Tags associated with the item.
      Parameters:
      tags - associated tags with the item
    • getLanguage

      @Nullable public @Nullable RssLanguage getLanguage()
      The primary language for the item in the format specified in RFC 5646.
      Returns:
      the primary language for the feed
    • setLanguage

      public void setLanguage(@Nullable @Nullable RssLanguage language)
      The primary language for the item in the format specified in RFC 5646.
      Parameters:
      language - the primary language for the feed
    • getAttachments

      @Nullable public @Nullable List<JsonFeedAttachment> getAttachments()
      Attachments associated with the item.
      Returns:
      attachments associated with the item
    • setAttachments

      public void setAttachments(@Nullable @Nullable List<JsonFeedAttachment> attachments)
      Attachments associated with the item.
      Parameters:
      attachments - attachments associated with the item
    • addAuthor

      public void addAuthor(@NonNull @NonNull JsonFeedAuthor author)
      Parameters:
      author - JSON Feed Item's Author
    • addAttachment

      public void addAttachment(JsonFeedAttachment attachment)
      Parameters:
      attachment - JSON Feed Item's Attachment
    • addTag

      public void addTag(@NonNull @NonNull String tag)
      Parameters:
      tag - JSON Feed Item's tag
    • toMap

      @NonNull public @NonNull Map<String,Object> toMap()
      Returns:
      Map representation of object.