Java Doc for Forum.java in  » Forum » nemesis-forum » org » nemesis » forum » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Forum » nemesis forum » org.nemesis.forum 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.nemesis.forum.Forum

All known Subclasses:   org.nemesis.forum.impl.DbForum,  org.nemesis.forum.proxy.ForumProxy,
Forum
public interface Forum (Code)
A top level container for discussions. It contains a list of threads, each of which contains a tree of messages.




Method Summary
public  voidaddForumMessageFilter(MessageFilter filter)
     Adds a new ForumMessageFilter to the end of the filter list.
public  voidaddForumMessageFilter(MessageFilter filter, int index)
     Inserts a new ForumMessageFilter at specified index in the filter list.
public  voidaddGroupPermission(Group group, int permissionType)
     Grants a group a particular permission for the forum.
public  voidaddThread(ForumThread thread)
     Adds a thread to the forum.
public  voidaddUserPermission(User user, int permissionType)
     Grants a user a particular permission for the forum.
public  MessageapplyFilters(Message message)
     Applies all of the currently active filters to a message.
abstract public  MessagecreateMessage(User user)
     Factory method to create a Message.
abstract public  ForumThreadcreateThread(Message rootMessage)
     Factory method to create a Thread.
public  voiddeleteThread(ForumThread thread)
     Deletes a thread.
public  DategetCreationDate()
     Returns the Date that the forum was created.
public  StringgetDescription()
     Returns the description of the forum.
public  MessageFilter[]getForumMessageFilters()
     Returns an array of the currently active ForumMessageFilters.
public  intgetID()
     Returns the unique id of the forum.
public  MessagegetMessage(int messageID)
    
public  intgetMessageCount()
     Returns the number of messages in the forum.
public  intgetMessageCount(boolean approved)
    
public  intgetModerationType()
     Returns true if this forum is moderated.
public  DategetModifiedDate()
     Returns the Date that the forum was last modified.
public  StringgetName()
     Returns the name of the forum.
abstract public  ForumPermissionsgetPermissions(Authorization authorization)
     Returns the permissions for the forum that correspond to the passed-in Authorization.
public  StringgetProperty(String name)
     Returns an extended property of the forum.
public  ForumThreadgetThread(int threadID)
     Returns the thread specified by id.
public  intgetThreadCount()
     Returns the number of threads in the forum.
public  intgetThreadCount(boolean approved)
    
public  int[]groupsWithPermission(int permissionType)
     Returns all the groupID's of groups with a particular permission.
public  booleanhasPermission(int type)
     Returns true if the handle on the object has the permission specified. A list of possible permissions can be found in the ForumPermissions class.
public  voidmoveThread(ForumThread thread, Forum newForum)
     Moves a thread from one forum to another.
public  EnumerationpropertyNames()
     Returns an Enumeration of all the names of the forum properties.
public  voidremoveForumMessageFilter(int index)
     Removes a ForumMessageFilter at the specified index in the filter list.
public  voidremoveGroupPermission(Group group, int permissionType)
     Revokes a particular permission from a group for the forum.
public  voidremoveUserPermission(User user, int permissionType)
     Revokes a particular permission from a user for the forum.
public  voidsetCreationDate(Date creationDate)
     Sets the creation date of the forum.
public  voidsetDescription(String description)
     Sets the description of the forum.
public  voidsetModerationType(int type)
     Sets whether the forum is moderated.
public  voidsetModifiedDate(Date modifiedDate)
     Sets the date the forum was last modified.
public  voidsetName(String name)
     Sets the name of a the forum.
public  voidsetProperty(String name, String value)
     Sets an extended property of the forum.
public  Iteratorthreads()
     Returns a Iterator for the forum to move through the threads.
public  Iteratorthreads(boolean approved)
     Returns a Iterator for the forum to move through the threads.
public  Iteratorthreads(int startIndex, int numResults)
     Returns a ListIterator for the forum to move through the threads.
public  Iteratorthreads(boolean approved, int startIndex, int numResults)
     Returns a ListIterator for the forum to move through the threads.
public  int[]usersWithPermission(int permissionType)
     Returns all the userID's of users with a particular permission.



Method Detail
addForumMessageFilter
public void addForumMessageFilter(MessageFilter filter) throws UnauthorizedException(Code)
Adds a new ForumMessageFilter to the end of the filter list.
Parameters:
  filter - ForumMessageFilter to add to the filter list.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



