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
DEFAULT_SELECTOR, INDEX_SELECTOR, QUERY_SELECTOR, TRANSLATE_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 |
---|---|
String |
getForumId()
Get the forum id for this post.
|
String |
getFriendlyUrl()
Get a url that can be used to display this component, most of the time, this is the page url that contains the
component.
|
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, getParentComponent, getParentId, getResourceType, getSourceComponent, getSourceComponentId, getTags, getTotalSize, getTranslationAttribution, getTranslationDescription, getTranslationDisplay, getTranslationTitle, getUseFlagReasons, getVotes, isApproved, isFlaggedByUser, isTopLevel, isUserModerator, isVisible, setSortedOrder, toString
buildJSONString, 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, getSourceComponentId, getTags, getTranslationAttribution, getTranslationDescription, getTranslationDisplay, getTranslationTitle, getUseFlagReasons, getVotes, isApproved, isFlaggedByUser, isTopLevel, isUserModerator, isVisible
getItems, getTotalSize, setSortedOrder
getAsMap, getId, getParentComponent, getProperties, getResource, getResourceType, getSourceComponent, 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>
replies
- the latest number of replies.public String getFriendlyUrl()
SocialComponent
getFriendlyUrl
in interface Post<T extends ForumConfiguration>
getFriendlyUrl
in interface SocialComponent
getFriendlyUrl
in class BaseSocialComponent
public void setPagination(CollectionPagination pagination)
AbstractComment
setPagination
in interface SocialCollectionComponent
setPagination
in class AbstractComment<T extends ForumConfiguration>
pagination
- detail information to use"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"