Java Doc for DataHandler.java in  » Wiki-Engine » JAMWiki » org » jamwiki » 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 » Wiki Engine » JAMWiki » org.jamwiki 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jamwiki.DataHandler

All known Subclasses:   org.jamwiki.db.AnsiDataHandler,  org.jamwiki.TestDataHandler,
DataHandler
public interface DataHandler (Code)
This interface provides all methods needed when retrieving or modifying Wiki data. Any database or other persistency class must implement this interface, and there should also be a corresponding <data-handler> entry for the class in the jamwiki-configuration.xml file.
See Also:   org.jamwiki.WikiBase.getDataHandler




Method Summary
 booleancanMoveTopic(Topic fromTopic, String destination)
     Determine if a topic can be moved to a new location.
 voiddeleteTopic(Topic topic, TopicVersion topicVersion, boolean userVisible, Object transactionObject)
     Mark a topic deleted by setting its delete date to a non-null value. Prior to calling this method the topic content should also be set empty.
 ListgetAllCategories(String virtualWiki, Pagination pagination)
     Return a List of all Category objects for a given virtual wiki.
Parameters:
  virtualWiki - The virtual wiki for which categories are beingretrieved.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved.
 ListgetAllRoles()
     Return a List of all Role objects for the wiki.
 ListgetAllTopicNames(String virtualWiki)
     Return a List of all topic names for all non-deleted topics that exist for the virtual wiki.
Parameters:
  virtualWiki - The virtual wiki for which topics are beingretrieved.
 ListgetAllWikiFileVersions(String virtualWiki, String topicName, boolean descending)
     Retrieve a List of all TopicVersions for a given topic, sorted chronologically.
Parameters:
  virtualWiki - The virtual wiki for the topic being queried.
Parameters:
  topicName - The name of the topic being queried.
Parameters:
  descending - Set to true if the results should besorted with the most recent version first, false if theresults should be sorted with the oldest versions first.
 ListgetRecentChanges(String virtualWiki, Pagination pagination, boolean descending)
     Retrieve a List of all RecentChange objects for a given virtual wiki, sorted chronologically.
Parameters:
  virtualWiki - The virtual wiki for which recent changes are beingretrieved.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved.
Parameters:
  descending - Set to true if the results should besorted with the most recent changes first, false if theresults should be sorted with the oldest changes first.
 ListgetRecentChanges(String virtualWiki, String topicName, Pagination pagination, boolean descending)
     Retrieve a List of all RecentChange objects for a given topic, sorted chronologically.
Parameters:
  virtualWiki - The virtual wiki for the topic being queried.
Parameters:
  topicName - The name of the topic being queried.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved.
Parameters:
  descending - Set to true if the results should besorted with the most recent changes first, false if theresults should be sorted with the oldest changes first.
 CollectiongetRoleMapByLogin(String loginFragment)
     Retrieve a List of RoleMap objects for all users whose login contains the given login fragment.
Parameters:
  loginFragment - A value that must be contained with the user'slogin.
 CollectiongetRoleMapByRole(String roleName)
     Retrieve a Collection of RoleMap objects for all users and groups who have been assigned the specified role.
Parameters:
  roleName - The name of the role being queried against.
 Role[]getRoleMapGroup(String groupName)
     Retrieve all roles assigned to a given group.
Parameters:
  groupName - The name of the group for whom roles are being retrieved.
 CollectiongetRoleMapGroups()
     Retrieve a Collection of RoleMap objects for all groups. A Collection of RoleMap objects containing all roles for allgroups.
 Role[]getRoleMapUser(String login)
     Retrieve all roles assigned to a given user.
Parameters:
  login - The login of the user for whom roles are being retrieved.
 ListgetTopicsAdmin(String virtualWiki, Pagination pagination)
     Retrieve a List of topic names for all admin-only topics, sorted alphabetically.