addForumMessageFilter
public void addForumMessageFilter(MessageFilter filter, int index) throws UnauthorizedException(Code)
Inserts a new ForumMessageFilter at specified index in the filter list.
Parameters:
  filter - ForumMessageFilter to add to the filter list.
Parameters:
  index - position in filter list to insert new filter.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



addGroupPermission
public void addGroupPermission(Group group, int permissionType) throws UnauthorizedException(Code)
Grants a group a particular permission for the forum.
throws:
  UnauthorizedException - if does not have ADMIN permissions.
See Also:   ForumPermissions



addThread
public void addThread(ForumThread thread) throws UnauthorizedException(Code)
Adds a thread to the forum.
Parameters:
  thread - the thread to add to the forum.
throws:
  UnauthorizedException - if does not have CREATE_THREAD permissions.



addUserPermission
public void addUserPermission(User user, int permissionType) throws UnauthorizedException(Code)
Grants a user a particular permission for the forum. Valid permission types for a forum are ForumPermissions.ADMIN
Parameters:
  user - the User to grant a permission to.
Parameters:
  permissionType - the type of permission to grant the user.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



applyFilters
public Message applyFilters(Message message)(Code)
Applies all of the currently active filters to a message.
Parameters:
  message - the ForumMessage to apply filters to.



createMessage
abstract public Message createMessage(User user) throws UnauthorizedException(Code)
Factory method to create a Message.
Parameters:
  user - the user for the message.
throws:
  UnauthorizedException - if does not have CREATE_MESSAGE permissions.



createThread
abstract public ForumThread createThread(Message rootMessage) throws UnauthorizedException(Code)
Factory method to create a Thread.
Parameters:
  forum - the forum to create the thread in.
Parameters:
  rootMessage - the root message of the thread.
throws:
  UnauthorizedException - if does not have CREATE_THREAD permissions.



deleteThread
public void deleteThread(ForumThread thread) throws UnauthorizedException(Code)
Deletes a thread. Once a thread is deleted, the thread object should no longer be used.
Parameters:
  thread - the thread to delete.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



getCreationDate
public Date getCreationDate()(Code)
Returns the Date that the forum was created. the Date the forum was created.



getDescription
public String getDescription()(Code)
Returns the description of the forum. the description of the forum.



getForumMessageFilters
public MessageFilter[] getForumMessageFilters() throws UnauthorizedException(Code)
Returns an array of the currently active ForumMessageFilters.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



getID
public int getID()(Code)
Returns the unique id of the forum. the unique id of the forum.



getMessage
public Message getMessage(int messageID) throws ForumMessageNotFoundException(Code)



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



getMessageCount
public int getMessageCount(boolean approved)(Code)

author:
   dlaurent
author:
   Returns the number of messages in the forum.
author:
   approved or not



getModerationType
public int getModerationType()(Code)
Returns true if this forum is moderated. When a forum is moderated, posted messages and threads must first be approved by a user with moderator permissions.

Constants.MODERATION_THREAD or Constants.MODERATION_MESSAGE or Constants.MODERATION_NONE




getModifiedDate
public Date getModifiedDate()(Code)
Returns the Date that the forum was last modified. In other words, the date of the most recent message or thread in the forum. the Date the forum was last modified.



getName
public String getName()(Code)
Returns the name of the forum. Every forum name in the system must be unique. However, this restriction allows one to lookup a forum by name as well as by ID. the name of the forum.
See Also:   ForumFactory.getForum(String)



getPermissions
abstract public ForumPermissions getPermissions(Authorization authorization)(Code)
Returns the permissions for the forum that correspond to the passed-in Authorization.
Parameters:
  authorization - the auth token to lookup permissions for.



getProperty
public String getProperty(String name)(Code)
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.
Parameters:
  name - the name of the property to get.
Parameters:
  the - value of the property specified by name.



getThread
public ForumThread getThread(int threadID) throws ForumThreadNotFoundException(Code)
Returns the thread specified by id. The method will return null if the thread is not in the forum.



getThreadCount
public int getThreadCount()(Code)
Returns the number of threads in the forum.



getThreadCount
public int getThreadCount(boolean approved)(Code)

author:
   dlaurent
