public static class Storefront.Article extends AbstractResponse<Storefront.Article> implements Storefront.HasMetafields, Storefront.MenuItemResource, Storefront.MetafieldParentResource, Storefront.Node, Storefront.OnlineStorePublishable, Storefront.SearchResultItem, Storefront.Trackable
optimisticData, responseData| Modifier and Type | Method and Description |
|---|---|
Storefront.ArticleAuthor |
getAuthor()
Deprecated.
Use `authorV2` instead.
|
Storefront.ArticleAuthor |
getAuthorV2()
The article's author.
|
Storefront.Blog |
getBlog()
The blog that the article belongs to.
|
Storefront.CommentConnection |
getComments()
List of comments posted on the article.
|
java.lang.String |
getContent()
Stripped content of the article, single line with HTML tags removed.
|
java.lang.String |
getContentHtml()
The content of the article, complete with HTML formatting.
|
java.lang.String |
getExcerpt()
Stripped excerpt of the article, single line with HTML tags removed.
|
java.lang.String |
getExcerptHtml()
The excerpt of the article, complete with HTML formatting.
|
java.lang.String |
getGraphQlTypeName() |
java.lang.String |
getHandle()
A human-friendly unique string for the Article automatically generated from its title.
|
ID |
getId()
A globally-unique ID.
|
Storefront.Image |
getImage()
The image associated with the article.
|
Storefront.Metafield |
getMetafield()
Returns a metafield found by namespace and key.
|
java.util.List<Storefront.Metafield> |
getMetafields()
The metafields associated with the resource matching the supplied list of namespaces and keys.
|
java.lang.String |
getOnlineStoreUrl()
The URL used for viewing the resource on the shop's Online Store.
|
DateTime |
getPublishedAt()
The date and time when the article was published.
|
Storefront.SEO |
getSeo()
The article’s SEO information.
|
java.util.List<java.lang.String> |
getTags()
A categorization that a article can be tagged with.
|
java.lang.String |
getTitle()
The article’s name.
|
java.lang.String |
getTrackingParameters()
A URL parameters to be added to a page URL when it is linked from a GraphQL result.
|
Storefront.Article |
setAuthor(Storefront.ArticleAuthor arg) |
Storefront.Article |
setAuthorV2(Storefront.ArticleAuthor arg) |
Storefront.Article |
setBlog(Storefront.Blog arg) |
Storefront.Article |
setComments(Storefront.CommentConnection arg) |
Storefront.Article |
setContent(java.lang.String arg) |
Storefront.Article |
setContentHtml(java.lang.String arg) |
Storefront.Article |
setExcerpt(java.lang.String arg) |
Storefront.Article |
setExcerptHtml(java.lang.String arg) |
Storefront.Article |
setHandle(java.lang.String arg) |
Storefront.Article |
setImage(Storefront.Image arg) |
Storefront.Article |
setMetafield(Storefront.Metafield arg) |
Storefront.Article |
setMetafields(java.util.List<Storefront.Metafield> arg) |
Storefront.Article |
setOnlineStoreUrl(java.lang.String arg) |
Storefront.Article |
setPublishedAt(DateTime arg) |
Storefront.Article |
setSeo(Storefront.SEO arg) |
Storefront.Article |
setTags(java.util.List<java.lang.String> arg) |
Storefront.Article |
setTitle(java.lang.String arg) |
Storefront.Article |
setTrackingParameters(java.lang.String arg) |
boolean |
unwrapsToObject(java.lang.String key) |
collectNodes, get, getFieldName, getKey, jsonAsArray, jsonAsBoolean, jsonAsDouble, jsonAsInteger, jsonAsObject, jsonAsString, withAliaspublic Article()
public Article(JsonObject fields)
throws SchemaViolationError
SchemaViolationErrorpublic java.lang.String getGraphQlTypeName()
getGraphQlTypeName in interface Storefront.HasMetafieldsgetGraphQlTypeName in interface Storefront.MenuItemResourcegetGraphQlTypeName in interface Storefront.MetafieldParentResourcegetGraphQlTypeName in interface Storefront.NodegetGraphQlTypeName in interface Storefront.OnlineStorePublishablegetGraphQlTypeName in interface Storefront.SearchResultItemgetGraphQlTypeName in interface Storefront.TrackablegetGraphQlTypeName in interface Nodepublic Storefront.ArticleAuthor getAuthor()
public Storefront.Article setAuthor(Storefront.ArticleAuthor arg)
public Storefront.ArticleAuthor getAuthorV2()
public Storefront.Article setAuthorV2(Storefront.ArticleAuthor arg)
public Storefront.Blog getBlog()
public Storefront.Article setBlog(Storefront.Blog arg)
public Storefront.CommentConnection getComments()
public Storefront.Article setComments(Storefront.CommentConnection arg)
public java.lang.String getContent()
public Storefront.Article setContent(java.lang.String arg)
public java.lang.String getContentHtml()
public Storefront.Article setContentHtml(java.lang.String arg)
public java.lang.String getExcerpt()
public Storefront.Article setExcerpt(java.lang.String arg)
public java.lang.String getExcerptHtml()
public Storefront.Article setExcerptHtml(java.lang.String arg)
public java.lang.String getHandle()
public Storefront.Article setHandle(java.lang.String arg)
public ID getId()
getId in interface Storefront.NodegetId in interface Nodepublic Storefront.Image getImage()
public Storefront.Article setImage(Storefront.Image arg)
public Storefront.Metafield getMetafield()
getMetafield in interface Storefront.HasMetafieldspublic Storefront.Article setMetafield(Storefront.Metafield arg)
public java.util.List<Storefront.Metafield> getMetafields()
getMetafields in interface Storefront.HasMetafieldspublic Storefront.Article setMetafields(java.util.List<Storefront.Metafield> arg)
public java.lang.String getOnlineStoreUrl()
getOnlineStoreUrl in interface Storefront.OnlineStorePublishablepublic Storefront.Article setOnlineStoreUrl(java.lang.String arg)
public DateTime getPublishedAt()
public Storefront.Article setPublishedAt(DateTime arg)
public Storefront.SEO getSeo()
public Storefront.Article setSeo(Storefront.SEO arg)
public java.util.List<java.lang.String> getTags()
public Storefront.Article setTags(java.util.List<java.lang.String> arg)
public java.lang.String getTitle()
public Storefront.Article setTitle(java.lang.String arg)
public java.lang.String getTrackingParameters()
getTrackingParameters in interface Storefront.Trackablepublic Storefront.Article setTrackingParameters(java.lang.String arg)
public boolean unwrapsToObject(java.lang.String key)
unwrapsToObject in class AbstractResponse<Storefront.Article>