Parameters:
  virtualWiki - The virtual wiki for which admin-only topics arebeing retrieved.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved.
 ListgetUserContributions(String virtualWiki, String userString, Pagination pagination, boolean descending)
     Retrieve a List of RecentChange objects corresponding to all changes made by a particular user.
Parameters:
  virtualWiki - The virtual wiki for which changes are beingretrieved.
Parameters:
  userString - Either an IP address (for anonymous users) or theuser login corresponding to the user for whom contributions arebeing retrieved.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved.
Parameters:
  descending - Set to true if the results should besorted with the most recent changes first, false if theresults should be sorted with the oldest changes first.
 ListgetVirtualWikiList(Object transactionObject)
     Return a List of all VirtualWiki objects that exist for the wiki.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection.
 WatchlistgetWatchlist(String virtualWiki, int userId)
     Retrieve a user's watchlist.
Parameters:
  virtualWiki - The virtual wiki for which a watchlist is beingretrieved.
Parameters:
  userId - The ID of the user whose watchlist is being retrieved.
 ListgetWatchlist(String virtualWiki, int userId, Pagination pagination)
     Retrieve a List of RecentChange objects corresponding to a user's watchlist.
 ListlookupCategoryTopics(String virtualWiki, String categoryName)
     Retrieve a List of Category objects corresponding to all topics that belong to the category, sorted by either the topic name, or category sort key (if specified).
Parameters:
  virtualWiki - The virtual wiki for the category being queried.
Parameters:
  categoryName - The name of the category being queried.
 TopiclookupTopic(String virtualWiki, String topicName, boolean deleteOK, Object transactionObject)
     Retrieve a Topic object that matches the given virtual wiki and topic name.
Parameters:
  virtualWiki - The virtual wiki for the topic being queried.
Parameters:
  topicName - The name of the topic being queried.
Parameters:
  deleteOK - Set to true if deleted topics can beretrieved, false otherwise.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection.
 ListlookupTopicByType(String virtualWiki, int topicType, Pagination pagination)
     Return a List of topic names for all non-deleted topics in the virtual wiki that match a specific topic type.
Parameters:
  virtualWiki - The virtual wiki for the topics being queried.
Parameters:
  topicType - The type of topics to return.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved.
 intlookupTopicCount(String virtualWiki)
     Return a count of all topics, including redirects, comments pages and templates, for the given virtual wiki.
 TopicVersionlookupTopicVersion(int topicVersionId, Object transactionObject)
     Retrieve a TopicVersion object for a given topic version ID.
Parameters:
  topicVersionId - The ID of the topic version being retrieved.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection.
 VirtualWikilookupVirtualWiki(String virtualWikiName)
     Given a virtual wiki name, return the corresponding VirtualWiki object.
Parameters:
  virtualWikiName - The name of the VirtualWiki object that isbeing retrieved.
 WikiFilelookupWikiFile(String virtualWiki, String topicName)
     Retrieve a WikiFile object for a given virtual wiki and topic name.
Parameters:
  virtualWiki - The virtual wiki for the file being queried.
Parameters:
  topicName - The topic name for the file being queried.
 intlookupWikiFileCount(String virtualWiki)
     Return a count of all wiki files for the given virtual wiki.
 WikiUserlookupWikiUser(int userId, Object transactionObject)
     Retrieve a WikiUser object matching a given user ID.
Parameters:
  userId - The ID of the WikiUser being retrieved.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection.
 WikiUserlookupWikiUser(String username, Object transactionObject)
     Retrieve a WikiUser object matching a given username.
Parameters:
  username - The username of the WikiUser being retrieved.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection.
 intlookupWikiUserCount()
     Return a count of all wiki users.
 ListlookupWikiUsers(Pagination pagination)
     Return a List of user logins for all wiki users.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved.
 voidmoveTopic(Topic fromTopic, TopicVersion fromVersion, String destination, Object transactionObject)
     Move a topic to a new name, creating a redirect topic in the old topic location.
 voidreloadRecentChanges(Object transactionObject)
     Delete all existing recent changes and reload the recent changes based on the most recent topic versions.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection.
 voidsetup(Locale locale, WikiUser user)
     Perform any required setup steps for the DataHandler instance.
