Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.proxy
Class ForumProxy

java.lang.Object
  extended by com.jivesoftware.forum.proxy.ForumProxy
All Implemented Interfaces:
Forum

public class ForumProxy
extends java.lang.Object
implements Forum

A protection proxy for Forums. A proxy has a set of permissions that are specified at creation time of the proxy. Subsequently, those permissions are use to restrict access to protected Forum methods. If a user does not have the right to execute a particular method, an UnauthorizedException is thrown.

See Also:
Forum

Constructor Summary
ForumProxy(Forum forum, AuthToken authToken, Permissions permissions)
          Creates a new ForumProxy object.
 
Method Summary
 void addThread(ForumThread thread)
          Adds a new thread to the forum.
 ForumMessage createMessage()
          Factory method to create a message with an anonymous author.
 ForumMessage createMessage(User user)
          Factory method to create a message as the specified user.
 Query createQuery()
          Creates a query object to search the forum.
 ForumThread createThread(ForumMessage rootMessage)
          Factory method to create a new thread.
 void deleteProperty(java.lang.String name)
          Deletes an extended property.
 void deleteThread(ForumThread thread)
          Deletes a thread and all of its messages.
 boolean equals(java.lang.Object object)
           
 java.util.Date getCreationDate()
          Returns the Date that the forum was created.
 java.lang.String getDescription()
          Returns the description of the forum.
 java.util.Locale getFinalLocale()
          Returns the locale for this forum.
 ForumCategory getForumCategory()
          Returns the forum category that this forum belongs to.
 long getID()
          Returns the unique id of the forum.
 InterceptorManager getInterceptorManager()
          Returns an interceptor manager that can be used to manage the interceptors for this forum.
 ForumMessage getLatestMessage()
          Returns the most recently created or edited message in this forum.
 java.util.Locale getLocale()
          Returns the locale for this forum.
 int getMaxForumIndex()
          Returns the largest forum index value for a message in the forum.
 int getMessageCount()
          Returns the number of messages in the forum.
 int getMessageCount(ResultFilter resultFilter)
          Returns the number of messages in the forum based on the specified ResultFilter.
 ForumMessageIterator getMessages()
          Returns an Iterator for all the messages in the forum.
 ForumMessageIterator getMessages(ResultFilter resultFilter)
          Returns a Iterator for all the messages in the forum that match the criteria specified by the ResultFilter.
 int getMinForumIndex()
          Returns the smallest forum index value for a message in the forum.
 int getModerationDefaultMessageValue()
          Returns the default number of moderation points for messages created in the forum.
 int getModerationDefaultThreadValue()
          Returns the default number of moderation points for threads created in the forum.
 java.util.Date getModificationDate()
          Returns the Date that the forum was last modified.
 java.lang.String getName()
          Returns the name of the forum.
 java.lang.String getNNTPName()
          Returns the NNTP name for the forum, which is the name of the forum used in the NNTP protocol (newsgroups).
 Permissions getPermissions(AuthToken authToken)
          Returns the permissions for the forum that correspond to the passed-in AuthToken.
 PermissionsManager getPermissionsManager()
          Returns a permissions manager that can be used to set permissions for this forum.
 java.util.Iterator getPopularThreads()
          Returns an Iterator for the most popular threads in the forum.
 java.util.Collection getProperties(java.lang.String parentName)
          Return all immediate children property values of a parent property as an unmodifiable Collection of String values.
 java.lang.String getProperty(java.lang.String name)
          Returns an extended property of the forum.
 java.util.Iterator getPropertyNames()
          Returns an Iterator for the names of the forum properties.
 Forum getProxiedForum()
          Returns the forum class that the proxy wraps.
 ForumRenderManager getRenderManager()
          Returns a render manager that can be used to manage render filters and macros for this forum.
 java.util.Map getTags()
          Returns all tags for a given forum in a Map where the key is the name of tag and the value is the number of times the tag has been used in this forum.
 java.util.Map getTags(TagResultFilter resultFilter)
          Returns all tags for a given forum in a Map where the key is the name of tag and the value is the number of times the tag has been used in this forum filtered by the TagResultFilter.
 ForumThread getThread(long threadID)
          Returns the thread specified by id.
 int getThreadCount()
          Returns the number of threads in the forum.
 int getThreadCount(ResultFilter resultFilter)
          Returns the number of threads in the forum based on the specified ResultFilter.
 ForumThreadIterator getThreads()
          Returns a Iterator for all the threads in the forum.
 ForumThreadIterator getThreads(ResultFilter resultFilter)
          Returns a Iterator for all the threads in the forum that match the criteria specified by the ResultFilter.
 int hashCode()
           
 boolean isAuthorized(long type)
          Returns true if the handle on the object has the permission specified.
 void moveThread(ForumThread thread, Forum newForum)
          Moves a thread from one forum to another.
 void setCreationDate(java.util.Date creationDate)
          Sets the creation date of the forum.
 void setDescription(java.lang.String description)
          Sets the description of the forum.
 void setLocale(java.util.Locale locale)
          Sets the locale for this forum.
 void setModerationDefaultMessageValue(int value)
          Sets the default number of moderation points for threads created in the forum.
 void setModerationDefaultThreadValue(int value)
          Sets the default number of moderation points for threads created in the forum.
 void setModificationDate(java.util.Date modificationDate)
          Sets the date the forum was last modified.
 void setName(java.lang.String name)
          Sets the name of a the forum.
 void setNNTPName(java.lang.String nntpName)
          Sets the NNTP name for the forum, which is the name of the forum used in the NNTP protocol (newsgroups).
 void setProperty(java.lang.String name, java.lang.String value)
          Sets an extended property of the forum.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForumProxy

