public abstract class AbstractPost<T extends ForumConfiguration> extends AbstractComment<T> implements Post<T>
Comment.ModeratorActions, Comment.ModeratorStatus, Comment.Tag
LAST_SELF_MOD_BY, PN_SUBJECT, POST_POSTFIX
COMMENT_RESOURCETYPE, COMMENTCOLLECTION_RESOURCETYPE, JSON_EXTENSION, NODE_TYPE, PROP_APPROVED, PROP_SPAM, SOCO_SELECTOR
Constructor and Description |
---|
AbstractPost(Resource resource,
ClientUtilities clientUtils,
CommentSocialComponentListProviderManager listProviderManager) |
AbstractPost(Resource resource,
ClientUtilities clientUtils,
QueryRequestInfo queryInfo,
CommentSocialComponentListProviderManager listProviderManager)
Constructor of a comment.
|
AbstractPost(Resource resource,
ClientUtilities clientUtils,
QueryRequestInfo queryInfo,
Resource latestPost,
int numReplies,
CommentSocialComponentListProviderManager listProviderManager) |
Modifier and Type | Method and Description |
---|---|
T |
createConfiguration(Resource resource,
CommentSystem cs)
Obtain the configuration for this comment.
|
String |
getForumId()
Get the forum id for this post.
|
String |
getFriendlyUrl() |
User |
getLastModifiedUser()
Returns the user that effected the last modification of this post.
|
String |
getLatestPost()
Returns the latest post, i.e.
|
String |
getSubject()
This method returns the forum post's subject as entered by the user.
|
boolean |
isClosed() |
boolean |
isForumClosed() |
boolean |
isPinned()
Indicates whether this post is pinned.
|
boolean |
isTopic()
Check if this instance is a Post or not.
|
boolean |
isTopicClosed() |
void |
setLatestPost(Resource post)
Set latest post.
|
void |
setNumReplies(int replies)
Set the number of replies
|
void |
setPagination(CollectionPagination pagination)
Set the collection list range.
|
getAttachment, getAttachments, getAuthor, getCanDelete, getCanEdit, getCanReply, getCanTranslate, getConfiguration, getCreated, getCurrentUserFlagText, getFlagReasons, getItems, getMessage, getModeratorActions, getModeratorStatus, getPageInfo, getParent, getParentId, getResourceType, getTags, getTotalSize, getUseFlagReasons, getVotes, isApproved, isFlaggedByUser, isTopLevel, isUserModerator, isVisible, setSortedOrder, toString
getAsMap, getId, getProperties, getResource, getUrl, toJSONString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPageInfo
getAttachment, getAttachments, getAuthor, getCanDelete, getCanEdit, getCanReply, getCanTranslate, getConfiguration, getCreated, getCurrentUserFlagText, getFlagReasons, getMessage, getModeratorActions, getModeratorStatus, getParentId, getTags, getUseFlagReasons, getVotes, isApproved, isFlaggedByUser, isTopLevel, isUserModerator, isVisible
getItems, getTotalSize, setSortedOrder
getAsMap, getId, getProperties, getResource, getResourceType, getUrl, toJSONString
public AbstractPost(Resource resource, ClientUtilities clientUtils, CommentSocialComponentListProviderManager listProviderManager) throws RepositoryException
RepositoryException
public AbstractPost(Resource resource, ClientUtilities clientUtils, QueryRequestInfo queryInfo, CommentSocialComponentListProviderManager listProviderManager) throws RepositoryException
comment
- the specified CommentResourceElement
clientUtils
- the client utilities instancepagination
- the list pagination configuration of this commentcommentFactory
- comment factory used to create a legacy comment instance to a PostRepositoryException
- if an error occurspublic AbstractPost(Resource resource, ClientUtilities clientUtils, QueryRequestInfo queryInfo, Resource latestPost, int numReplies, CommentSocialComponentListProviderManager listProviderManager) throws RepositoryException
RepositoryException
public String getSubject()
Post
getSubject
in interface Post<T extends ForumConfiguration>
String
representing the post's subject or null
if not defined.public User getLastModifiedUser()
getLastModifiedUser
in interface Post<T extends ForumConfiguration>
User
last modified this post.public boolean isPinned()
isPinned
in interface Post<T extends ForumConfiguration>
true
if this post is pinned.public boolean isClosed()
isClosed
in interface Comment<T extends ForumConfiguration>
isClosed
in interface Post<T extends ForumConfiguration>
isClosed
in class AbstractComment<T extends ForumConfiguration>
public boolean isTopicClosed()
isTopicClosed
in interface Post<T extends ForumConfiguration>
public boolean isForumClosed()
isForumClosed
in interface Post<T extends ForumConfiguration>
public boolean isTopic()
isTopic
in interface Post<T extends ForumConfiguration>
true
if this post is a topic.public String getForumId()
Post
getForumId
in interface Post<T extends ForumConfiguration>
public String getLatestPost()
Post
null
is returned.getLatestPost
in interface Post<T extends ForumConfiguration>
null
if not found.public void setLatestPost(Resource post)
Post
setLatestPost
in interface Post<T extends ForumConfiguration>
post
- the latest post.public void setNumReplies(int replies)
Post
setNumReplies
in interface Post<T extends ForumConfiguration>
public String getFriendlyUrl()
getFriendlyUrl
in interface Post<T extends ForumConfiguration>
public void setPagination(CollectionPagination pagination)
AbstractComment
setPagination
in interface SocialCollectionComponent
setPagination
in class AbstractComment<T extends ForumConfiguration>
pagination
- detail information to usepublic T createConfiguration(Resource resource, CommentSystem cs)
AbstractComment
createConfiguration
in interface Comment<T extends ForumConfiguration>
createConfiguration
in class AbstractComment<T extends ForumConfiguration>
resource
- the target resourcecs
- The CommentSystem
of the comment"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"