Parameters:
  locale - The locale to be used when setting up the data handlerinstance.
 voidsetupSpecialPages(Locale locale, WikiUser user, VirtualWiki virtualWiki, Object transactionObject)
     Create the special pages used on the wiki, such as the left menu and default stylesheet.
Parameters:
  locale - The locale to be used when setting up special pages suchas the left menu and default stylesheet.
 voidundeleteTopic(Topic topic, TopicVersion topicVersion, boolean userVisible, Object transactionObject)
     Undelete a previously deleted topic by setting its delete date to a null value.
 voidupdateSpecialPage(Locale locale, String virtualWiki, String topicName, WikiUser user, String ipAddress, Object transactionObject)
     Update a special page used on the wiki, such as the left menu or default stylesheet.
Parameters:
  locale - The locale to be used when updating a special page suchas the left menu and default stylesheet.
 voidwriteFile(WikiFile wikiFile, WikiFileVersion wikiFileVersion, Object transactionObject)
     Add or update a WikiFile object.
 voidwriteRole(Role role, Object transactionObject, boolean update)
     Add or update a Role object.
 voidwriteRoleMapGroup(int groupId, List roles, Object transactionObject)
     Add a set of group role mappings.
 voidwriteRoleMapUser(int userId, List roles, Object transactionObject)
     Add a set of user role mappings.
 voidwriteTopic(Topic topic, TopicVersion topicVersion, LinkedHashMap categories, Vector links, boolean userVisible, Object transactionObject)
     Add or update a Topic object.
 voidwriteVirtualWiki(VirtualWiki virtualWiki, Object transactionObject)
     Add or update a VirtualWiki object.
 voidwriteWatchlistEntry(Watchlist watchlist, String virtualWiki, String topicName, int userId, Object transactionObject)
     Add or delete an item from a user's watchlist.
 voidwriteWikiGroup(WikiGroup group, Object transactionObject)
     Add or update a WikiGroup object.
 voidwriteWikiUser(WikiUser user, WikiUserInfo userInfo, Object transactionObject)
     Add or update a WikiUser object.



Method Detail
canMoveTopic
boolean canMoveTopic(Topic fromTopic, String destination) throws Exception(Code)
Determine if a topic can be moved to a new location. If the destination is not an existing topic, is a topic that has been deleted, or is a topic that redirects to the source topic then this method should return true.
Parameters:
  fromTopic - The Topic that is being moved.
Parameters:
  destination - The new name for the topic. true if the topic can be moved to the destination,false otherwise.
throws:
  Exception - Thrown if any error occurs during method execution.



deleteTopic
void deleteTopic(Topic topic, TopicVersion topicVersion, boolean userVisible, Object transactionObject) throws Exception(Code)
Mark a topic deleted by setting its delete date to a non-null value. Prior to calling this method the topic content should also be set empty. This method will also delete recent changes for the topic, and a new TopicVersion should be supplied reflecting the topic deletion event.
Parameters:
  topic - The Topic object that is being deleted.
Parameters:
  topicVersion - A TopicVersion object that indicates the deletedate, author, and other parameters for the topic.
Parameters:
  userVisible - Set to true if a recent change shouldshould be created indicating that the topic was deleted,false otherwise.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
throws:
  Exception - Thrown if any error occurs during method execution.



getAllCategories
List getAllCategories(String virtualWiki, Pagination pagination) throws Exception(Code)
Return a List of all Category objects for a given virtual wiki.
Parameters:
  virtualWiki - The virtual wiki for which categories are beingretrieved.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved. A List of all Category objects for a given virutal wiki.
throws:
  Exception - Thrown if any error occurs during method execution.



