Clearspace API (2.0.15) Web Services Client Javadocs

com.jivesoftware.community.webservices
Interface BlogService


public interface BlogService

A web service interface for managing blogs.


Method Summary
 void addAttachmentToBlogPost(long blogPostID, java.lang.String name, java.lang.String contentType, byte[] source)
          Adds an attachment to the blog post with the specified ID.
 void addImageToBlogPost(long blogPostID, java.lang.String name, java.lang.String contentType, byte[] source)
          Adds an image to the blog post with the specified ID.
 WSBlog createBlog(long userID, java.lang.String blogName, java.lang.String displayName)
          Creates a new blog.
 WSBlogPost createBlogPost(java.lang.String subject, java.lang.String body, long blogID, long userID)
          Creates a new blog post.
 void deleteBlog(long blogID)
          Permanently deletes a blog and all of the blog postings and comments associated with the blog.
 void deleteBlogPost(long blogPostID)
          Permanently deletes a blog post and all of the comments associated with the it.
 WSAttachment[] getAttachmentsByBlogPostID(long blogPostID)
          Returns an array of attachments that are attached to the specified blog post.
 WSBlog getBlog(long blogID)
          Returns a blog by blog ID.
 WSBlog getBlog(java.lang.String blogName)
          Returns a blog by blog blogName.
 int getBlogCount()
          Returns the total number of blogs on this system.
 WSBlog[] getBlogCount(WSBlogResultFilter filter)
          Returns the total number of blogs on this system that match the criteria specified by the ResultFilter.
 int getBlogCountForUser(long userID)
          Returns the count of all blogs which are associated with the given user.
 WSBlogPost getBlogPost(long blogPostID)
          Returns a blog by blog ID.
 int getBlogPostCount()
          Returns the number of blog posts on the system, by default only includes blog posts where status = WSBlogPost.STATUS_PUBLISH and publish date less than now().
 int getBlogPostCount(WSBlogPostResultFilter filter)
          Returns the number of blog posts on the system.
 WSBlogPost[] getBlogPosts(WSBlogPostResultFilter filter)
          Returns all the blog posts that match the criteria specified by the BlogPostResultFilter on the entire system.
 WSBlog[] getBlogsByDisplayName(java.lang.String query, int startIndex, int endIndex, int numResults)
          Returns all the blogs on this system whose display name is LIKE the given query.
 WSBlog[] getBlogsForUser(long userID)
          Returns all blogs which are associated with the given user.
 int getCommentCount()
          Returns the number of comments on blog posts in the system.
 int getCommentCount(WSFeedbackResultFilter filter)
          Returns the number of comments on blog posts that match the criteria specified by the FeedbackResultFilter in the entire system.
 WSComment[] getComments(WSFeedbackResultFilter filter)
          Returns all the comments on blog posts that match the criteria specified by the FeedbackResultFilter in the entire system.
 WSImage[] getImagesByBlogPostID(long blogPostID)
          Returns an array of images that are attached to the specified blog post.
 java.lang.String getPingServices()
          Returns a comma delimited list of available ping services for the system.
 WSBlog[] getRecentBlogs()
          Returns (at most) the ten most recent blogs created on this system.
 WSTagCount[] getTags()
          Returns all tags for blogs in the system.
 WSTagCount[] getTags(WSBlogTagResultFilter filter)
          Returns all tags for blogs in the system filtered by the BlogTagResultFilter.
 boolean isBlogsEnabled()
          Returns true if the blogs feature is turned on.
 boolean isCommentsEnabled()
          Returns true if the comments feature is turned on.
 boolean isPingsEnabled()
          Returns true if the pings feature is turned on.
 boolean isPingsOverrideEnabled()
          Returns true if the system has been configured to allow users to override the ping URIs configured for the system.
 boolean isTrackbacksEnabled()
          Returns true if the trackbacks feature is turned on.
 WSBlogPost publishBlogPost(java.lang.String subject, java.lang.String body, long blogID, long userID)
           
 void setBlogsEnabled(boolean blogsEnabled)
          Enables or disables the blogs feature.
 void setCommentsEnabled(boolean commentsEnabled)
          Enables or disables the comments feature system wide.
 void setPingsEnabled(boolean pingsEnabled)
          Enables or disables the pings feature system wide.
 void setPingServices(java.lang.String services)
          Sets the comma delimited list of available ping services for the system.
 void setPingsOverrideEnabled(boolean pingsOverrideEnabled)
          Configures the system to allow users to override the ping URIs configured for all blogs.
 void setTrackbacksEnabled(boolean trackbacksEnabled)
          Enables or disables the trackbacks feature system wide.
 void updateBlogPost(WSBlogPost blogPost)
           
 boolean userHasBlogs(long userID)
          Returns true if the given user has one or more blogs, false if the user does not have a blog.
 