public ForumProxy(Forum forum,
                  AuthToken authToken,
                  Permissions permissions)
Creates a new ForumProxy object.

Parameters:
forum - the forum to protect by proxy
authToken - the user's auth token
permissions - the permissions to use with this proxy.
Method Detail

getID

public long getID()
Description copied from interface: Forum
Returns the unique id of the forum.

Specified by:
getID in interface Forum
Returns:
the unique id of the forum.

getName

public java.lang.String getName()
Description copied from interface: Forum
Returns the name of the forum.

Specified by:
getName in interface Forum
Returns:
the name of the forum.

setName

public void setName(java.lang.String name)
             throws UnauthorizedException
Description copied from interface: Forum
Sets the name of a the forum.

Specified by:
setName in interface Forum
Parameters:
name - the name of the forum.
Throws:
UnauthorizedException - if does not have admin permissions.

getNNTPName

public java.lang.String getNNTPName()
Description copied from interface: Forum
Returns the NNTP name for the forum, which is the name of the forum used in the NNTP protocol (newsgroups). NNTP names must be unique in the system and typically contain category information in the name. For example, consider the forum named "Support" in the category "Product X". The NNTP name for the forum might be "product_x.support". However, this naming scheme is merely by convention; the NNTP name for a forum can be anything as long as it is unique in the system and conforms to NNTP naming conventions.

NNTP names must follow certain rules. In particular:

Specified by:
getNNTPName in interface Forum
Returns:
the NNTP name of the forum.

setNNTPName

public void setNNTPName(java.lang.String nntpName)
                 throws UnauthorizedException,
                        NameAlreadyExistsException
Description copied from interface: Forum
Sets the NNTP name for the forum, which is the name of the forum used in the NNTP protocol (newsgroups). NNTP names must be unique in the system and typically contain category information in the name. For example, consider the forum named "Support" in the category "Product X". The NNTP name for the forum might be "product_x.support". However, this naming scheme is merely by convention; the NNTP name for a forum can be anything as long as it is unique in the system and conforms to NNTP naming conventions.

NNTP names must follow certain rules. Therefore, any name passed into this method will automatically converted based on the following rules:

Specified by:
setNNTPName in interface Forum
Parameters:
nntpName - the NNTP name of the forum.
Throws:
UnauthorizedException - if does not have admin permissions.
NameAlreadyExistsException - if attempting to use an existing NNTP name.

getDescription

public java.lang.String getDescription()
Description copied from interface: Forum
Returns the description of the forum. A description should normally be no longer than thirty words so that it can be easily displayed in a list of forums on a web page.

Specified by:
getDescription in interface Forum
Returns:
the description of the forum.

setDescription

public void setDescription(java.lang.String description)
                    throws UnauthorizedException
Description copied from interface: Forum
Sets the description of the forum. A description should normally be no longer than thirty words so that it can be easily displayed in a list of forums on a web page.

Specified by:
setDescription in interface Forum
Parameters:
description - the description of the forum.
Throws:
UnauthorizedException - if does not have ADMIN permissions.

getCreationDate

public java.util.Date getCreationDate()
Description copied from interface: Forum
Returns the Date that the forum was created.

Specified by:
getCreationDate in interface Forum
Returns:
the Date the forum was created.

