Java Doc for ForumFactory.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) 


java.lang.Object
   org.nemesis.forum.ForumFactory

All known Subclasses:   org.nemesis.forum.impl.DbForumFactory,  org.nemesis.forum.proxy.ForumFactoryProxy,
ForumFactory
abstract public class ForumFactory (Code)
A ForumFactory provides access to and management of Forums. It is the point of entry for the entire system.

A concrete instance of ForumFactory can be obtained by calling the getInstance() method with an Authorization token. The Authorization token determines with what permissions the rest of the objects in the system will be accessed with.

Usually the first steps of any program interacting with the system are:

  • Obtain an authorization token by calling AuthorizationFactory.getInstance().getAuthorization(username, password);
  • Use that authorization to get a ForumFactory instance.
  • Use the forum factory to access forums and other content.
It is also possible to access content with anonymous permissions. See the AuthorizationFactory class for more information.

ForumFactory is an abstract class so that the actual implementation is pluggable. For example, the default implementation uses a database backend. You can optionally plug in your own backend that might use the filesystem, for example. When first creating the forum factory, will look for the property "ForumFactory.className". If it fails to find that property, it will use the default class.
See Also:   AuthorizationFactory



Field Summary
protected static  Loglog
    


Method Summary
abstract public  ForumcreateForum(String name, String description)
     Creates a new forum.
abstract public  voiddeleteForum(Forum forum)
     Deletes a forum and all of its content.
abstract public  Iteratorforums()
     Returns an Iterator of Forum objects for all the forums in the system that the user has READ access for.
abstract public  IteratorforumsModeration()
     Returns an Iterator of Forum objects for all the forums in the system that the user has Moderation, Forum Admin or System Admin access to.
abstract public  ForumgetForum(int forumID)
     Returns the forum with the specified forumID.
Parameters:
  forumID - the id of the forum to return.
abstract public  ForumgetForum(String name)
     Returns the Forum with the specified name.
Parameters:
  name - the name of the forum to return.
abstract public  intgetForumCount()
     Returns the total number of forums.
public static  ForumFactorygetInstance(Authorization authorization)
     Returns a concrete ForumFactory instance.
abstract public  ForumPermissionsgetPermissions(Authorization authorization)
     Returns the permissions for the factory that correspond to the passed-in Authorization.
Parameters:
  authorization - the auth token for the user.
abstract public  ProfileManagergetProfileManager()
     Returns a ProfileManager that can be used to manage Users and Groups.
abstract public  int[]groupsWithPermission(int permissionType)
     Returns all the groupID's of groups with a particular system permission.
abstract 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.
abstract public  int[]usersWithPermission(int permissionType)
     Returns all the userID's of users with a particular system permission.

Field Detail
log
protected static Log log(Code)





Method Detail
createForum
abstract public Forum createForum(String name, String description) throws UnauthorizedException, ForumAlreadyExistsException(Code)
Creates a new forum. This method should always be used instead of trying to instantiate a forum directly.
Parameters:
  name - the name of the forum.
Parameters:
  description - the description of the forum.
throws:
  UnauthorizedException - if not allowed to create a Forum.
throws:
  ForumAlreadExistsException - if the forum name already exists.



deleteForum
abstract public void deleteForum(Forum forum) throws UnauthorizedException(Code)
Deletes a forum and all of its content. This method is not always guaranteed to be safe to call. For example, if multiple clients have handles on a forum, and that forum is subsequently deleted, the behavior of the forum objects that the clients have handles on is unspecified and may result in errors.
Parameters:
  forum - the forum to delete.
throws:
  UnauthorizedException - if not allowed to delete a forum.



forums
abstract public Iterator forums()(Code)
Returns an Iterator of Forum objects for all the forums in the system that the user has READ access for. Read access can be granted in the following ways:
  • Anonymous read permission is enabled for the forum; anyone can read it.
  • The "all users" read permission is set so that any registered user can read the forum.
  • The user belongs to a group that has been granted read permission.
  • The user has been specifically granted read permission.
  • The current user is a system admin or admin of this forum. This allows automatic read permission.
an Iterator of Forum objects for all forums in the system thatthe user has read permission for.



forumsModeration
abstract public Iterator forumsModeration()(Code)
Returns an Iterator of Forum objects for all the forums in the system that the user has Moderation, Forum Admin or System Admin access to.



getForum
abstract public Forum getForum(int forumID) throws ForumNotFoundException, UnauthorizedException(Code)
Returns the forum with the specified forumID.
Parameters:
  forumID - the id of the forum to return. the Forum specified by forumID.
throws:
  UnauthorizedException - if not allowed to read the forum.
throws:
  ForumNotFoundException - if the requested forum does not exist.



getForum
abstract public Forum getForum(String name) throws ForumNotFoundException, UnauthorizedException(Code)
Returns the Forum with the specified name.
Parameters:
  name - the name of the forum to return. the forum with the specified name.
throws:
  ForumNotFoundException - if the requested forum does not exist.
throws:
  UnauthorizedException - if not allowed to read the forum.



getForumCount
abstract public int getForumCount()(Code)
Returns the total number of forums. This number might not agree with the number of forums returned by ForumFactory.forums() since that method return an Iterator of forums that a user has READ access for. the total number of forums.



getInstance
public static ForumFactory getInstance(Authorization authorization)(Code)
Returns a concrete ForumFactory instance. Permissions corresponding to the Authorization will be used. If getting the factory fails, null will be returned.
Parameters:
  authorization - the auth token for the user. a concrete ForumFactory instance.



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



getProfileManager
abstract public ProfileManager getProfileManager()(Code)
Returns a ProfileManager that can be used to manage Users and Groups.



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



hasPermission
abstract 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.
Parameters:
  type - the type of permission to check for.
See Also:   ForumPermissions



usersWithPermission
abstract public int[] usersWithPermission(int permissionType) throws UnauthorizedException(Code)
Returns all the userID's of users with a particular system permission. System permissions apply to all forums.
throws:
  UnauthorizedException - if does not have ADMIN permissions.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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