Java Doc for ForumFactory.java in  » Forum » yazd » com » Yasna » 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 » yazd » com.Yasna.forum 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.Yasna.forum.ForumFactory

All known Subclasses:   com.Yasna.forum.ForumFactoryProxy,  com.Yasna.forum.database.DbForumFactory,
ForumFactory
abstract public class ForumFactory (Code)
A ForumFactory provides access to and management of Forums. It is the point of entry for the entire Yazd 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 Yazd 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 Yazd content.
It is also possible to access Yazd 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 Yazd 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, Yazd will look for the Yazd property "ForumFactory.className". If it fails to find that property, it will use the default class.
See Also:   AuthorizationFactory





Method Summary
abstract public  voidBlackListIP(ClientIP cip, boolean add)
     This method adds the IP address to the black list.
abstract public  Iteratorcategories()
    
abstract public  CategorycreateCategory(String name, String description)
     Creates a new Category.
abstract public  ForumcreateForum(String name, String description, boolean moderated, int forumGroupID, boolean article)
     Creates a new forum.
abstract public  QuerycreateQuery()
     This would create a query for all the forums.
abstract public  voiddeleteCategory(Category category)
     Deletes a category and all of its content.
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  IteratorforumsWithArticlesForums()
     This method returns the iterator with all the forums including the forums that are used for discussions around an article or a webpage.
abstract public  ForumThreadgetArticleThread(String pageKey, Forum forum)
     This method returns the thread for a page key that is specified.
abstract public  CategorygetCategory(int categoryID)
     Returns the category with the specified categoryID.
Parameters:
  categoryID - the id of the category to return.
abstract public  CategorygetCategory(String name)
     Returns the Category with the specified name.
Parameters:
  name - the name of the category to return.
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  SearchIndexergetSearchIndexer()
     Returns the search indexer which can be used to manage the index used by Yazd to perform searches.
throws:
  UnauthorizedException - if not a system administator.
abstract public  IteratorgetSessionList()
    
abstract public  ThreadTypegetThreadType(int typeid)
    
abstract public  IteratorgetThreadTypeIterator()
    
abstract public  intgetYesterdayUserCount()
    
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  booleanisBlackListed(ClientIP cip)
     This method checks to see if this ip address has been black listed.
abstract public  int[]usersWithPermission(int permissionType)
     Returns all the userID's of users with a particular system permission.



Method Detail
BlackListIP
abstract public void BlackListIP(ClientIP cip, boolean add) throws UnauthorizedException(Code)
This method adds the IP address to the black list.
Parameters:
  cip -
throws:
  UnauthorizedException -



categories
abstract public Iterator categories()(Code)
Returns an Iterator of Category objects an Iterator of Category objects



createCategory
abstract public Category createCategory(String name, String description) throws UnauthorizedException, CategoryAlreadyExistsException(Code)
Creates a new Category.
Parameters:
  name - the name of the category.
Parameters:
  description - the description of the category.
throws:
  UnauthorizedException - if not allowed to create a Category.
throws:
  CategoryAlreadExistsException - if the category name already exists.



createForum
abstract public Forum createForum(String name, String description, boolean moderated, int forumGroupID, boolean article) 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.
Parameters:
  moderated - when true - posted messages and threads must first be approved
Parameters:
  forumGroupID - every forum belongs to a Category and ForumGroup
throws:
  UnauthorizedException - if not allowed to create a Forum.
throws:
  ForumAlreadExistsException - if the forum name already exists.



createQuery
abstract public Query createQuery()(Code)
This would create a query for all the forums. If you just need to query one forum you should use the createQuery method in the Forum class.



deleteCategory
abstract public void deleteCategory(Category category) throws UnauthorizedException(Code)
Deletes a category and all of its content. This method is not always guaranteed to be safe to call.
Parameters:
  category - the category to delete.
throws:
  UnauthorizedException - if not allowed to delete a category.



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.



forumsWithArticlesForums
abstract public Iterator forumsWithArticlesForums()(Code)
This method returns the iterator with all the forums including the forums that are used for discussions around an article or a webpage. an iterator with the forum objects



getArticleThread
abstract public ForumThread getArticleThread(String pageKey, Forum forum) throws ForumThreadNotFoundException, UnauthorizedException(Code)
This method returns the thread for a page key that is specified.
Parameters:
  pageKey - forumthread



getCategory
abstract public Category getCategory(int categoryID) throws CategoryNotFoundException, UnauthorizedException(Code)
Returns the category with the specified categoryID.
Parameters:
  categoryID - the id of the category to return. the Category specified by categoryID.
throws:
  UnauthorizedException - if not allowed to read the category.
throws:
  CategoryNotFoundException - if the requested category does not exist.



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



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.



getSearchIndexer
abstract public SearchIndexer getSearchIndexer() throws UnauthorizedException(Code)
Returns the search indexer which can be used to manage the index used by Yazd to perform searches.
throws:
  UnauthorizedException - if not a system administator. a search indexer.



getSessionList
abstract public Iterator getSessionList()(Code)



getThreadType
abstract public ThreadType getThreadType(int typeid)(Code)



getThreadTypeIterator
abstract public Iterator getThreadTypeIterator()(Code)



getYesterdayUserCount
abstract public int getYesterdayUserCount()(Code)



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



isBlackListed
abstract public boolean isBlackListed(ClientIP cip)(Code)
This method checks to see if this ip address has been black listed.
Parameters:
  cip - true if black listed



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.