getAllRoles
List getAllRoles() throws Exception(Code)
Return a List of all Role objects for the wiki. A List of all Role objects for the wiki.
throws:
  Exception - Thrown if any error occurs during method execution.



getAllTopicNames
List getAllTopicNames(String virtualWiki) throws Exception(Code)
Return a List of all topic names for all non-deleted topics that exist for the virtual wiki.
Parameters:
  virtualWiki - The virtual wiki for which topics are beingretrieved. A List of all topic names for all non-deleted topics thatexist for the virtual wiki.
throws:
  Exception - Thrown if any error occurs during method execution.



getAllWikiFileVersions
List getAllWikiFileVersions(String virtualWiki, String topicName, boolean descending) throws Exception(Code)
Retrieve a List of all TopicVersions for a given topic, sorted chronologically.
Parameters:
  virtualWiki - The virtual wiki for the topic being queried.
Parameters:
  topicName - The name of the topic being queried.
Parameters:
  descending - Set to true if the results should besorted with the most recent version first, false if theresults should be sorted with the oldest versions first. A List of all TopicVersion objects for the given topic.If no matching topic exists then an exception is thrown.
throws:
  Exception - Thrown if any error occurs during method execution.



getRecentChanges
List getRecentChanges(String virtualWiki, Pagination pagination, boolean descending) throws Exception(Code)
Retrieve a List of all RecentChange objects for a given virtual wiki, sorted chronologically.
Parameters:
  virtualWiki - The virtual wiki for which recent changes are beingretrieved.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved.
Parameters:
  descending - Set to true if the results should besorted with the most recent changes first, false if theresults should be sorted with the oldest changes first. A List of all RecentChange objects for a given virtualwiki, sorted chronologically.
throws:
  Exception - Thrown if any error occurs during method execution.



getRecentChanges
List getRecentChanges(String virtualWiki, String topicName, Pagination pagination, boolean descending) throws Exception(Code)
Retrieve a List of all RecentChange objects for a given topic, sorted chronologically.
Parameters:
  virtualWiki - The virtual wiki for the topic being queried.
Parameters:
  topicName - The name of the topic being queried.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved.
Parameters:
  descending - Set to true if the results should besorted with the most recent changes first, false if theresults should be sorted with the oldest changes first. A List of all RecentChange objects for a given topic,sorted chronologically.
throws:
  Exception - Thrown if any error occurs during method execution.



getRoleMapByLogin
Collection getRoleMapByLogin(String loginFragment) throws Exception(Code)
Retrieve a List of RoleMap objects for all users whose login contains the given login fragment.
Parameters:
  loginFragment - A value that must be contained with the user'slogin. This method will return partial matches, so "name" willmatch "name", "firstname" and "namesake". A Collection of RoleMap objects containing all roles for allusers whose login contains the login fragment. If no matches arefound then this method returns an empty List. This method willnever return null.
throws:
  Exception - Thrown if any error occurs during method execution.



getRoleMapByRole
Collection getRoleMapByRole(String roleName) throws Exception(Code)
Retrieve a Collection of RoleMap objects for all users and groups who have been assigned the specified role.
Parameters:
  roleName - The name of the role being queried against. A Collection of RoleMap objects containing all roles for allusers and groups who have been assigned the specified role. If nomatches are found then this method returns an empty List. Thismethod will never return null.
throws:
  Exception - Thrown if any error occurs during method execution.



getRoleMapGroup
Role[] getRoleMapGroup(String groupName) throws Exception(Code)
Retrieve all roles assigned to a given group.
Parameters:
  groupName - The name of the group for whom roles are being retrieved. An array of Role objects for the given group, or an emptyarray if no roles are assigned to the group. This method willnever return null.
throws:
  Exception - Thrown if any error occurs during method execution.



getRoleMapGroups
Collection getRoleMapGroups() throws Exception(Code)
Retrieve a Collection of RoleMap objects for all groups. A Collection of RoleMap objects containing all roles for allgroups. If no matches are found then this method returns an emptyList. This method will never return null.
throws:
  Exception - Thrown if any error occurs during method execution.



