public class Post
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Post.Builder
Builds an immutable post.
|
static class |
Post.CommentStatus |
static class |
Post.Sort
Post sort methods.
|
static class |
Post.Status
Post status.
|
static class |
Post.Type
The post type.
|
| Modifier and Type | Field and Description |
|---|---|
User |
author
The author.
|
long |
authorId
The author id.
|
com.google.common.collect.ImmutableList<Post> |
children
A list of children.
|
int |
commentCount
The comment count.
|
java.lang.String |
content
The content.
|
java.lang.String |
excerpt
The excerpt.
|
java.lang.String |
guid
The GUID.
|
long |
id
The unique id.
|
com.google.common.collect.ImmutableList<Meta> |
metadata
Metadata associated with the user.
|
java.lang.String |
mimeType
The mime type.
|
long |
modifiedTimestamp
The modified timestamp.
|
long |
parentId
The parent id.
|
long |
publishTimestamp
The publish timestamp.
|
java.lang.String |
slug
The slug.
|
Post.Status |
status
The status.
|
com.google.common.collect.ImmutableMap<java.lang.String,com.google.common.collect.ImmutableList<TaxonomyTerm>> |
taxonomyTerms
A map of taxonomy terms vs taxonomy name.
|
java.lang.String |
title
The title.
|
Post.Type |
type
The post type.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableList<TaxonomyTerm> |
categories()
An immutable list of categories associated with this post.
|
Post |
modifiedNow()
Changes the modified time of a post to the current time.
|
static Post.Builder |
newBuilder()
Creates an immutable post builder.
|
static Post.Builder |
newBuilder(Post post)
Creates an immutable post builder with data from an existing post.
|
com.google.common.collect.ImmutableList<TaxonomyTerm> |
tags()
An immutable list of tags associated with this post.
|
com.google.common.collect.ImmutableList<TaxonomyTerm> |
terms(java.lang.String taxonomy)
An immutable list of terms associated with this post from a specified taxonomy.
|
Post |
withAuthor(User user)
Adds an author to a post.
|
Post |
withChildren(java.util.List<Post> children)
Adds children to a post.
|
Post |
withContent(java.lang.String content)
Replaces post content.
|
Post |
withId(long id)
Adds an id to a post.
|
Post |
withMetadata(java.util.List<Meta> metadata)
Adds metadata to a post.
|
Post |
withParent(long parentId)
Adds a parent id to a post.
|
Post |
withTaxonomyTerms(java.util.Map<java.lang.String,java.util.List<TaxonomyTerm>> taxonomyTerms)
Adds taxonomy terms to a post.
|
public final long id
public final java.lang.String slug
public final java.lang.String title
public final java.lang.String excerpt
public final java.lang.String content
public final long authorId
public final User author
public final long publishTimestamp
public final long modifiedTimestamp
public final Post.Status status
public final long parentId
public final java.lang.String guid
public final int commentCount
public final com.google.common.collect.ImmutableList<Meta> metadata
public final Post.Type type
public final java.lang.String mimeType
public final com.google.common.collect.ImmutableMap<java.lang.String,com.google.common.collect.ImmutableList<TaxonomyTerm>> taxonomyTerms
public final com.google.common.collect.ImmutableList<Post> children
public static Post.Builder newBuilder()
public static Post.Builder newBuilder(Post post)
post - The post.public final Post modifiedNow()
public final Post withContent(java.lang.String content)
content - The new content.public final Post withId(long id)
id - The id.public final Post withParent(long parentId)
parentId - The parent id.public final Post withAuthor(User user)
user - The user that represents the author.public final Post withTaxonomyTerms(java.util.Map<java.lang.String,java.util.List<TaxonomyTerm>> taxonomyTerms)
taxonomyTerms - The taxonomy terms.public final Post withMetadata(java.util.List<Meta> metadata)
metadata - The metadata.public final Post withChildren(java.util.List<Post> children)
children - The children to add.public final com.google.common.collect.ImmutableList<TaxonomyTerm> terms(java.lang.String taxonomy)
taxonomy - The taxonomy.public final com.google.common.collect.ImmutableList<TaxonomyTerm> tags()
public final com.google.common.collect.ImmutableList<TaxonomyTerm> categories()