Method Detail

isBlogsEnabled

boolean isBlogsEnabled()
Returns true if the blogs feature is turned on. When blogs are disabled, other methods serve as no-ops.

Returns:
true if the blogs are enabled

setBlogsEnabled

void setBlogsEnabled(boolean blogsEnabled)
Enables or disables the blogs feature. When blogs are disabled, other methods serve as no-ops.

Parameters:
blogsEnabled - true to enable the blogs feature, false to disable

isCommentsEnabled

boolean isCommentsEnabled()
Returns true if the comments feature is turned on. When comments are disabled on the system, all individual blog comment settings are disabled as well.

Returns:
true if the comments are enabled

setCommentsEnabled

void setCommentsEnabled(boolean commentsEnabled)
Enables or disables the comments feature system wide.

Parameters:
commentsEnabled - true to enable the comments feature, false to disable

isTrackbacksEnabled

boolean isTrackbacksEnabled()
Returns true if the trackbacks feature is turned on. When trackbacks are disabled on the system, all individual blog trackback settings are disabled as well.

Returns:
true if the trackbacks are enabled

setTrackbacksEnabled

void setTrackbacksEnabled(boolean trackbacksEnabled)
Enables or disables the trackbacks feature system wide.

Parameters:
trackbacksEnabled - true to enable the trackback feature, false to disable

isPingsEnabled

boolean isPingsEnabled()
Returns true if the pings feature is turned on. When pings are disabled on the system, all individual blog ping settings are disabled as well.

Returns:
true if pings are enabled

setPingsEnabled

void setPingsEnabled(boolean pingsEnabled)
Enables or disables the pings feature system wide.

Parameters:
pingsEnabled - true to enable the ping feature, false to disable

isPingsOverrideEnabled

boolean isPingsOverrideEnabled()
Returns true if the system has been configured to allow users to override the ping URIs configured for the system.

Returns:
true if users can provide their own ping URI's are enabled

setPingsOverrideEnabled

void setPingsOverrideEnabled(boolean pingsOverrideEnabled)
Configures the system to allow users to override the ping URIs configured for all blogs.

Parameters:
pingsOverrideEnabled - true to enable users to override the system settings, false to use system settings.

getPingServices

java.lang.String getPingServices()
Returns a comma delimited list of available ping services for the system.

Returns:
a comma delimited list of available ping services for the system.

setPingServices

void setPingServices(java.lang.String services)
Sets the comma delimited list of available ping services for the system.

Parameters:
services - comma delimited list of available ping services for the system.

createBlog

WSBlog createBlog(long userID,
                  java.lang.String blogName,
                  java.lang.String displayName)
                  throws UserNotFoundException
Creates a new blog.

Parameters:
userID - the user ID creating the blog.
blogName - the name of the blog.
displayName - the display name of the blog.
Returns:
a new blog.
Throws:
UserNotFoundException - if the userID does not exist.

createBlogPost

WSBlogPost createBlogPost(java.lang.String subject,
                          java.lang.String body,
                          long blogID,
                          long userID)
                          throws UserNotFoundException,
                                 com.jivesoftware.community.BlogNotFoundException,
                                 RejectedException
Creates a new blog post.

Parameters:
subject - the subject of the blog post.
body - the body content of the blog post.
blogID - the id of the blog to post to.
userID - the user ID creating the blog post.
Returns:
a new blog post.
Throws:
UserNotFoundException - if the userID does not exist.
BlogNotFoundException - if the blogID does not exist.
RejectedException - if the post submission is rejected.

publishBlogPost

WSBlogPost publishBlogPost(java.lang.String subject,
                           java.lang.String body,
                           long blogID,
                           long userID)
                           throws UserNotFoundException,
                                  com.jivesoftware.community.BlogNotFoundException,
                                  RejectedException
Throws:
UserNotFoundException
com.jivesoftware.community.BlogNotFoundException
RejectedException

updateBlogPost

void updateBlogPost(WSBlogPost blogPost)
                    throws com.jivesoftware.community.BlogPostNotFoundException
