Clearspace API (1.7.0) Core Javadocs

com.jivesoftware.community
Interface ContentRetrieval

All Known Subinterfaces:
Community, TagSet

public interface ContentRetrieval

Interface for accessing threads, messages, documents, and blog posts - all the fundamental content elements in the system. The object implementing this interface can either be the logical container of those content elements (like a Community), or just represent a certain view of them (like a TagSet).

See Also:
Community, TagSet

Nested Class Summary
static class ContentRetrieval.ContentType
          Enumeration of the primary three types of content elements in the system.
 
Field Summary
static ContentRetrieval.ContentType[] ALL_TYPES
          An array of all ContentRetrieval.ContentTypes
 
Method Summary
 int getBlogPostCount()
          Returns the number of blog posts in all blogs associated with the community based sorted by descending publish date.
 int getBlogPostCount(BlogPostResultFilter filter)
          Returns the number of blog posts in all blogs associated with the community based on the specified ResultFilter.
 JiveIterator<BlogPost> getBlogPosts()
          Returns all BlogPosts in all Blogs associated with this Community sorted by descending publish date.
 JiveIterator<BlogPost> getBlogPosts(BlogPostResultFilter filter)
          Returns all BlogPosts in all Blogs associated with this Community based on the specified ResultFilter.
 JiveIterator<JiveContentObject> getCombinedContent(ContentRetrieval.ContentType... types)
          Returns an Iterable for all threads, documents, and blog posts in the community, depending on which ContentRetrieval.ContentTypes are supplied as an argument.
 JiveIterator<JiveContentObject> getCombinedContent(ResultFilter filter, ContentRetrieval.ContentType... types)
          Returns an Iterable for all threads, documents, and blog posts in the community, depending on which ContentRetrieval.ContentTypes are supplied as an argument, and according the the supplied ResultFilter.
 int getCombinedContentCount(ContentRetrieval.ContentType... types)
          Returns the combined number of threads, documents, and blog posts in the community, depending on which ContentRetrieval.ContentTypes are supplied as an argument.
 int getCombinedContentCount(ResultFilter filter, ContentRetrieval.ContentType... types)
          Returns the combined number of threads, documents, and blog posts in the community, depending on which ContentRetrieval.ContentTypes are supplied as an argument, and restricted by the ResultFilter.
 int getDocumentCount()
          Returns the number of published documents in the community.
 int getDocumentCount(DocumentResultFilter filter)
          Returns the number of documents in the community based on the specified ResultFilter.
 JiveIterator<Document> getDocuments()
          Returns an Iterable of published documents objects in the community.
 JiveIterator<Document> getDocuments(DocumentResultFilter filter)
          Returns an Iterable for all the documents in the community that match the criteria specified by the ResultFilter.
 int getMessageCount()
          Returns the number of messages in the community.
 int getMessageCount(ThreadResultFilter filter)
          Returns the number of messages in the community based on the specified ResultFilter.
 JiveIterator<ForumMessage> getMessages()
          Returns an Iterable for all the messages in the community.
 JiveIterator<ForumMessage> getMessages(ThreadResultFilter filter)
          Returns an Iterable for all the messages in the community that match the criteria specified by the ResultFilter.
 int getThreadCount()
          Returns the number of threads in the community.
 int getThreadCount(ThreadResultFilter resultFilter)
          Returns the number of threads in the community based on the specified ResultFilter.
 JiveIterator<ForumThread> getThreads()
          Returns an Iterable for all the threads in the community.
 JiveIterator<ForumThread> getThreads(ThreadResultFilter resultFilter)
          Returns an Iterable for all the threads in the community that match the criteria specified by the ResultFilter.
 

Field Detail

ALL_TYPES

static final ContentRetrieval.ContentType[] ALL_TYPES
An array of all ContentRetrieval.ContentTypes

Method Detail

getCombinedContentCount

int getCombinedContentCount(ContentRetrieval.ContentType... types)
Returns the combined number of threads, documents, and blog posts in the community, depending on which ContentRetrieval.ContentTypes are supplied as an argument. Note: this method ignores permissions because it's not possible to do a database query for the count that obeys permissions counts. Therefore, the count returned by this method may not be the same as the number of conten objects returned by the getCombinedContent(com.jivesoftware.community.ContentRetrieval.ContentType...) method.

Parameters:
types - the ContentRetrieval.ContentTypes to include in the count.
Returns:
combined number of threads, documents, and blog posts in the community.

getCombinedContentCount

int getCombinedContentCount(ResultFilter filter,
                            ContentRetrieval.ContentType... types)
Returns the combined number of threads, documents, and blog posts in the community, depending on which ContentRetrieval.ContentTypes are supplied as an argument, and restricted by the ResultFilter. Note: this method ignores permissions because it's not possible to do a database query for the count that obeys permissions counts. Therefore, the count returned by this method may not be the same as the number of conten objects returned by the getCombinedContent(ResultFilter, ContentType...) method.

Parameters:
filter - the ResultFilter to filter the results.
types - the ContentRetrieval.ContentTypes to include in the count.
Returns:
combined number of threads, documents, and blog posts in the community.

getCombinedContent

JiveIterator<JiveContentObject> getCombinedContent(ContentRetrieval.ContentType... types)
Returns an Iterable for all threads, documents, and blog posts in the community, depending on which ContentRetrieval.ContentTypes are supplied as an argument. The results will be sorted by descending modification date.

Parameters:
types - the ContentRetrieval.ContentTypes to include in the result.
Returns:
an Iterable for the threads, documents, and blog posts in the community.

getCombinedContent

