|
Clearspace API (2.5.18) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.ResultFilter
com.jivesoftware.community.ThreadResultFilter
com.jivesoftware.community.BlogPostResultFilter
public class BlogPostResultFilter
Filters and sorts BlogPosts.
| Field Summary | |
|---|---|
static int |
PUBLISH_DATE
Sort on the publish date. |
| Fields inherited from class com.jivesoftware.community.ResultFilter |
|---|
AND_MODE, ASCENDING, CONTAINS_MATCH, DESCENDING, EXACT_MATCH, NULL_INT, OR_MODE |
| Constructor Summary | |
|---|---|
BlogPostResultFilter()
|
|
| Method Summary | |
|---|---|
static BlogPostResultFilter |
createDefaultFilter()
Creates a default blog post ResultFilter: only blog posts that have status = BlogPost#STATUS_PUBLISH with results sorted
on the blog post publish date (newest blog posts first). |
long |
getBlogID()
Returns the blogID that results will be filtered on. |
Date |
getPublishDateRangeMax()
Returns a date that represents the upper boundry for blog posts to be selected by the result filter. |
Date |
getPublishDateRangeMin()
Returns the publish date that represents the lower boundary for blog posts to be filtered on. |
boolean |
isIncludeMapped()
|
boolean |
isOnlyDraft()
Returns whether the result to be selected by the result filter should include draft blog posts. |
boolean |
isOnlyPublished()
Returns whether the result to be selected by the result filter should include published blog posts. |
boolean |
isOnlyWaitingMod()
Returns whether the result to be selected by the result filter should include only those posts that are waiting for moderator approval. |
void |
setBlogID(long blogID)
Sets the blogID that results will be filtered on. |
void |
setIncludeMapped(boolean mapped)
Indicates tha the search should include legacy blog mappings defined prior to 2.1. |
void |
setOnlyDraft(boolean onlyDraft)
Sets whether the result to be selected by the result filter should include published blog posts. |
void |
setOnlyPublished(boolean onlyPublished)
Sets whether the result to be selected by the result filter should include published blog posts. |
void |
setOnlyWaitingMod(boolean onlyWaitingMod)
Sets whether the result to be selected by the result filter shoudl inlcude only blog posts that are currently waiting to be approved by a moderator. |
void |
setPublishDateRangeMax(Date publishDateRangeMax)
Sets a date that represents the upper boundry for blog posts to be selected by the result filter. |
void |
setPublishDateRangeMin(Date publishDateRangeMin)
Sets the date that represents the lower boundary for blog posts to be selected by the result filter. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int PUBLISH_DATE
| Constructor Detail |
|---|
public BlogPostResultFilter()
| Method Detail |
|---|
public static BlogPostResultFilter createDefaultFilter()
BlogPost#STATUS_PUBLISH with results sorted
on the blog post publish date (newest blog posts first). NOTE: The resulting BlogPostResultFilter should not be stored by invoking classes; this filter is the default blog post filter at the time it's being invoked.
public boolean isOnlyPublished()
NOTE: This method only looks at the blog post publish status value and NOT the publish date. Under most circumstances, you'll want to use this method in conjunction with the publish date max and min methods.
public void setOnlyPublished(boolean onlyPublished)
NOTE: This method only looks at the blog post publish status value and NOT the publish date. Under most circumstances, you'll want to use this method in conjunction with the publish date max and min methods.
public boolean isOnlyDraft()
public void setOnlyDraft(boolean onlyDraft)
onlyDraft - true if the result filter should only include draft blog posts, false otherwise.public boolean isOnlyWaitingMod()
public void setOnlyWaitingMod(boolean onlyWaitingMod)
onlyWaitingMod - true if the result filter should only include posts waiting for moderation,
false otherwise.public Date getPublishDateRangeMin()
public void setPublishDateRangeMin(Date publishDateRangeMin)
Setting a date range for a BlogPostResultFilter is a potential performance bottleneck. For example, if the argument for the date range is "new Date()" then the corresponding database query will map to an accuracy of a particular millesecond in time. This means that the results can't be cached. A better solution is to round dates to the nearest minute, hour, etc (whatever accuracy you need).
publishDateRangeMin - Date representing the filter lowest value of
the publish date to be selected.public Date getPublishDateRangeMax()
public void setPublishDateRangeMax(Date publishDateRangeMax)
publishDateRangeMax - Date representing the filter lowest value of
the publish date range.public long getBlogID()
public void setBlogID(long blogID)
blogID - the blog ID to filter on.public void setIncludeMapped(boolean mapped)
mapped - public boolean isIncludeMapped()
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||