Throws:
com.jivesoftware.community.BlogPostNotFoundException

deleteBlog

void deleteBlog(long blogID)
                throws com.jivesoftware.community.BlogNotFoundException
Permanently deletes a blog and all of the blog postings and comments associated with the blog.

Parameters:
blogID - the ID of the blog to delete.
Throws:
com.jivesoftware.community.BlogNotFoundException - if the blog could not be loaded or does not exist.

deleteBlogPost

void deleteBlogPost(long blogPostID)
                    throws com.jivesoftware.community.BlogPostNotFoundException
Permanently deletes a blog post and all of the comments associated with the it.

Parameters:
blogPostID - the ID of the blog post to delete.
Throws:
com.jivesoftware.community.BlogPostNotFoundException - if the blog postcould not be loaded or does not exist.

getBlog

WSBlog getBlog(long blogID)
               throws com.jivesoftware.community.BlogNotFoundException
Returns a blog by blog ID.

Parameters:
blogID - the ID of the blog to return.
Returns:
the blog.
Throws:
com.jivesoftware.community.BlogNotFoundException - if the blog could not be loaded or does not exist.

getBlog

WSBlog getBlog(java.lang.String blogName)
               throws com.jivesoftware.community.BlogNotFoundException
Returns a blog by blog blogName.

Parameters:
blogName - the displayName of the blog to return.
Returns:
the blog.
Throws:
com.jivesoftware.community.BlogNotFoundException - if the blog could not be loaded or does not exist.

getBlogPost

WSBlogPost getBlogPost(long blogPostID)
                       throws com.jivesoftware.community.BlogPostNotFoundException
Returns a blog by blog ID.

Parameters:
blogPostID - the ID of the blog to return.
Returns:
the blog post.
Throws:
com.jivesoftware.community.BlogPostNotFoundException - if the blog post could not be loaded or does not exist.

getBlogCount

int getBlogCount()
Returns the total number of blogs on this system.

Returns:
the total number of blogs on this system.

getRecentBlogs

WSBlog[] getRecentBlogs()
Returns (at most) the ten most recent blogs created on this system.

Returns:
(atmost) the ten most recent blogs created on this system.

getBlogPostCount

int getBlogPostCount()
Returns the number of blog posts on the system, by default only includes blog posts where status = WSBlogPost.STATUS_PUBLISH and publish date less than now().

Returns:
the number of blog posts on the system.

getTags

WSTagCount[] getTags()
Returns all tags for blogs in the system.

Returns:
all tags for blogs in the system.

getTags

WSTagCount[] getTags(WSBlogTagResultFilter filter)
Returns all tags for blogs in the system filtered by the BlogTagResultFilter.

Parameters:
filter - the filter to use to restrict tag results
Returns:
all tags for blogs in the system filtered by the BlogTagResultFilter.

getCommentCount

int getCommentCount()
Returns the number of comments on blog posts in the system.

Returns:
the number of comments on blog posts in the system.

userHasBlogs

boolean userHasBlogs(long userID)
                     throws UserNotFoundException
Returns true if the given user has one or more blogs, false if the user does not have a blog.

Parameters:
userID - the user to check to see if they have a blog
Returns:
true if the given user has one or more blogs, false if the user does not have a blog.
Throws:
UserNotFoundException - If the user with the specified id does not exist.

getBlogsForUser

WSBlog[] getBlogsForUser(long userID)
                         throws UserNotFoundException
Returns all blogs which are associated with the given user.

Parameters:
userID - the ID of the user to find blogs for
Returns:
all blogs that user ID is associated with
Throws:
UserNotFoundException - If the user with the specified id does not exist.

getBlogCountForUser

int getBlogCountForUser(long userID)
                        throws UserNotFoundException
Returns the count of all blogs which are associated with the given user.

Parameters:
userID - the ID of the user to find blogs for
Returns:
the count of all blogs which are associated with the given user ID.
Throws:
UserNotFoundException - If the user with the specified id does not exist.

getBlogsByDisplayName

WSBlog[] getBlogsByDisplayName(java.lang.String query,
                               int startIndex,
                               int endIndex,
                               int numResults)
Returns all the blogs on this system whose display name is LIKE the given query.

NOTE: This method is designed only to be used only by administrators for administration purposes and will throw an UnauthorizedException if the current user is not a system administrator.