JiveIterator<JiveContentObject> getCombinedContent(ResultFilter filter,
                                                   ContentRetrieval.ContentType... types)
Returns an Iterable for all threads, documents, and blog posts in the community, depending on which ContentRetrieval.ContentTypes are supplied as an argument, and according the the supplied ResultFilter.

Parameters:
filter - the ResultFilter to filter and sort the results.
types - the ContentRetrieval.ContentTypes to include in the result.
Returns:
an Iterable for the threads, documents, and blog posts in the community.

getThreadCount

int getThreadCount()
Returns the number of threads in the community. Note: this method ignores permissions because it's not possible to do a database query for the count that obeys permissions counts. Therefore, the count returned by this method may not be the same as the number of threads returned by the getThreads() method.

Returns:
the number of threads in the community.

getThreadCount

int getThreadCount(ThreadResultFilter resultFilter)
Returns the number of threads in the community based on the specified ResultFilter. This is useful for determining such things as the number of threads in a date range, etc. Note: this method ignores permissions because it's not possible to do a database query for the count that obeys permissions counts. Therefore, the count returned by this method may not be the same as the number of threads returned by the getThreads(com.jivesoftware.community.ThreadResultFilter) method.

Parameters:
resultFilter - a resultFilter to limit the query on.
Returns:
the number of threads in the community based on the filter.

getThreads

JiveIterator<ForumThread> getThreads()
Returns an Iterable for all the threads in the community. Threads will be sorted on their modified date.

Returns:
an Iterable for the threads in the community.

getThreads

JiveIterator<ForumThread> getThreads(ThreadResultFilter resultFilter)
Returns an Iterable for all the threads in the community that match the criteria specified by the ResultFilter.

Parameters:
resultFilter - a ResultFilter object to perform filtering and sorting with.
Returns:
an Iterable for the threads in the community that match the ResultFilter.

getMessageCount

int getMessageCount()
Returns the number of messages in the community. Note: this method ignores permissions because it's not possible to do a database query for the count that obeys permissions counts. Therefore, the count returned by this method may not be the same as the number of messages returned by the getMessages() method.

Returns:
the number of messages in the community.

getMessageCount

int getMessageCount(ThreadResultFilter filter)
Returns the number of messages in the community based on the specified ResultFilter. This is useful for determining such things as the number of messages in a date range, etc. Note: this method ignores permissions because it's not possible to do a database query for the count that obeys permissions counts. Therefore, the count returned by this method may not be the same as the number of messages returned by the getMessages(ThreadResultFilter) method.

Parameters:
filter - a resultFilter to limit the query on.
Returns:
the number of messages in the community based on the filter.

getMessages

JiveIterator<ForumMessage> getMessages()
Returns an Iterable for all the messages in the community.

Returns:
an Iterable for the messages in the community.

getMessages

JiveIterator<ForumMessage> getMessages(ThreadResultFilter filter)
Returns an Iterable for all the messages in the community that match the criteria specified by the ResultFilter.

Parameters:
filter - a ResultFilter object to perform filtering and sorting with.
Returns:
an Iterable for the messages in the community that match the ResultFilter.

getDocumentCount

int getDocumentCount()
Returns the number of published documents in the community.

Returns:
returns the number of published documents objects in the community.

getDocuments

JiveIterator<Document> getDocuments()
Returns an Iterable of published documents objects in the community. Documents will be sorted based on their community index.

Returns:
an Iterable of published Document objects for the documents in the community.

getDocumentCount

int getDocumentCount(DocumentResultFilter filter)
Returns the number of documents in the community based on the specified ResultFilter. This is useful for determining such things as the number of documents in a date range, etc.

Parameters:
filter - a DocumentResultFilter to limit the query on.
Returns:
the number of documents in the community based on the filter.

getDocuments

JiveIterator<Document> getDocuments(DocumentResultFilter filter)
Returns an Iterable for all the documents in the community that match the criteria specified by the ResultFilter.

Parameters:
filter - a DocumentResultFilter object to perform filtering and sorting with.
Returns:
an Iterable of Document objects for the documents in the community that match the ResultFilter.

getBlogPosts

JiveIterator<BlogPost> getBlogPosts()
Returns all BlogPosts in all Blogs associated with this Community sorted by descending publish date.

Returns:
all BlogPosts in all Blogs associated with this Community sorted by descending publish date.

getBlogPosts

JiveIterator<BlogPost> getBlogPosts(BlogPostResultFilter filter)
Returns all BlogPosts in all Blogs associated with this Community based on the specified ResultFilter. This is useful for determining such things as the number of posts in a date range, etc. sorted by descending publish date.

Parameters:
filter - the BlogPostResultFilter to use in filtering results.
Returns:
all BlogPosts in all Blogs associated with this Community based on the specified ResultFilter.

getBlogPostCount

int getBlogPostCount()
Returns the number of blog posts in all blogs associated with the community based sorted by descending publish date. Note: this method ignores permissions because it's not possible to do a database query for the count that obeys permissions counts. Therefore, the count returned by this method may not be the same as the number of messages returned by the getBlogPosts() method.

Returns:
the number of blog posts in the community based on the filter.

getBlogPostCount

int getBlogPostCount(BlogPostResultFilter filter)
Returns the number of blog posts in all blogs associated with the community based on the specified ResultFilter. This is useful for determining such things as the number of messages in a date range, etc. Note: this method ignores permissions because it's not possible to do a database query for the count that obeys permissions counts. Therefore, the count returned by this method may not be the same as the number of messages returned by the getBlogPosts(BlogPostResultFilter) method.

Parameters:
filter - a resultFilter to limit the query on.
Returns:
the number of blog posts in the community based on the filter.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.