author:
   Returns the number of messages in the forum.
author:
   approved or not



groupsWithPermission
public int[] groupsWithPermission(int permissionType) throws UnauthorizedException(Code)
Returns all the groupID's of groups with a particular permission.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



hasPermission
public boolean hasPermission(int type)(Code)
Returns true if the handle on the object has the permission specified. 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.
See Also:   ForumPermissions



moveThread
public void moveThread(ForumThread thread, Forum newForum) throws UnauthorizedException, IllegalArgumentException(Code)
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 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.
Parameters:
  thread - the thread to move to another forum.
Parameters:
  newForum - the forum to move the thread to.
throws:
  UnauthorizedException - if does not have ADMIN permissions for thethis forum and newForum.
throws:
  IllegalArgumentException - if thread does not belongto the forum that this method was invoked on.




propertyNames
public Enumeration propertyNames()(Code)
Returns an Enumeration of all the names of the forum properties. an Enumeration of all the names of the forum properties.



removeForumMessageFilter
public void removeForumMessageFilter(int index) throws UnauthorizedException(Code)
Removes a ForumMessageFilter at the specified index in the filter list.
Parameters:
  index - position in filter list to remove filter from.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



removeGroupPermission
public void removeGroupPermission(Group group, int permissionType) throws UnauthorizedException(Code)
Revokes a particular permission from a group for the forum.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



removeUserPermission
public void removeUserPermission(User user, int permissionType) throws UnauthorizedException(Code)
Revokes a particular permission from a user for the forum.
Parameters:
  user - the User to revoke a permission from.
Parameters:
  permissionType - the type of permission to revoke from the user.
throws:
  UnauthorizedException - if does not have ADMIN permissions.
See Also:   ForumPermissions



setCreationDate
public void setCreationDate(Date creationDate) throws UnauthorizedException(Code)
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.
Parameters:
  creationDate - the date the forum was created.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setDescription
public void setDescription(String description) throws UnauthorizedException(Code)
Sets the description of the forum.
Parameters:
  description - the description of the forum.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setModerationType
public void setModerationType(int type) throws UnauthorizedException(Code)
Sets whether the forum is moderated. When a forum is moderated, posted messages and threads must first be approved by a user with moderator permissions.


Parameters:
  type - should be either Constants.MODERATION_THREAD or Constants.MODERATION_MESSAGEor Constants.MODERATION_NONE
throws:
  UnauthorizedException - if does not have ADMIN permissions.




setModifiedDate
public void setModifiedDate(Date modifiedDate) throws UnauthorizedException(Code)
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.
Parameters:
  modifiedDate - the date the forum was modified.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



setName
public void setName(String name) throws UnauthorizedException, ForumAlreadyExistsException(Code)
Sets the name of a the forum. Every forum name in the system must be unique. However, this restriction allows one to lookup a forum by name as well as by ID.

An exception will be thrown if a forum with the same name as the new name already exists.
Parameters:
  name - the name of the forum.
throws:
  UnauthorizedException - if does not have ADMIN permissions.
throws:
  ForumAlreadyExistsException - if a forum with the specified namealready exists.




setProperty
public void setProperty(String name, String value) throws UnauthorizedException(Code)
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.
Parameters:
  name - the name of the property to set.
Parameters:
  value - the new value for the property.



threads
public Iterator threads()(Code)
Returns a Iterator for the forum to move through the threads.



threads
public Iterator threads(boolean approved)(Code)
Returns a Iterator for the forum to move through the threads.



threads
public Iterator threads(int startIndex, int numResults)(Code)
Returns a ListIterator for the forum to move through the threads.
Parameters:
  startIndex - the index you'd like to start the iterator at.
Parameters:
  numResuls - the max number of results iterator will hold.



threads
public Iterator threads(boolean approved, int startIndex, int numResults)(Code)
Returns a ListIterator for the forum to move through the threads.
Parameters:
  startIndex - the index you'd like to start the iterator at.
Parameters:
  numResuls - the max number of results iterator will hold.



usersWithPermission
public int[] usersWithPermission(int permissionType) throws UnauthorizedException(Code)
Returns all the userID's of users with a particular permission.
Parameters:
  permissionType - the type of permission to check.
throws:
  UnauthorizedException - if does not have ADMIN permissions.
See Also:   ForumPermissions



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.