Clearspace API (2.0.15) Web Services Client Javadocs

com.jivesoftware.community.webservices
Class WSCommunity

java.lang.Object
  extended by com.jivesoftware.community.webservices.WSJiveObject
      extended by com.jivesoftware.community.webservices.WSJiveContainer
          extended by com.jivesoftware.community.webservices.WSCommunity

public class WSCommunity
extends WSJiveContainer

A container for threads and a hierarchy of other communities. In other words, the community structure is a tree, with lists of communities for every community node. There is always a "root" community (ID of 1), of which all other communities are children.


Field Summary
protected  int communityCount
           
protected  int communityDepth
           
protected  WSLocale finalLocale
           
protected  long latestMessageID
           
protected  WSLocale locale
           
protected  int messageCount
           
protected  long parentCommunityID
           
protected  int recursiveCommunityCount
           
protected  int threadCount
           
 
Fields inherited from class com.jivesoftware.community.webservices.WSJiveContainer
availableContentTypes, contentTypes, creationDate, description, displayName, modificationDate, name
 
Fields inherited from class com.jivesoftware.community.webservices.WSJiveObject
id, objectType
 
Constructor Summary
WSCommunity()
           
 
Method Summary
 int getCommunityCount()
          Returns the number of community in the community.
 int getCommunityDepth()
          Returns the depth of a this community relative to the root.
 WSLocale getFinalLocale()
          Returns the locale for this community.
 long getLatestMessageID()
          Returns the most recently created or edited message in this community (including all sub-communities).
 WSLocale getLocale()
          Returns the locale for this community.
 int getMessageCount()
          Returns the number of messages in the community.
 long getParentCommunityID()
          Returns ID of the parent community of this community.
 int getRecursiveCommunityCount()
          Returns the number of communities in the community and all sub-communities.
 int getThreadCount()
          Returns number of thread in the community and all sub-communities
 void setCommunityCount(int communityCount)
           
 void setCommunityDepth(int communityDepth)
           
 void setFinalLocale(WSLocale finalLocale)
           
 void setLatestMessageID(long latestMessageID)
           
 void setLocale(WSLocale locale)
          Sets the locale for this community.
 void setMessageCount(int messageCount)
           
 void setParentCommunityID(long parentCommunityID)
           
 void setRecursiveCommunityCount(int recursiveCommunityCount)
           
 void setThreadCount(int threadCount)
           
 
Methods inherited from class com.jivesoftware.community.webservices.WSJiveContainer
equals, getAvailableContentTypes, getContentTypes, getCreationDate, getDescription, getDisplayName, getModificationDate, getName, hashCode, setAvailableContentTypes, setContentTypes, setCreationDate, setDescription, setDisplayName, setModificationDate, setName, toString
 
Methods inherited from class com.jivesoftware.community.webservices.WSJiveObject
getID, getObjectType, setID, setObjectType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

locale

protected WSLocale locale

finalLocale

protected WSLocale finalLocale

communityCount

protected int communityCount

recursiveCommunityCount

protected int recursiveCommunityCount

threadCount

protected int threadCount

messageCount

protected int messageCount

latestMessageID

protected long latestMessageID

parentCommunityID

protected long parentCommunityID

communityDepth

protected int communityDepth
Constructor Detail

WSCommunity

public WSCommunity()
Method Detail

getLocale

public WSLocale getLocale()
Returns the locale for this community. A locale specifies language and country codes, and is used for internationalization. If a locale has not been specified for this community, this method will return 0. If you want to get the inherited locale for this community, you should call getFinalLocale().

Returns:
the locale for this community.

setLocale

public void setLocale(WSLocale locale)
Sets the locale for this community. A locale specifies language and country codes, and is used for internationalization.

Parameters:
locale - the locale of this community.

getFinalLocale

public WSLocale getFinalLocale()
Returns the locale for this community. A locale specifies language and country codes, and is used for internationalization. If a locale has not been specified for this community, this method will return an inherited locale. A community will inherit the locale from it's chain of parent communities, if one exists. Otherwise it will inherit the default locale used by Jive. If you want to get the explicit locale for this community, you should call getLocale().

Returns:
the final locale for this community.

setFinalLocale

public void setFinalLocale(WSLocale finalLocale)

getCommunityCount

public int getCommunityCount()
Returns the number of community in the community.

Returns:
the number of community in the community.

setCommunityCount

public void setCommunityCount(int communityCount)

getRecursiveCommunityCount

public int getRecursiveCommunityCount()
Returns the number of communities in the community and all sub-communities.

Returns:
the number of communities in the community and sub-communities.

setRecursiveCommunityCount

public void setRecursiveCommunityCount(int recursiveCommunityCount)

getThreadCount

public int getThreadCount()
Returns number of thread in the community and all sub-communities.

Returns:
the number of threads in the community.

setThreadCount

public void setThreadCount(int threadCount)

getMessageCount

public int getMessageCount()
Returns the number of messages in the community.

Returns:
the number of messages in the community.

setMessageCount

public void setMessageCount(int messageCount)

getLatestMessageID

public long getLatestMessageID()
Returns the most recently created or edited message in this community (including all sub-communities). If there are no messages in this community, this method will return 0. This information could also be determined using a ThreadResultFilter, but this method offers a simpler, more optimized way to access the data.

Returns:
the most recently created or edited message in this community.

setLatestMessageID

public void setLatestMessageID(long latestMessageID)

getParentCommunityID

public long getParentCommunityID()
Returns ID of the parent community of this community. This method will return 0 if the current community is the root community.

Returns:
the parent community of this community.

setParentCommunityID

public void setParentCommunityID(long parentCommunityID)

getCommunityDepth

public int getCommunityDepth()
Returns the depth of a this community relative to the root. For example, consider the following tree (where 1 is the root community):
   1
   |-- 3
   |-- |-- 4
   |-- |-- |-- 7
 
The depth of message 4 is 2, the depth of community 7 is 3, etc.

Returns:
the depth of the community in the community tree.

setCommunityDepth

public void setCommunityDepth(int communityDepth)

Clearspace Project Page

Copyright © 1999-2007 Jive Software.