Parameters:
query - a string to search blog display names by
startIndex - Starting index to grab blogs.
endIndex - Ending index to grab blogs.
numResults - Total number of results to grab.
Returns:
all the blogs on this system whose display name is LIKE the given query.

getBlogCount

WSBlog[] getBlogCount(WSBlogResultFilter filter)
Returns the total number of blogs on this system that match the criteria specified by the ResultFilter.

Parameters:
filter - the besult filter holding the criteria to filter the blog count
Returns:
the total number of blogs on this system that match the criteria specified by the ResultFilter.

getBlogPostCount

int getBlogPostCount(WSBlogPostResultFilter filter)
Returns the number of blog posts on the system. The default blog post result filter (com.jivesoftware.community.BlogPostResultFilter#createDefaultFilter) only includes blog posts where status = com.jivesoftware.community.BlogPost#STATUS_PUBLISH and publish date less than now().

Parameters:
filter - the besult filter holding the criteria to filter the blogposts
Returns:
the number of blog posts on the system that match the criteria specified by the BlogPostResultFilter

getBlogPosts

WSBlogPost[] getBlogPosts(WSBlogPostResultFilter filter)
Returns all the blog posts that match the criteria specified by the BlogPostResultFilter on the entire system.

Parameters:
filter - a BlogPostResultFilter object to perform filtering and sorting with.
Returns:
all the blog posts that match the ResultFilter.

getCommentCount

int getCommentCount(WSFeedbackResultFilter filter)
Returns the number of comments on blog posts that match the criteria specified by the FeedbackResultFilter in the entire system.

Parameters:
filter - a FeedbackResultFilter object to perform filtering and sorting with.
Returns:
the number of comments on blog posts that match the criteria specified by the FeedbackResultFilter in the entire system.

getComments

WSComment[] getComments(WSFeedbackResultFilter filter)
Returns all the comments on blog posts that match the criteria specified by the FeedbackResultFilter in the entire system.

Parameters:
filter - a FeedbackResultFilter object to perform filtering and sorting with.
Returns:
all the comments that match the ResultFilter.

getAttachmentsByBlogPostID

WSAttachment[] getAttachmentsByBlogPostID(long blogPostID)
                                          throws com.jivesoftware.community.BlogPostNotFoundException
Returns an array of attachments that are attached to the specified blog post.

Parameters:
blogPostID - The ID of the blog post to acquire attachments for.
Returns:
An array of attachments that are attached to the specified blog post.
Throws:
com.jivesoftware.community.BlogPostNotFoundException - Thrown if the specified blog post does not exist.

addAttachmentToBlogPost

void addAttachmentToBlogPost(long blogPostID,
                             java.lang.String name,
                             java.lang.String contentType,
                             byte[] source)
                             throws AttachmentException,
                                    com.jivesoftware.community.BlogPostNotFoundException,
                                    java.io.IOException
Adds an attachment to the blog post with the specified ID.

Parameters:
blogPostID - The ID of the blog post.
name - The name of the attachment.
contentType - the content type of the attachment.
source - The content for the attachment.
Throws:
java.io.IOException - Thrown if there are issues adding the blog post.
AttachmentException - Thrown if the attachment cannot be created.
com.jivesoftware.community.BlogPostNotFoundException - Thrown if the specified blog post does not exist.

getImagesByBlogPostID

WSImage[] getImagesByBlogPostID(long blogPostID)
                                throws com.jivesoftware.community.BlogPostNotFoundException
Returns an array of images that are attached to the specified blog post.

Parameters:
blogPostID - The ID of the blog post to acquire images for.
Returns:
An array of images that are attached to the specified blog post.
Throws:
com.jivesoftware.community.BlogPostNotFoundException - Thrown if the specified blog post does not exist.

addImageToBlogPost

void addImageToBlogPost(long blogPostID,
                        java.lang.String name,
                        java.lang.String contentType,
                        byte[] source)
                        throws com.jivesoftware.community.ImageException,
                               com.jivesoftware.community.BlogPostNotFoundException,
                               java.io.IOException
Adds an image to the blog post with the specified ID.

Parameters:
blogPostID - The ID of the blog post.
name - The name of the image.
contentType - the content type of the image.
source - The content for the image.
Throws:
java.io.IOException - Thrown if there are issues adding the blog post.
com.jivesoftware.community.ImageException - Thrown if the image cannot be created.
com.jivesoftware.community.BlogPostNotFoundException - Thrown if the specified blog post does not exist.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.