Clearspace API (1.10.16) 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
 Community createCommunity(java.lang.String name, java.lang.String displayName, java.lang.String description)
          Creates a new Community as a sub-community of the root community using the name and description.
 Community createSubCommunity(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.
 Community getCommunity(long communityID)
          Returns a Community by its id
 long[] getDocumentIDs(long communityID)
          Returns document IDs for all the published documents in the community.
 Property[] 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.
 Community[] getRecursiveCommunities()
          Returns all of the communities in the system recursively.
 Community[] getRecursiveCommunitiesByCommunityID(long communityID)
          Returns all of the communities under the specified community recursively.
 int getRecursiveCommunityCount()
          Returns a count of all the communities in the system.
 int getRecursiveCommunityCountByCommunityID(long communityID)
          Returns a count of call the communities under a community
 Community getRootCommunity()
          Returns the root community in the system.
 Community[] 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(Community community)
          Update a Community
 

Method Detail

getCommunity

Community getCommunity(long communityID)
                       throws CommunityNotFoundException
Returns a Community 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

Community createCommunity(java.lang.String name,
                          java.lang.String displayName,
                          java.lang.String description)
                          throws NameAlreadyExistsException
Creates a new Community as a sub-community of the root community using the name and description.

Parameters:
name - the name of the new community.
displayName - the display name of the new community
description - the description of the new community.
Returns:
a new Community.
Throws:
NameAlreadyExistsException

createSubCommunity

Community createSubCommunity(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

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(Community 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

Property[] 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.

getRecursiveCommunities

Community[] getRecursiveCommunities()
Returns all of the communities in the system recursively.

Returns:
all of the communities in the system recursively.

getSubCommunities

Community[] 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.

getRootCommunity

Community getRootCommunity()
Returns the root community in the system.

Returns:
the root community in the system.

getRecursiveCommunitiesByCommunityID

Community[] getRecursiveCommunitiesByCommunityID(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()
Returns a count of all the communities in the system.

Returns:
count of the communities

getRecursiveCommunityCountByCommunityID

int getRecursiveCommunityCountByCommunityID(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

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

Clearspace Project Page

Copyright © 1999-2007 Jive Software.