getRoleMapUser
Role[] getRoleMapUser(String login) throws Exception(Code)
Retrieve all roles assigned to a given user.
Parameters:
  login - The login of the user for whom roles are being retrieved. An array of Role objects for the given user, or an emptyarray if no roles are assigned to the user. This method willnever return null.
throws:
  Exception - Thrown if any error occurs during method execution.



getTopicsAdmin
List getTopicsAdmin(String virtualWiki, Pagination pagination) throws Exception(Code)
Retrieve a List of topic names for all admin-only topics, sorted alphabetically.
Parameters:
  virtualWiki - The virtual wiki for which admin-only topics arebeing retrieved.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved. A List of topic names for all admin-only topics, sortedalphabetically.
throws:
  Exception - Thrown if any error occurs during method execution.



getUserContributions
List getUserContributions(String virtualWiki, String userString, Pagination pagination, boolean descending) throws Exception(Code)
Retrieve a List of RecentChange objects corresponding to all changes made by a particular user.
Parameters:
  virtualWiki - The virtual wiki for which changes are beingretrieved.
Parameters:
  userString - Either an IP address (for anonymous users) or theuser login corresponding to the user for whom contributions arebeing retrieved.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved.
Parameters:
  descending - Set to true if the results should besorted with the most recent changes first, false if theresults should be sorted with the oldest changes first. A List of RecentChange objects corresponding to allchanges made by a particular user.
throws:
  Exception - Thrown if any error occurs during method execution.



getVirtualWikiList
List getVirtualWikiList(Object transactionObject) throws Exception(Code)
Return a List of all VirtualWiki objects that exist for the wiki.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null. A List of all VirtualWiki objects that exist for thewiki.
throws:
  Exception - Thrown if any error occurs during method execution.



getWatchlist
Watchlist getWatchlist(String virtualWiki, int userId) throws Exception(Code)
Retrieve a user's watchlist.
Parameters:
  virtualWiki - The virtual wiki for which a watchlist is beingretrieved.
Parameters:
  userId - The ID of the user whose watchlist is being retrieved. The Watchlist object for the user.
throws:
  Exception - Thrown if any error occurs during method execution.



getWatchlist
List getWatchlist(String virtualWiki, int userId, Pagination pagination) throws Exception(Code)
Retrieve a List of RecentChange objects corresponding to a user's watchlist. This method is primarily used to display a user's watchlist on the Special:Watchlist page.
Parameters:
  virtualWiki - The virtual wiki for which a watchlist is beingretrieved.
Parameters:
  userId - The ID of the user whose watchlist is being retrieved.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved. A List of RecentChange objects corresponding to a user'swatchlist.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupCategoryTopics
List lookupCategoryTopics(String virtualWiki, String categoryName) throws Exception(Code)
Retrieve a List of Category objects corresponding to all topics that belong to the category, sorted by either the topic name, or category sort key (if specified).
Parameters:
  virtualWiki - The virtual wiki for the category being queried.
Parameters:
  categoryName - The name of the category being queried. A List of all Category objects corresponding to alltopics that belong to the category, sorted by either the topic name,or category sort key (if specified).
throws:
  Exception - Thrown if any error occurs during method execution.



lookupTopic
Topic lookupTopic(String virtualWiki, String topicName, boolean deleteOK, Object transactionObject) throws Exception(Code)
Retrieve a Topic object that matches the given virtual wiki and topic name.
Parameters:
  virtualWiki - The virtual wiki for the topic being queried.
Parameters:
  topicName - The name of the topic being queried.
Parameters:
  deleteOK - Set to true if deleted topics can beretrieved, false otherwise.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null. A Topic object that matches the given virtual wiki and topicname, or null if no matching topic exists.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupTopicByType
List lookupTopicByType(String virtualWiki, int topicType, Pagination pagination) throws Exception(Code)
Return a List of topic names for all non-deleted topics in the virtual wiki that match a specific topic type.
Parameters:
  virtualWiki - The virtual wiki for the topics being queried.
