C - any SocialComponent type that extends the Comment data type.public abstract class AbstractCommentCollection<C extends Comment,T extends CommentCollectionConfiguration> extends BaseSocialComponent implements CommentCollection<C,T>
Comment.CSV_SELECTOR, DEFAULT_SELECTOR, INDEX_SELECTOR, PROP_REFERER, QUERY_SELECTOR, TRANSLATE_SELECTOR| Constructor and Description |
|---|
AbstractCommentCollection(Resource resource,
ClientUtilities clientUtils,
CommentSocialComponentListProviderManager commentListProviderManager)
Constructor using the specified
Resource which should be the root of the collection without paging
specification. |
AbstractCommentCollection(Resource resource,
ClientUtilities clientUtils,
QueryRequestInfo queryInfo,
CommentSocialComponentListProviderManager commentListProviderManager)
Construct a
CommentCollection using the specified Resource which should be the root of the
collection. |
AbstractCommentCollection(ResourceID id,
ResourceResolver resolver,
ClientUtilities clientUtils,
CommentSocialComponentListProviderManager commentListProviderManager)
Constructor using the specified
ResourceID which should be the root of the collection without paging
specification. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getAsMap() |
T |
getConfiguration()
Get the configuration for this collection
|
java.util.Calendar |
getCreated()
Returns the moment in time this collection was created.
|
java.lang.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.
|
java.util.List<java.lang.Object> |
getItems()
Get the comments of this
CommentCollection base on the pagination configuration. |
java.util.Calendar |
getLastModified()
Returns the moment in time this collection was last modified.
|
boolean |
getMayPost() |
PageInfo |
getPageInfo()
Gets information about the pages for this collection.
|
int |
getTotalSize()
Get total size of the collection.
|
boolean |
isTaggingAllowed()
Checks if is tagging allowed.
|
void |
setPagination(CollectionPagination pagination)
Set the collection list range.
|
void |
setSortedOrder(CollectionSortedOrder sortedOrder)
Set the collection sorted order.
|
java.lang.String |
toJSONString(boolean tidy) |
buildJSONString, getId, getParentComponent, getProperties, getProperty, getProperty, getResource, getResourceType, getSourceComponent, getUrlequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetId, getParentComponent, getProperties, getProperty, getProperty, getResource, getResourceType, getSourceComponent, getUrlpublic AbstractCommentCollection(ResourceID id, ResourceResolver resolver, ClientUtilities clientUtils, CommentSocialComponentListProviderManager commentListProviderManager)
ResourceID which should be the root of the collection without paging
specification. Paging information is not created until the pagination is specified.id - the resource id of the CommentCollectionresolver - the resource resolver used to obtain the resource in the JCR.clientUtils - the clientUtilscommentListProviderManager - CommentSocialComponentListProviderManagersetPagination(CollectionPagination)public AbstractCommentCollection(Resource resource, ClientUtilities clientUtils, CommentSocialComponentListProviderManager commentListProviderManager)
Resource which should be the root of the collection without paging
specification. Paging information is not created until the pagination is specified.resource - the resource.clientUtils - the clientUtilscommentListProviderManager - CommentSocialComponentListProviderManagersetPagination(CollectionPagination)public AbstractCommentCollection(Resource resource, ClientUtilities clientUtils, QueryRequestInfo queryInfo, CommentSocialComponentListProviderManager commentListProviderManager)
CommentCollection using the specified Resource which should be the root of the
collection.resource - the resource where the CommentCollection is locatedclientUtils - the clientUtilities instancecommentListProviderManager - CommentSocialComponentListProviderManagerqueryInfo - QueryRequestInfopublic boolean getMayPost()
getMayPost in interface CommentCollection<C extends Comment,T extends CommentCollectionConfiguration>public void setPagination(CollectionPagination pagination)
setPagination in interface SocialCollectionComponentpagination - pagination configurationpublic java.util.Calendar getCreated()
getCreated in interface CommentCollection<C extends Comment,T extends CommentCollectionConfiguration>public java.util.Calendar getLastModified()
getLastModified in interface CommentCollection<C extends Comment,T extends CommentCollectionConfiguration>public int getTotalSize()
getTotalSize in interface SocialCollectionComponentpublic java.util.List<java.lang.Object> getItems()
CommentCollection base on the pagination configuration.getItems in interface SocialCollectionComponentpublic void setSortedOrder(CollectionSortedOrder sortedOrder)
setSortedOrder in interface SocialCollectionComponentsortedOrder - the order definition of how the items should be sorted.public PageInfo getPageInfo()
CommentCollectiongetPageInfo in interface CommentCollection<C extends Comment,T extends CommentCollectionConfiguration>public boolean isTaggingAllowed()
CommentCollectionisTaggingAllowed in interface CommentCollection<C extends Comment,T extends CommentCollectionConfiguration>public T getConfiguration()
CommentCollectiongetConfiguration in interface CommentCollection<C extends Comment,T extends CommentCollectionConfiguration>public java.lang.String getFriendlyUrl()
SocialComponentgetFriendlyUrl in interface SocialComponentgetFriendlyUrl in class BaseSocialComponentpublic java.util.Map<java.lang.String,java.lang.Object> getAsMap()
getAsMap in interface SocialComponentgetAsMap in class BaseSocialComponentpublic java.lang.String toJSONString(boolean tidy)
throws JsonException
toJSONString in interface SocialComponenttoJSONString in class BaseSocialComponenttidy - true to return readable JSON string.JsonException - if an error occurs during serialization.Copyright © 2010 - 2023 Adobe. All Rights Reserved