Clearspace API (2.0.15) Web Services Client Javadocs

com.jivesoftware.community.webservices
Interface CommunityService


public interface CommunityService

Provides the ability to manipulate communities. This service will allow you to create, delete, move and acquire communities.


Method Summary
 WSCommunity createCommunity(java.lang.String name, java.lang.String displayName, java.lang.String description, long communityID)
          Creates a new Community as a sub-community off of the specified community.
 void deleteCommunity(long communityID)
          Used to delete the specified community
 void deleteProperty(java.lang.String name, long communityID)
          Delete a property with the given name from the community with the given id.
 WSCommunity getCommunity(long communityID)
          Returns a WSCommunity by its id
 java.util.List<java.lang.Long> getDocumentIDs(long communityID)
          Returns document IDs for all the published documents in the community.
 java.util.List<WSProperty> getProperties(long communityID)
          Returns all tbe extended properties for the community with the specified id.
 java.lang.String getProperty(java.lang.String name, long communityID)
          Returns a specific extended property for the community with the specified property name and community ID.
 java.util.List<WSCommunity> getRecursiveCommunities()
           
 java.util.List<WSCommunity> getRecursiveCommunities(long communityID)
          Returns all of the communities under the specified community recursively.
 int getRecursiveCommunityCount(long communityID)
          Returns a count of call the communities under a community
 java.util.List<WSCommunity> getSubCommunities(long communityID)
          Returns all the sub communities for the parent community.
 void setProperty(java.lang.String name, java.lang.String value, long communityID)
          Set an extended propery for the community with the given community id.
 void updateCommunity(WSCommunity community)
          Update a Community
 

Method Detail

getCommunity

WSCommunity getCommunity(long communityID)
                         throws CommunityNotFoundException
Returns a WSCommunity by its id

Parameters:
communityID - id of the community
Returns:
the Community object the id
Throws:
CommunityNotFoundException - If the community specified does not exist.

createCommunity

WSCommunity createCommunity(java.lang.String name,
                            java.lang.String displayName,
                            java.lang.String description,
                            long communityID)
                            throws CommunityNotFoundException,
                                   NameAlreadyExistsException
Creates a new Community as a sub-community off of the specified community.

Parameters:
name - the name of the new community.
displayName - the display name of the new community.
description - the description of the new community.
communityID - Community to use as the parent
Returns:
a new Community.
Throws:
CommunityNotFoundException - If the community specified does not exist.
NameAlreadyExistsException - Thrown if a community with the specified display name already exists.

deleteCommunity

void deleteCommunity(long communityID)
                     throws CommunityNotFoundException
Used to delete the specified community

Parameters:
communityID - the id of the community to delete
Throws:
CommunityNotFoundException - If the specified community does not exist.

updateCommunity

void updateCommunity(WSCommunity community)
                     throws CommunityNotFoundException,
                            NameAlreadyExistsException
Update a Community

Parameters:
community - the community to update
Throws:
CommunityNotFoundException - If the specified community does not exist.
NameAlreadyExistsException - If an updated display name already exists.

getProperties

java.util.List<WSProperty> getProperties(long communityID)
                                         throws CommunityNotFoundException
Returns all tbe extended properties for the community with the specified id.

Parameters:
communityID - id of the community to retrieve properties for.
Returns:
an array of properties for the community with the given id.
Throws:
CommunityNotFoundException - If the specified community does not exist.

getProperty

java.lang.String getProperty(java.lang.String name,
                             long communityID)
                             throws CommunityNotFoundException
Returns a specific extended property for the community with the specified property name and community ID.

Parameters:
name - The name of the property.
communityID - The ID of the community to get the extended property for.
Returns:
the value of the property, null if not found.
Throws:
CommunityNotFoundException - If the specified community does not exist.

setProperty

void setProperty(java.lang.String name,
                 java.lang.String value,
                 long communityID)
                 throws CommunityNotFoundException
Set an extended propery for the community with the given community id.

Parameters:
name - The name of the property.
value - The value of the property.
communityID - The ID of the community to set an extended property for.
Throws:
CommunityNotFoundException - If the specified community does not exist.

deleteProperty

void deleteProperty(java.lang.String name,
                    long communityID)
                    throws CommunityNotFoundException
Delete a property with the given name from the community with the given id.

Parameters:
name - the name of the property to delete.
communityID - id of the community to delete the property from.
Throws:
CommunityNotFoundException - If the specified community does not exist.

getSubCommunities

java.util.List<WSCommunity> getSubCommunities(long communityID)
                                              throws CommunityNotFoundException
Returns all the sub communities for the parent community.

Parameters:
communityID - The id of the parent community.
Returns:
Return the community with the speicfied name.
Throws:
CommunityNotFoundException - Thrown if the specified community does not exist.

getRecursiveCommunities

java.util.List<WSCommunity> getRecursiveCommunities(long communityID)
                                                    throws CommunityNotFoundException
Returns all of the communities under the specified community recursively.

Parameters:
communityID - The id of the community.
Returns:
All of the communities under the community.
Throws:
CommunityNotFoundException - Thrown if the community does not exist.

getRecursiveCommunityCount

int getRecursiveCommunityCount(long communityID)
                               throws CommunityNotFoundException
Returns a count of call the communities under a community

Parameters:
communityID - The id of the community.
Returns:
count of the communities
Throws:
CommunityNotFoundException - Thrown if the community does not exist.

getDocumentIDs

java.util.List<java.lang.Long> getDocumentIDs(long communityID)
                                              throws CommunityNotFoundException
Returns document IDs for all the published documents in the community. Does not traverse the subcommunities.

Parameters:
communityID - The id of the community.
Returns:
the IDs of published Document objects for all the documents in the community
Throws:
CommunityNotFoundException - If the community with the specified id does not exist.

getRecursiveCommunities

java.util.List<WSCommunity> getRecursiveCommunities()

Clearspace Project Page

Copyright © 1999-2007 Jive Software.