Parameters:
  topicType - The type of topics to return.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved. A List of topic names for all non-deleted topics in thevirtual wiki that match a specific topic type.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupTopicCount
int lookupTopicCount(String virtualWiki) throws Exception(Code)
Return a count of all topics, including redirects, comments pages and templates, for the given virtual wiki. Deleted topics are not included in the count.
Parameters:
  virtualWiki - The virtual wiki for which the total topic count isbeing returned. A count of all topics, including redirects, comments pages andtemplates, for the given virtual wiki. Deleted topics are not includedin the count.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupTopicVersion
TopicVersion lookupTopicVersion(int topicVersionId, Object transactionObject) throws Exception(Code)
Retrieve a TopicVersion object for a given topic version ID.
Parameters:
  topicVersionId - The ID of the topic version being retrieved.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null. A TopicVersion object matching the given topic version ID,or null if no matching topic version is found.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupVirtualWiki
VirtualWiki lookupVirtualWiki(String virtualWikiName) throws Exception(Code)
Given a virtual wiki name, return the corresponding VirtualWiki object.
Parameters:
  virtualWikiName - The name of the VirtualWiki object that isbeing retrieved. The VirtualWiki object that corresponds to the virtual wikiname being queried, or null if no matching VirtualWikican be found.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupWikiFile
WikiFile lookupWikiFile(String virtualWiki, String topicName) throws Exception(Code)
Retrieve a WikiFile object for a given virtual wiki and topic name.
Parameters:
  virtualWiki - The virtual wiki for the file being queried.
Parameters:
  topicName - The topic name for the file being queried. The WikiFile object for the given virtual wiki and topic name,or null if no matching WikiFile exists.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupWikiFileCount
int lookupWikiFileCount(String virtualWiki) throws Exception(Code)
Return a count of all wiki files for the given virtual wiki. Deleted files are not included in the count.
Parameters:
  virtualWiki - The virtual wiki for which the total file count isbeing returned. A count of all wiki files for the given virtual wiki. Deletedfiles are not included in the count.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupWikiUser
WikiUser lookupWikiUser(int userId, Object transactionObject) throws Exception(Code)
Retrieve a WikiUser object matching a given user ID.
Parameters:
  userId - The ID of the WikiUser being retrieved.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null. The WikiUser object matching the given user ID, ornull if no matching WikiUser exists.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupWikiUser
WikiUser lookupWikiUser(String username, Object transactionObject) throws Exception(Code)
Retrieve a WikiUser object matching a given username.
Parameters:
  username - The username of the WikiUser being retrieved.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null. The WikiUser object matching the given username, ornull if no matching WikiUser exists.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupWikiUserCount
int lookupWikiUserCount() throws Exception(Code)
Return a count of all wiki users. A count of all wiki users.
throws:
  Exception - Thrown if any error occurs during method execution.



lookupWikiUsers
List lookupWikiUsers(Pagination pagination) throws Exception(Code)
Return a List of user logins for all wiki users.
Parameters:
  pagination - A Pagination object indicating the total number ofresults and offset for the results to be retrieved. A List of user logins for all wiki users.
throws:
  Exception - Thrown if any error occurs during method execution.



moveTopic
void moveTopic(Topic fromTopic, TopicVersion fromVersion, String destination, Object transactionObject) throws Exception(Code)
Move a topic to a new name, creating a redirect topic in the old topic location. An exception will be thrown if the topic cannot be moved for any reason.
Parameters:
  fromTopic - The Topic object that is being moved.
Parameters:
  fromVersion - A TopicVersion object that indicates the movedate, author, and other parameters for the topic.
Parameters:
  destination - The new name for the topic.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
throws:
  Exception - Thrown if any error occurs during method execution.



