Package io.micronaut.rss.jsonfeed
Class JsonFeedItem
java.lang.Object
io.micronaut.rss.jsonfeed.JsonFeedItem
Object in a JSON Feed.
- Since:
- 2.2.0
- Author:
- Sergio del Amo, mark1626
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttachment(JsonFeedAttachment attachment) voidaddAuthor(@NonNull JsonFeedAuthor author) voidstatic JsonFeedItem.Builderbuilder()static JsonFeedItem.Builder@Nullable List<JsonFeedAttachment>Attachments associated with the item.@Nullable List<JsonFeedAuthor>List of authors of the item.@Nullable StringThe URL of an image to use as a banner.@Nullable StringThe html content of the item in the feed.@Nullable StringThe text content of the item in the feed.@Nullable StringSpecifies the last modified date in RFC 3339.@Nullable StringSpecifies the publishing date in RFC 3339.@Nullable StringThe URL of a page elsewhere.@NonNull StringgetId()Unique id for that item for that feed over time.@Nullable StringgetImage()The URL of the main image for the item.@Nullable RssLanguageThe primary language for the item in the format specified in RFC 5646.@Nullable StringPlain text sentence or two describing the item.getTags()Tags associated with the item.@Nullable StringgetTitle()Title of the item in feed.@Nullable StringgetUrl()The URL of the resource described by the item.voidsetAttachments(@Nullable List<JsonFeedAttachment> attachments) Attachments associated with the item.voidsetAuthors(@Nullable List<JsonFeedAuthor> authors) List of authors of the item.voidsetBannerImage(@Nullable String bannerImage) The URL of an image to use as a banner.voidsetContentHtml(@Nullable String contentHtml) The html content of the item in the feed.voidsetContentText(@Nullable String contentText) The text content of the item in the feed.voidsetDateModified(@Nullable String dateModified) Specifies the last modified date in RFC 3339.voidsetDatePublished(@Nullable String datePublished) Specifies the publishing date in RFC 3339.voidsetExternalUrl(@Nullable String externalUrl) The URL of a page elsewhere.voidUnique id for that item for that feed over time.voidThe URL of the main image for the item.voidsetLanguage(@Nullable RssLanguage language) The primary language for the item in the format specified in RFC 5646.voidsetSummary(@Nullable String summary) Plain text sentence or two describing the item.voidTags associated with the item.voidTitle of the item in feed.voidThe URL of the resource described by the item.toMap()
-
Field Details
-
KEY_ID
- See Also:
-
KEY_URL
- See Also:
-
KEY_EXTERNAL_URL
- See Also:
-
KEY_TITLE
- See Also:
-
KEY_CONTENT_HTML
- See Also:
-
KEY_CONTENT_TEXT
- See Also:
-
KEY_SUMMARY
- See Also:
-
KEY_IMAGE
- See Also:
-
KEY_BANNER_IMAGE
- See Also:
-
KEY_DATE_PUBLISHED
- See Also:
-
KEY_DATE_MODIFIED
- See Also:
-
KEY_AUTHORS
- See Also:
-
KEY_TAGS
- See Also:
-
KEY_LANGUAGE
- See Also:
-
KEY_ATTACHMENTS
- See Also:
-
-
Constructor Details
-
JsonFeedItem
public JsonFeedItem()
-
-
Method Details
-
builder
- Returns:
- A Builder to build a
JsonFeedItem.
-
builder
- Parameters:
id- Id of the feed entry- Returns:
- A Builder to build a
JsonFeedItem.
-
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
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
The URL of the resource described by the item. It’s the permalink.- Returns:
- the URL of the resource described by the item
-
setUrl
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
The URL of a page elsewhere. This is especially useful for linkblogs- Returns:
- the URL of a page
-
setExternalUrl
The URL of a page elsewhere. This is especially useful for linkblogs- Parameters:
externalUrl- the URL of a page
-
getTitle
Title of the item in feed.- Returns:
- title of the item in feed
-
setTitle
Title of the item in feed.- Parameters:
title- title of the item in feed
-
getContentHtml
The html content of the item in the feed.- Returns:
- the html content of the item in the feed
-
setContentHtml
The html content of the item in the feed.- Parameters:
contentHtml- the html content of the item in the feed
-
getContentText
The text content of the item in the feed.- Returns:
- the text content of the item in the feed
-
setContentText
The text content of the item in the feed.- Parameters:
contentText- the text content of the item in the feed
-
getSummary
Plain text sentence or two describing the item.- Returns:
- plain text sentence or two describing the item
-
setSummary
Plain text sentence or two describing the item.- Parameters:
summary- plain text sentence or two describing the item
-
getImage
The URL of the main image for the item.- Returns:
- the URL of the main image for the item
-
setImage
The URL of the main image for the item.- Parameters:
image- the URL of the main image for the item
-
getBannerImage
The URL of an image to use as a banner.- Returns:
- the URL of an image to use as a banner
-
setBannerImage
The URL of an image to use as a banner.- Parameters:
bannerImage- the URL of an image to use as a banner
-
getDatePublished
Specifies the publishing date in RFC 3339.- Returns:
- specifies the publishing date in RFC 3339
-
setDatePublished
Specifies the publishing date in RFC 3339.- Parameters:
datePublished- specifies the publishing date in RFC 3339
-
getDateModified
Specifies the last modified date in RFC 3339.- Returns:
- specifies the last modified date in RFC 3339
-
setDateModified
Specifies the last modified date in RFC 3339.- Parameters:
dateModified- specifies the last modified date in RFC 3339
-
getAuthors
List of authors of the item.- Returns:
- list of authors of the item
-
setAuthors
List of authors of the item.- Parameters:
authors- list of authors of the item
-
getTags
Tags associated with the item.- Returns:
- tags associated with the item
-
setTags
Tags associated with the item.- Parameters:
tags- associated tags with the item
-
getLanguage
The primary language for the item in the format specified in RFC 5646.- Returns:
- the primary language for the feed
-
setLanguage
The primary language for the item in the format specified in RFC 5646.- Parameters:
language- the primary language for the feed
-
getAttachments
Attachments associated with the item.- Returns:
- attachments associated with the item
-
setAttachments
Attachments associated with the item.- Parameters:
attachments- attachments associated with the item
-
addAuthor
- Parameters:
author- JSON Feed Item's Author
-
addAttachment
- Parameters:
attachment- JSON Feed Item's Attachment
-
addTag
- Parameters:
tag- JSON Feed Item's tag
-
toMap
- Returns:
- Map representation of object.
-