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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttachment
(JsonFeedAttachment attachment) void
addAuthor
(@NonNull JsonFeedAuthor author) void
static JsonFeedItem.Builder
builder()
static JsonFeedItem.Builder
@Nullable List<JsonFeedAttachment>
Attachments associated with the item.@Nullable List<JsonFeedAuthor>
List of authors of the item.@Nullable String
The URL of an image to use as a banner.@Nullable String
The html content of the item in the feed.@Nullable String
The text content of the item in the feed.@Nullable String
Specifies the last modified date in RFC 3339.@Nullable String
Specifies the publishing date in RFC 3339.@Nullable String
The URL of a page elsewhere.@NonNull String
getId()
Unique id for that item for that feed over time.@Nullable String
getImage()
The URL of the main image for the item.@Nullable RssLanguage
The primary language for the item in the format specified in RFC 5646.@Nullable String
Plain text sentence or two describing the item.getTags()
Tags associated with the item.@Nullable String
getTitle()
Title of the item in feed.@Nullable String
getUrl()
The URL of the resource described by the item.void
setAttachments
(@Nullable List<JsonFeedAttachment> attachments) Attachments associated with the item.void
setAuthors
(@Nullable List<JsonFeedAuthor> authors) List of authors of the item.void
setBannerImage
(@Nullable String bannerImage) The URL of an image to use as a banner.void
setContentHtml
(@Nullable String contentHtml) The html content of the item in the feed.void
setContentText
(@Nullable String contentText) The text content of the item in the feed.void
setDateModified
(@Nullable String dateModified) Specifies the last modified date in RFC 3339.void
setDatePublished
(@Nullable String datePublished) Specifies the publishing date in RFC 3339.void
setExternalUrl
(@Nullable String externalUrl) The URL of a page elsewhere.void
Unique id for that item for that feed over time.void
The URL of the main image for the item.void
setLanguage
(@Nullable RssLanguage language) The primary language for the item in the format specified in RFC 5646.void
setSummary
(@Nullable String summary) Plain text sentence or two describing the item.void
Tags associated with the item.void
Title of the item in feed.void
The 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.
-