reloadRecentChanges
void reloadRecentChanges(Object transactionObject) throws Exception(Code)
Delete all existing recent changes and reload the recent changes based on the most recent topic versions.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
throws:
  Exception - Thrown if any error occurs during method execution.



setup
void setup(Locale locale, WikiUser user) throws Exception(Code)
Perform any required setup steps for the DataHandler instance.
Parameters:
  locale - The locale to be used when setting up the data handlerinstance. This parameter will affect any messages or defaults usedfor the DataHandler.
Parameters:
  user - The admin user to use when creating default topics andother DataHandler parameters.
throws:
  Exception - Thrown if any error occurs during method execution.



setupSpecialPages
void setupSpecialPages(Locale locale, WikiUser user, VirtualWiki virtualWiki, Object transactionObject) throws Exception(Code)
Create the special pages used on the wiki, such as the left menu and default stylesheet.
Parameters:
  locale - The locale to be used when setting up special pages suchas the left menu and default stylesheet. This parameter will affectthe language used when setting up these pages.
Parameters:
  user - The admin user to use when creating the special pages.
Parameters:
  virtualWiki - The VirtualWiki for which special pages are beingcreated.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
throws:
  Exception - Thrown if any error occurs during method execution.



undeleteTopic
void undeleteTopic(Topic topic, TopicVersion topicVersion, boolean userVisible, Object transactionObject) throws Exception(Code)
Undelete a previously deleted topic by setting its delete date to a null value. Prior to calling this method the topic content should be restored to its previous value. A new TopicVersion should be supplied reflecting the topic undeletion event.
Parameters:
  topic - The Topic object that is being undeleted.
Parameters:
  topicVersion - A TopicVersion object that indicates the undeletedate, author, and other parameters for the topic.
Parameters:
  userVisible - Set to true if a recent change shouldshould be created indicating that the topic was undeleted,false otherwise.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
throws:
  Exception - Thrown if any error occurs during method execution.



updateSpecialPage
void updateSpecialPage(Locale locale, String virtualWiki, String topicName, WikiUser user, String ipAddress, Object transactionObject) throws Exception(Code)
Update a special page used on the wiki, such as the left menu or default stylesheet.
Parameters:
  locale - The locale to be used when updating a special page suchas the left menu and default stylesheet. This parameter will affectthe language used when updating up the page.
Parameters:
  virtualWiki - The VirtualWiki for which the special page are beingupdated.
Parameters:
  topicName - The name of the special page topic that is beingupdated.
Parameters:
  user - The admin user to use when updating the special page.
Parameters:
  ipAddress - The IP address of the user updating special pages.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
throws:
  Exception - Thrown if any error occurs during method execution.



writeFile
void writeFile(WikiFile wikiFile, WikiFileVersion wikiFileVersion, Object transactionObject) throws Exception(Code)
Add or update a WikiFile object. This method will add a new record if the WikiFile does not have a file ID, otherwise it will perform an update. A WikiFileVersion object will also be created to capture the author, date, and other parameters for the file.
Parameters:
  wikiFile - The WikiFile to add or update. If the WikiFile does nothave a file ID then a new record is created, otherwise an update isperformed.
Parameters:
  wikiFileVersion - A WikiFileVersion containing the author, date, andother information about the version being added.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
throws:
  Exception - Thrown if any error occurs during method execution.



writeRole
void writeRole(Role role, Object transactionObject, boolean update) throws Exception(Code)
Add or update a Role object. This method will add a new record if the role does not yet exist, otherwise the role will be updated.
Parameters:
  role - The Role to add or update. If the Role does not yetexist then a new record is created, otherwise an update isperformed.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
Parameters:
  update - A boolean value indicating whether this transaction isupdating an existing role or not.
throws:
  Exception - Thrown if any error occurs during method execution.



writeRoleMapGroup
void writeRoleMapGroup(int groupId, List roles, Object transactionObject) throws Exception(Code)
Add a set of group role mappings. This method will first delete all existing role mappings for the specified group, and will then create a mapping for each specified role.
Parameters:
  groupId - The group id for whom role mappings are being modified.
