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, getUrl
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId, getParentComponent, getProperties, getProperty, getProperty, getResource, getResourceType, getSourceComponent, getUrl
public 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 CommentCollection
resolver
- 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 SocialCollectionComponent
pagination
- 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 SocialCollectionComponent
public java.util.List<java.lang.Object> getItems()
CommentCollection
base on the pagination configuration.getItems
in interface SocialCollectionComponent
public void setSortedOrder(CollectionSortedOrder sortedOrder)
setSortedOrder
in interface SocialCollectionComponent
sortedOrder
- the order definition of how the items should be sorted.public PageInfo getPageInfo()
CommentCollection
getPageInfo
in interface CommentCollection<C extends Comment,T extends CommentCollectionConfiguration>
public boolean isTaggingAllowed()
CommentCollection
isTaggingAllowed
in interface CommentCollection<C extends Comment,T extends CommentCollectionConfiguration>
public T getConfiguration()
CommentCollection
getConfiguration
in interface CommentCollection<C extends Comment,T extends CommentCollectionConfiguration>
public java.lang.String getFriendlyUrl()
SocialComponent
getFriendlyUrl
in interface SocialComponent
getFriendlyUrl
in class BaseSocialComponent
public java.util.Map<java.lang.String,java.lang.Object> getAsMap()
getAsMap
in interface SocialComponent
getAsMap
in class BaseSocialComponent
public java.lang.String toJSONString(boolean tidy) throws JsonException
toJSONString
in interface SocialComponent
toJSONString
in class BaseSocialComponent
tidy
- true to return readable JSON string.JsonException
- if an error occurs during serialization.Copyright © 2010 - 2020 Adobe. All Rights Reserved