setCreationDate

public void setCreationDate(java.util.Date creationDate)
                     throws UnauthorizedException
Description copied from interface: Forum
Sets the creation date of the forum. In most cases, the creation date will default to when the forum was entered into the system. However, the creation date needs to be set manually when importing data. In other words, skin authors should ignore this method since it only intended for system maintenance.

Specified by:
setCreationDate in interface Forum
Parameters:
creationDate - the date the forum was created.
Throws:
UnauthorizedException - if does not have ADMIN permissions.

getModificationDate

public java.util.Date getModificationDate()
Description copied from interface: Forum
Returns the Date that the forum was last modified. In other words, the date of the most recent message or thread in the forum.

Specified by:
getModificationDate in interface Forum
Returns:
the Date the forum was last modified.

setModificationDate

public void setModificationDate(java.util.Date modificationDate)
                         throws UnauthorizedException
Description copied from interface: Forum
Sets the date the forum was last modified. In most cases, last modifed will default to when the forum data was last changed. However, the last modified date needs to be set manually when importing data. In other words, skin authors should ignore this method since it only intended for system maintenance.

Specified by:
setModificationDate in interface Forum
Parameters:
modificationDate - the date the forum was modified.
Throws:
UnauthorizedException - if does not have ADMIN permissions.

getModerationDefaultThreadValue

public int getModerationDefaultThreadValue()
Description copied from interface: Forum
Returns the default number of moderation points for threads created in the forum. 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.

Specified by:
getModerationDefaultThreadValue in interface Forum
Returns:
the default number of moderation points assigned to threads.

setModerationDefaultThreadValue

public void setModerationDefaultThreadValue(int value)
                                     throws UnauthorizedException
Description copied from interface: Forum
Sets the default number of moderation points for threads created in the forum. 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.

Specified by:
setModerationDefaultThreadValue in interface Forum
Parameters:
value - default number of moderation points for threads.
Throws:
UnauthorizedException - if does not have permission.

getModerationDefaultMessageValue

public int getModerationDefaultMessageValue()
Description copied from interface: Forum
Returns the default number of moderation points for messages created in the forum. 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.

Specified by:
getModerationDefaultMessageValue in interface Forum
Returns:
the default number of moderation points assigned to messages.

setModerationDefaultMessageValue

public void setModerationDefaultMessageValue(int value)
                                      throws UnauthorizedException
Description copied from interface: Forum
Sets the default number of moderation points for threads created in the forum. 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.

Specified by:
setModerationDefaultMessageValue in interface Forum
Parameters:
value - default number of moderation points for messages.
Throws:
UnauthorizedException - if does not have permission.

getMinForumIndex

public int getMinForumIndex()
Description copied from interface: Forum
Returns the smallest forum index value for a message in the forum. The forum index is used to track when messages enter the forum. Each forum index is assigned to a message once and then never re-used. So, there may be gaps in forum index values as messages are deleted, archived, or moved. Still, a rough estimate of the number of messages in the system is max(forumIndex) - min(forumIndex) + 1;

Specified by:
getMinForumIndex in interface Forum
Returns:
the smallest forum index in the forum.

getMaxForumIndex

public int getMaxForumIndex()
Description copied from interface: Forum
Returns the largest forum index value for a message in the forum. The forum index is used to track when messages enter the forum. Each forum index is assigned to a message once and then never re-used. So, there may be gaps in forum index values as messages are deleted, archived, or moved. Still, a rough estimate of the number of messages in the system is max(forumIndex) - min(forumIndex) + 1;

Specified by:
getMaxForumIndex in interface Forum
Returns:
the largest forum index in the forum.

getLocale

public java.util.Locale getLocale()
Description copied from interface: Forum
Returns the locale for this forum. A locale specifies language and country codes, and is used for internationalization. If a locale has not been specified for this forum, this method will return null. If you want to get the inherited locale for this forum, you should call getFinalLocale().

Specified by:
getLocale in interface Forum
Returns:
the locale for this forum.

setLocale

public void setLocale(java.util.Locale locale)
               throws UnauthorizedException
Description copied from interface: Forum
Sets the locale for this forum. A locale specifies language and country codes, and is used for internationalization.

Specified by:
setLocale in interface Forum
Parameters:
locale - the locale of this forum.
Throws:
UnauthorizedException - if does not have admin permissions.

getFinalLocale

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

Specified by:
getFinalLocale in interface Forum
Returns:
the final locale for this forum.

getProperty