Parameters:
  roles - A List of String role names for all roles that areto be assigned to this group.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
throws:
  Exception - Thrown if any error occurs during method execution.



writeRoleMapUser
void writeRoleMapUser(int userId, List roles, Object transactionObject) throws Exception(Code)
Add a set of user role mappings. This method will first delete all existing role mappings for the specified user, and will then create a mapping for each specified role.
Parameters:
  userId - The user id for whom role mappings are being modified.
Parameters:
  roles - A List of String role names for all roles that areto be assigned to this user.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
throws:
  Exception - Thrown if any error occurs during method execution.



writeTopic
void writeTopic(Topic topic, TopicVersion topicVersion, LinkedHashMap categories, Vector links, boolean userVisible, Object transactionObject) throws Exception(Code)
Add or update a Topic object. This method will add a new record if the Topic does not have a topic ID, otherwise it will perform an update. A TopicVersion object will also be created to capture the author, date, and other parameters for the topic.
Parameters:
  topic - The Topic to add or update. If the Topic does not havea topic ID then a new record is created, otherwise an update isperformed.
Parameters:
  topicVersion - A TopicVersion containing the author, date, andother information about the version being added.
Parameters:
  categories - A mapping of categories and their associated sort keys (if any)for all categories that are associated with the current topic.
Parameters:
  links - A List of all topic names that are linked to from thecurrent topic. These will be passed to the search engine to createsearchable metadata.
Parameters:
  userVisible - Set to false if no recent change recordshould be created for the topic add/update, trueotherwise.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
throws:
  Exception - Thrown if any error occurs during method execution.



writeVirtualWiki
void writeVirtualWiki(VirtualWiki virtualWiki, Object transactionObject) throws Exception(Code)
Add or update a VirtualWiki object. This method will add a new record if the VirtualWiki does not have a virtual wiki ID, otherwise it will perform an update.
Parameters:
  virtualWiki - The VirtualWiki to add or update. If theVirtualWiki does not have a virtual wiki ID then a new record iscreated, otherwise an update is performed.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
throws:
  Exception - Thrown if any error occurs during method execution.



writeWatchlistEntry
void writeWatchlistEntry(Watchlist watchlist, String virtualWiki, String topicName, int userId, Object transactionObject) throws Exception(Code)
Add or delete an item from a user's watchlist. If the topic is already in the user's watchlist it will be deleted, otherwise it will be added.
Parameters:
  watchlist - The user's current Watchlist.
Parameters:
  virtualWiki - The virtual wiki name for the current virtual wiki.
Parameters:
  topicName - The name of the topic being added or removed fromthe watchlist.
Parameters:
  userId - The ID of the user whose watchlist is being updated.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
throws:
  Exception - Thrown if any error occurs during method execution.



writeWikiGroup
void writeWikiGroup(WikiGroup group, Object transactionObject) throws Exception(Code)
Add or update a WikiGroup object. This method will add a new record if the group does not have a group ID, otherwise it will perform an update.
Parameters:
  group - The WikiGroup to add or update. If the group does not havea group ID then a new record is created, otherwise an update isperformed.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
throws:
  Exception - Thrown if any error occurs during method execution.



writeWikiUser
void writeWikiUser(WikiUser user, WikiUserInfo userInfo, Object transactionObject) throws Exception(Code)
Add or update a WikiUser object. This method will add a new record if the WikiUser does not have a user ID, otherwise it will perform an update.
Parameters:
  user - The WikiUser being added or updated. If the WikiUser doesnot have a user ID then a new record is created, otherwise an updateis performed.
Parameters:
  userInfo - The WikiUserInfo object for the WikiUser being added orupdated.
Parameters:
  transactionObject - If this method is being called as part of atransaction then this parameter should contain the transaction object,such as a database connection. If this method is not part of atransaction then this value should be null.
throws:
  Exception - Thrown if any error occurs during method execution.



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