public static class Post.Builder
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
Post.Builder |
addTaxonomyTerm(TaxonomyTerm term)
Adds a taxonomy term.
|
Post |
build()
Builds an immutable post.
|
User |
getAuthor()
Gets the author.
|
long |
getAuthorId()
Gets the author id.
|
java.util.List<Post> |
getChildren()
Gets the children.
|
int |
getCommentCount()
Gets the comment count.
|
java.lang.String |
getContent()
Gets the content.
|
java.lang.String |
getExcerpt()
Ges the excerpt.
|
java.lang.String |
getGUID()
Gets the GUID.
|
long |
getId()
Gets the id.
|
java.util.List<Meta> |
getMetadata()
Gets the metadata.
|
java.lang.String |
getMimeType()
Gets the mime type.
|
long |
getModifiedTimestamp()
Gets the last modified timestamp.
|
long |
getParentId()
Gets the parent id.
|
long |
getPublishTimestamp()
Gets the publish timestamp.
|
java.lang.String |
getSlug()
Gets the slug.
|
Post.Status |
getStatus()
Gets the status.
|
java.lang.String |
getTitle()
Gets the title.
|
Post.Type |
getType()
Gets the post type.
|
Post.Builder |
setAuthor(User author)
Sets the author.
|
Post.Builder |
setAuthorId(long authorId)
Sets the author id.
|
void |
setChildren(java.util.List<Post> children)
Sets the children.
|
Post.Builder |
setCommentCount(int commentCount)
Sets the comment count.
|
Post.Builder |
setContent(java.lang.String content)
Sets the content.
|
Post.Builder |
setExcerpt(java.lang.String excerpt)
Sets the excerpt.
|
Post.Builder |
setGUID(java.lang.String guid)
Sets the GUID.
|
Post.Builder |
setId(long id)
Sets the id.
|
Post.Builder |
setMetadata(java.util.List<Meta> metadata)
Sets the metadata.
|
Post.Builder |
setMimeType(java.lang.String mimeType)
Sets the mime type.
|
Post.Builder |
setModifiedTimestamp(long modifiedTimestamp)
Sets the last modified timestamp.
|
Post.Builder |
setParentId(long parentId)
Sets the parent id.
|
Post.Builder |
setPublishTimestamp(long publishTimestamp)
Sets the publish timestamp.
|
Post.Builder |
setSlug(java.lang.String slug)
Sets the slug.
|
Post.Builder |
setStatus(Post.Status status)
Sets the status.
|
Post.Builder |
setTaxonomyTerms(java.util.List<TaxonomyTerm> terms)
Sets terms for a taxonomy, replacing any existing.
|
Post.Builder |
setTitle(java.lang.String title)
Sets the title.
|
Post.Builder |
setType(Post.Type type)
Sets the post type.
|
public long getId()
public Post.Builder setId(long id)
id - The id.public java.lang.String getSlug()
public Post.Builder setSlug(java.lang.String slug)
slug - The slug.public java.lang.String getTitle()
public Post.Builder setTitle(java.lang.String title)
title - The title.public java.lang.String getExcerpt()
public Post.Builder setExcerpt(java.lang.String excerpt)
excerpt - The excerpt.public java.lang.String getContent()
public Post.Builder setContent(java.lang.String content)
content - The content.public long getAuthorId()
public Post.Builder setAuthorId(long authorId)
authorId - The author id.public User getAuthor()
null if not set.public Post.Builder setAuthor(User author)
author - The author.public long getPublishTimestamp()
public Post.Builder setPublishTimestamp(long publishTimestamp)
publishTimestamp - The publish timestamp.public long getModifiedTimestamp()
public Post.Builder setModifiedTimestamp(long modifiedTimestamp)
modifiedTimestamp - The timestamp.public Post.Status getStatus()
public Post.Builder setStatus(Post.Status status)
status - The status.public long getParentId()
public Post.Builder setParentId(long parentId)
parentId - The parent id.public java.lang.String getGUID()
public Post.Builder setGUID(java.lang.String guid)
guid - The GUID.public int getCommentCount()
public Post.Builder setCommentCount(int commentCount)
commentCount - The comment count.public java.util.List<Meta> getMetadata()
public Post.Builder setMetadata(java.util.List<Meta> metadata)
metadata - The metadata.public Post.Type getType()
public Post.Builder setType(Post.Type type)
type - The type.public Post.Builder setTaxonomyTerms(java.util.List<TaxonomyTerm> terms)
terms - The terms.public Post.Builder addTaxonomyTerm(TaxonomyTerm term)
term - The term.public java.lang.String getMimeType()
public Post.Builder setMimeType(java.lang.String mimeType)
mimeType - The mime type.public java.util.List<Post> getChildren()
public void setChildren(java.util.List<Post> children)
children - The children.public Post build()