Clearspace API (2.0.15) Web Services Client Javadocs

com.jivesoftware.community.webservices
Class WSBlogPostResultFilter

java.lang.Object
  extended by com.jivesoftware.community.webservices.WSResultFilter
      extended by com.jivesoftware.community.webservices.WSBlogPostResultFilter

public class WSBlogPostResultFilter
extends WSResultFilter


Nested Class Summary
 
Nested classes/interfaces inherited from class com.jivesoftware.community.webservices.WSResultFilter
WSResultFilter.ResolutionState
 
Field Summary
static int PUBLISH_DATE
          Sort on the publish date.
 
Fields inherited from class com.jivesoftware.community.webservices.WSResultFilter
ASCENDING, DESCENDING, NULL_INT
 
Constructor Summary
WSBlogPostResultFilter()
           
 
Method Summary
static WSBlogPostResultFilter createDefaultFilter()
          Creates a default blog post ResultFilter: only blog posts that have status = com.jivesoftware.community.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.
 java.util.Date getPublishDateRangeMax()
          Returns a date that represents the upper boundry for blog posts to be selected by the result filter.
 java.util.Date getPublishDateRangeMin()
          Returns the publish date that represents the lower boundary for blog posts to be filtered on.
 boolean isOnlyPublished()
          Returns whether the result to be selected by the result filter should include published blog posts.
 void setBlogID(long blogID)
          Sets the blogID that results will be filtered on.
 void setOnlyPublished(boolean onlyPublished)
          Sets whether the result to be selected by the result filter should include published blog posts.
 void setPublishDateRangeMax(java.util.Date publishDateRangeMax)
          Sets a date that represents the upper boundry for blog posts to be selected by the result filter.
 void setPublishDateRangeMin(java.util.Date publishDateRangeMin)
          Sets the date that represents the lower boundary for blog posts to be selected by the result filter.
 
Methods inherited from class com.jivesoftware.community.webservices.WSResultFilter
createDefaultMessageFilter, createDefaultThreadFilter, createDefaultUserMessagesFilter, getCreationDateRangeMax, getCreationDateRangeMin, getModerationRangeMax, getModerationRangeMin, getModificationDateRangeMax, getModificationDateRangeMin, getNumResults, getResolutionDateRangeMin, getResolutionnDateRangeMax, getResolutionStates, getSortField, getSortOrder, getStartIndex, getTags, getUserID, isRecursive, setCreationDateRangeMax, setCreationDateRangeMin, setModerationRangeMax, setModerationRangeMin, setModificationDateRangeMax, setModificationDateRangeMin, setNumResults, setRecursive, setResolutionDateRangeMin, setResolutionnDateRangeMax, setResolutionStates, setSortField, setSortOrder, setStartIndex, setTags, setUserID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PUBLISH_DATE

public static final int PUBLISH_DATE
Sort on the publish date.

See Also:
Constant Field Values
Constructor Detail

WSBlogPostResultFilter

public WSBlogPostResultFilter()
Method Detail

createDefaultFilter

public static WSBlogPostResultFilter createDefaultFilter()
Creates a default blog post ResultFilter: only blog posts that have status = com.jivesoftware.community.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.


isOnlyPublished

public boolean isOnlyPublished()
Returns whether the result to be selected by the result filter should include published blog posts. The default value is true, to include only published blog posts.

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.

Returns:
whether the result to be selected by the result filter should include published blog posts.

setOnlyPublished

public void setOnlyPublished(boolean onlyPublished)
Sets whether the result to be selected by the result filter should include published blog posts. The default value is true, to include only published blog posts.

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.


getPublishDateRangeMin

public java.util.Date getPublishDateRangeMin()
Returns the publish date that represents the lower boundary for blog posts to be filtered on. If this value has not been set, the method will return null.

Returns:
a Date representing the lower bound for publish dates to filter on.

setPublishDateRangeMin

public void setPublishDateRangeMin(java.util.Date publishDateRangeMin)
Sets the date that represents the lower boundary for blog posts to be selected by the result filter. If this value is not set the results filter will be unbounded for the earliest publish date selected.

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).

Parameters:
publishDateRangeMin - Date representing the filter lowest value of the publish date to be selected.

getPublishDateRangeMax

public java.util.Date getPublishDateRangeMax()
Returns a date that represents the upper boundry for blog posts to be selected by the result filter. If this value is not set it will return null and the results filter will be unbounded for the latest publish date selected.

Returns:
a Date representing the filter highest value of the publish date to be selected.

setPublishDateRangeMax

public void setPublishDateRangeMax(java.util.Date publishDateRangeMax)
Sets a date that represents the upper boundry for blog posts to be selected by the result filter. If this value is not set the results filter will be unbounded for the latest publish date selected. 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).

Parameters:
publishDateRangeMax - Date representing the filter lowest value of the publish date range.

getBlogID

public long getBlogID()
Returns the blogID that results will be filtered on. The method will return NULL_INT if no blog to filter on has been specified.

Returns:
the blogID that results will be filtered on.

setBlogID

public void setBlogID(long blogID)
Sets the blogID that results will be filtered on. By default, no filtering on blogID's will take place. If you'd like to change so that no filtering is performed, pass in ResultFilter.NULL_INT.

Parameters:
blogID - the blog ID to filter on.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.