public java.lang.String getProperty(java.lang.String name)
Description copied from interface: Forum
Returns an extended property of the forum. Each forum can have an arbitrary number of extended properties. This allows for enhanced functionality that is not part of the base interface.

Specified by:
getProperty in interface Forum
Parameters:
name - the name of the property to get.
Returns:
the value of the property specified by name.

getProperties

public java.util.Collection getProperties(java.lang.String parentName)
Description copied from interface: Forum
Return all immediate children property values of a parent property as an unmodifiable Collection of String values. A parent/child relationship is denoted by the "." character. For example, given the properties X.Y.A, X.Y.B, X.Y.C and X.Y.C.D, then the immediate child properties of X.Y are X.Y.A, X.Y.B, and X.Y.C (the value of X.Y.C.D would not be returned using this method).

Specified by:
getProperties in interface Forum
Parameters:
parentName - the name of the parent property to return the children for.
Returns:
all Collection of all child property values for the given parent.

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
                 throws UnauthorizedException
Description copied from interface: Forum
Sets an extended property of the forum. Each forum can have an arbitrary number of extended properties. This allows for enhanced functionality that is not part of the base interface.

If the property referenced by name already exists, its value will be updated.

Specified by:
setProperty in interface Forum
Parameters:
name - the name of the property to set.
value - the new value for the property.
Throws:
UnauthorizedException - if does not have ADMIN permissions.

deleteProperty

public void deleteProperty(java.lang.String name)
                    throws UnauthorizedException
Description copied from interface: Forum
Deletes an extended property. If the property specified by name does not exist, this method will do nothing.

Specified by:
deleteProperty in interface Forum
Parameters:
name - the name of the property to delete.
Throws:
UnauthorizedException - if does not have ADMIN permissions.

getPropertyNames

public java.util.Iterator getPropertyNames()
Description copied from interface: Forum
Returns an Iterator for the names of the forum properties.

Specified by:
getPropertyNames in interface Forum
Returns:
an Iterator for the names of the forum properties.

deleteThread

public void deleteThread(ForumThread thread)
                  throws UnauthorizedException
Description copied from interface: Forum
Deletes a thread and all of its messages. Once a thread is deleted, the thread object should no longer be used. The search index and other resources that referenced the thread and its messages will also be updated appropriately.

Specified by:
deleteThread in interface Forum
Parameters:
thread - the thread to delete.
Throws:
UnauthorizedException - if not an admin or moderator.

moveThread

public void moveThread(ForumThread thread,
                       Forum newForum)
                throws UnauthorizedException,
                       java.lang.IllegalArgumentException
Description copied from interface: Forum
Moves a thread from one forum to another. For this to work, the thread must exist in the forum that this method is invoked on, and the user calling this method must have admin or moderator permissions for the forum this method is invoked on and newForum.

The main purpose of this method is to allow admins to move non-topical threads into a more appropriate forum.

Specified by:
moveThread in interface Forum
Parameters:
thread - the thread to move to another forum.
newForum - the forum to move the thread to.
Throws:
UnauthorizedException - if does not have admin or moderator permissions for this forum and newForum.
java.lang.IllegalArgumentException - if thread does not belong to the forum that this method was invoked on.

addThread

public void addThread(ForumThread thread)
               throws MessageRejectedException,
                      UnauthorizedException
Description copied from interface: Forum
Adds a new thread to the forum.

Adding an existing thread to a forum is illegal. Instead, the moveForum method should be used.

Specified by:
addThread in interface Forum
Parameters:
thread - the thread to add to the forum.
Throws:
MessageRejectedException - if one of the installed interceptors prevents the root message from being posted.
UnauthorizedException - if does not have CREATE_THREAD permissions.

createThread

public ForumThread createThread(ForumMessage rootMessage)
                         throws UnauthorizedException
Description copied from interface: Forum
Factory method to create a new thread. A root message must be supplied when creating the thread. The root message can either be a new message (normal case), or an existing message in a thread. When a new message is being used, the following pattern should be applied to add a new thread to a forum: When an existing message is passed to this method, the effect will be to create a new thread with the existing message and all of its children (the messages will be removed from the old thread). This is useful if an off-topic conversation begins in a thread which should be branched into a new thread.

Note: creating the ForumThread object is only one step of the process. You must also add the thread to the forum with the addThread(ForumThread) method before it is saved to the database. It is illegal to create a thread in one forum and then add it to another forum.

