Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.community
Interface Community

All Superinterfaces:
AttachmentContentResource, JiveContainer, JiveHierarchicalContainer, JiveObject

public interface Community
extends JiveHierarchicalContainer, AttachmentContentResource

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

Community names are not unique, therefore it is not possible to load a community by name.

See Also:
CommunityManager.getRootCommunity(), CommunityManager.getCommunity(long)

Method Summary
 Locale getFinalLocale()
          Returns the locale for this community.
 Locale getLocale()
          Returns the locale for this community.
 int getModerationDefaultMessageValue()
          Returns the default number of moderation points for messages created in the community.
 int getModerationDefaultThreadValue()
          Returns the default number of moderation points for threads created in the community.
 Community getParentCommunity()
          Deprecated. use getParentContainer instead
 Community getParentContainer()
          Returns the parent community of this community.
 int getViewCount()
          Returns the number of times this thread has been community.
 boolean isRead(User user)
          Returns true if this community has been read by the user, false otherwise.
 boolean isUnread(User user)
          Returns true if this community has not been read by the user, false otherwise.
 boolean isUpdated(User user)
          Returns true if this community has been updated since read by the user, false otherwise.
 void setLocale(Locale locale)
          Sets the locale for this community.
 void setModerationDefaultMessageValue(int value)
          Sets the default number of moderation points for threads created in the community.
 void setModerationDefaultThreadValue(int value)
          Sets the default number of moderation points for threads created in the community.
 
Methods inherited from interface com.jivesoftware.community.JiveContainer
getAvailableContentTypes, getContentTypes, getCreationDate, getDescription, getDisplayName, getInterceptorManager, getModificationDate, getName, getPermissions, getPermissionsManager, getProperties, getTaggableTypes, isAuthorized, setContentTypes, setCreationDate, setDescription, setDisplayName, setModificationDate, setName
 
Methods inherited from interface com.jivesoftware.community.JiveObject
getID, getObjectType
 

Method Detail

getLocale

Locale 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 null. If you want to get the inherited locale for this community, you should call getFinalLocale().

Returns:
the locale for this community.

setLocale

void setLocale(Locale locale)
               throws UnauthorizedException
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.
Throws:
UnauthorizedException - if does not have admin permissions.

getFinalLocale

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

getParentCommunity

@Deprecated
Community getParentCommunity()
Deprecated. use getParentContainer instead

Returns the parent community of this community. This method will return null if the current community is the root community.

Returns:
the parent community of this community.
See Also:
JiveHierarchicalContainer.getParentContainer(), getParentContainer()

getParentContainer

Community getParentContainer()
Returns the parent community of this community. This method will return null if the current community is the root community.

Specified by:
getParentContainer in interface JiveHierarchicalContainer
Returns:
the parent community of this community.

isRead

boolean isRead(User user)
Returns true if this community has been read by the user, false otherwise.

Parameters:
user - the user to check read stats for this community
Returns:
true if this community has been read by the user, false otherwise

isUnread

boolean isUnread(User user)
Returns true if this community has not been read by the user, false otherwise.

Parameters:
user - the user to check read stats for this community
Returns:
true if this community has not been read by the user, false otherwise

isUpdated

boolean isUpdated(User user)
Returns true if this community has been updated since read by the user, false otherwise.

Parameters:
user - the user to check read stats for this community
Returns:
true if this community has been updated since read by the user, false otherwise

getViewCount

int getViewCount()
Returns the number of times this thread has been community. A return value of -1 indicates the number of views is unknown or that the feature is disabled.

Returns:
the number of times this community has been viewed or -1 if the value is not known.

getModerationDefaultThreadValue

int getModerationDefaultThreadValue()
Returns the default number of moderation points for threads created in the community. This value is used to turn moderation on or off. A default value of 0 is used to turn moderation on, and a default value of 1 is used to turn it off.

Returns:
the default number of moderation points assigned to threads.

setModerationDefaultThreadValue

void setModerationDefaultThreadValue(int value)
                                     throws UnauthorizedException
Sets the default number of moderation points for threads created in the community. This value is used to turn moderation on or off. A default value of 0 is used to turn moderation on, and a default value of 1 is used to turn it off.

Parameters:
value - default number of moderation points for threads.
Throws:
UnauthorizedException - if does not have permission.

getModerationDefaultMessageValue

int getModerationDefaultMessageValue()
Returns the default number of moderation points for messages created in the community. This value is used to turn moderation on or off. A default value of 0 is used to turn moderation on, and a default value of 1 is used to turn it off.

Returns:
the default number of moderation points assigned to messages.

setModerationDefaultMessageValue

void setModerationDefaultMessageValue(int value)
                                      throws UnauthorizedException
Sets the default number of moderation points for threads created in the community. This value is used to turn moderation on or off. A default value of 0 is used to turn moderation on, and a default value of 1 is used to turn it off.

Parameters:
value - default number of moderation points for messages.
Throws:
UnauthorizedException - if does not have permission.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.