Specified by:
createThread in interface Forum
Parameters:
rootMessage - the root message of the thread.
Returns:
a new ForumThread object.
Throws:
UnauthorizedException - if does not have CREATE_THREAD permissions.

createMessage

public ForumMessage createMessage()
Description copied from interface: Forum
Factory method to create a message with an anonymous author. After the message is created, all fields should be set, and then the message can be used to create a new thread or can be added to an existing thread.

Note: creating the ForumMessage object is only one step of the process. You must also add the message to a thread before it is saved to the database. It is illegal to create a message in one forum and then add it to a thread in another forum.

Specified by:
createMessage in interface Forum
Returns:
a new ForumMessage object.

createMessage

public ForumMessage createMessage(User user)
                           throws UnauthorizedException
Description copied from interface: Forum
Factory method to create a message as the specified user. After the message is created, all fields should be set, and then the message can be used to create a new thread or can be added to an existing thread.

Note: creating the ForumMessage object is only one step of the process. You must also add the message to a thread before it is saved to the database. It is illegal to create a message in one forum and then add it to a thread in another forum.

Specified by:
createMessage in interface Forum
Parameters:
user - the author of the message.
Returns:
the new ForumMessage
Throws:
UnauthorizedException - if does not have permission to post as the specified user.

getForumCategory

public ForumCategory getForumCategory()
Description copied from interface: Forum
Returns the forum category that this forum belongs to.

Specified by:
getForumCategory in interface Forum
Returns:
the forum category that this forum belongs to.

getThread

public ForumThread getThread(long threadID)
                      throws ForumThreadNotFoundException
Description copied from interface: Forum
Returns the thread specified by id. This method will return null if the thread is not in the forum.

Specified by:
getThread in interface Forum
Parameters:
threadID - the id of the thread to get.
Returns:
the ForumThread corresponding to threadID
Throws:
ForumThreadNotFoundException - if the specified thread cannot be loaded.

getThreads

public ForumThreadIterator getThreads()
Description copied from interface: Forum
Returns a Iterator for all the threads in the forum. Threads will be sorted on their modified date.

Specified by:
getThreads in interface Forum
Returns:
an Iterator for the threads in the forum.

getThreads

public ForumThreadIterator getThreads(ResultFilter resultFilter)
Description copied from interface: Forum
Returns a Iterator for all the threads in the forum that match the criteria specified by the ResultFilter.

Specified by:
getThreads in interface Forum
Parameters:
resultFilter - a ResultFilter object to perform filtering and sorting with.
Returns:
an Iterator for the threads in the forum that match the ResultFilter.

getPopularThreads

public java.util.Iterator getPopularThreads()
Description copied from interface: Forum
Returns an Iterator for the most popular threads in the forum. Popular threads are defined as those that have the most new messages over a period of time (e.g. the last 24 hours). When two threads have identical numbers of new messages, newer threads will be ordered first.

A number of configurable Jive properties control how the popular threads feature works:

Specified by:
getPopularThreads in interface Forum
Returns:
an Iterator for the most popular threads in the forum.

getMessages

public ForumMessageIterator getMessages()
Description copied from interface: Forum
Returns an Iterator for all the messages in the forum.

Specified by:
getMessages in interface Forum
Returns:
an Iterator for the messages in the forum.

getMessages

public ForumMessageIterator getMessages(ResultFilter resultFilter)
Description copied from interface: Forum
Returns a Iterator for all the messages in the forum that match the criteria specified by the ResultFilter.

Specified by:
getMessages in interface Forum
Parameters:
resultFilter - a ResultFilter object to perform filtering and sorting with.
Returns:
an Iterator for the messages in the forum that match the ResultFilter.

getThreadCount

public int getThreadCount()
Description copied from interface: Forum
Returns the number of threads in the forum.

Specified by:
getThreadCount in interface Forum
Returns:
the number of threads in the forum.

getThreadCount

public int getThreadCount(ResultFilter resultFilter)
Description copied from interface: Forum
Returns the number of threads in the forum based on the specified ResultFilter. This is useful for determining such things as the number of threads in a date range, etc.

Specified by:
getThreadCount in interface Forum
Parameters:
resultFilter - a resultFilter to limit the query on.
Returns:
the number of threads in the forum based on the filter.

getMessageCount

public int getMessageCount()
Description copied from interface: Forum
Returns the number of messages in the forum.

Specified by:
getMessageCount in interface Forum
Returns:
the number of messages in the forum.

getMessageCount

public int getMessageCount(ResultFilter resultFilter)
Description copied from interface: Forum
Returns the number of messages in the forum based on the specified ResultFilter. This is useful for determining such things as the number of messages in a date range, etc.

Specified by:
getMessageCount in interface Forum
Parameters:
resultFilter - a resultFilter to limit the query on.
Returns:
the number of messages in the forum based on the filter.

getLatestMessage

public ForumMessage getLatestMessage()
Description copied from interface: Forum
Returns the most recently created or edited message in this forum. If there are no messages in this forum, this method will return null. This information could also be determined using a ResultFilter, but this method offers a simpler, more optimized way to access the data.

Specified by:
getLatestMessage in interface Forum
Returns:
the most recently created or edited message in this forum.

createQuery

public Query createQuery()
Description copied from interface: Forum
Creates a query object to search the forum.

Specified by:
createQuery in interface Forum
Returns:
a Query object that can be used to search the forum.

getInterceptorManager

public InterceptorManager getInterceptorManager()
                                         throws UnauthorizedException
Description copied from interface: Forum
Returns an interceptor manager that can be used to manage the interceptors for this forum.

Specified by:
getInterceptorManager in interface Forum
Returns:
an InterceptorManager to manage interceptors for this forum.
Throws:
UnauthorizedException - if not an administrator.

getRenderManager

public ForumRenderManager getRenderManager()
Description copied from interface: Forum
Returns a render manager that can be used to manage render filters and macros for this forum. Render filter management is only for administrators, excluding the RenderManager.render(Object, com.jivesoftware.forum.renderer.RenderType, String) and RenderManager.render(Object, com.jivesoftware.forum.renderer.RenderType, com.jivesoftware.forum.renderer.RenderStrategy, String) methods, which may be useful to skin writers.

Specified by:
getRenderManager in interface Forum
Returns:
a RenderManager to manage render filters and macros for this forum.
See Also:
RenderManager

getPermissionsManager

public PermissionsManager getPermissionsManager()
                                         throws UnauthorizedException
Description copied from interface: Forum
Returns a permissions manager that can be used to set permissions for this forum. Only admins can perform this function.

Specified by:
getPermissionsManager in interface Forum
Returns:
a PermissionsManager to manage the permissions on this forum.
Throws:
UnauthorizedException - is not an admin.

getPermissions

public Permissions getPermissions(AuthToken authToken)
Description copied from interface: Forum
Returns the permissions for the forum that correspond to the passed-in AuthToken. This method is not generally useful to skin writers. Instead, the isAuthorized(int) method should be used for permission checking.

Specified by:
getPermissions in interface Forum
Parameters:
authToken - the auth token to lookup permissions for.
Returns:
the permssions for the forum corresponding to the passed in AuthToken

isAuthorized

public boolean isAuthorized(long type)
Description copied from interface: Forum
Returns true if the handle on the object has the permission specified. For example, if a forum administrator has a handle on this object, then calling isAuthorized(ForumPermissions.FORUM_ADMIN) would return true.

A list of possible permissions can be found in the ForumPermissions class. Certain methods of this class are restricted to certain permissions as specified in the method comments.

Specified by:
isAuthorized in interface Forum
Parameters:
type - a permission type.
Returns:
true if the handle on the object has the specified permission.
See Also:
ForumPermissions

getTags

public java.util.Map getTags()
Description copied from interface: Forum
Returns all tags for a given forum in a Map where the key is the name of tag and the value is the number of times the tag has been used in this forum.

Specified by:
getTags in interface Forum
Returns:
all tags for a given forum in a Map where the key is the name of tag and the value is the number of times the tag has been used in this forum.

getTags

public java.util.Map getTags(TagResultFilter resultFilter)
Description copied from interface: Forum
Returns all tags for a given forum in a Map where the key is the name of tag and the value is the number of times the tag has been used in this forum filtered by the TagResultFilter.

Specified by:
getTags in interface Forum
Parameters:
resultFilter - the filter to use to restrict tag results
Returns:
all tags for a given community in a Map where the key is the name of tag and the value is the number of times the tag has been used in this forum filtered by the TagResultFilter.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getProxiedForum

public Forum getProxiedForum()
                      throws UnauthorizedException
Returns the forum class that the proxy wraps. In some cases, this is necessary so that an outside class can get at methods that only a particular forum sublclass contains. Because this is potentially a dangerours operation, access to the underlying class is restricted to those with SYSTEM_ADMIN permissions.

Throws:
UnauthorizedException - if does not have ADMIN permissions.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.