| org.jamwiki.db.QueryHandler
All known Subclasses: org.jamwiki.db.AnsiQueryHandler,
QueryHandler | public interface QueryHandler (Code) | | This interface provides all methods needed for retrieving, inserting, or updating
data from the database.
|
Method Summary | |
String | connectionValidationQuery() Returns the simplest possible query that can be used to validate
whether or not a database connection is valid. | void | createTables(Connection conn) Method called to set up all JAMWiki system tables, indexes, and other
required database objects. | void | deleteRecentChanges(int topicId, Connection conn) Delete all records from the recent changes table for a specific topic. | void | deleteRoleMapGroup(int groupId, Connection conn) Delete all role records for a specific group. | void | deleteRoleMapUser(int userId, Connection conn) Delete all role records for a specific user. | void | deleteTopicCategories(int topicId, Connection conn) Delete all categories associated with a topic. | void | deleteWatchlistEntry(int virtualWikiId, String topicName, int userId, Connection conn) Delete a user's watchlist entry using the topic name to determine which
entry to remove. | void | dropTables(Connection conn) Drop all JAMWiki database objects. | String | existenceValidationQuery() Return a simple query, that if successfully run indicates that JAMWiki
tables have been initialized in the database. | WikiResultSet | getAllTopicNames(int virtualWikiId) Retrieve a WikiResultSet containing all topic names that exist for a
virtual wiki. | WikiResultSet | getAllWikiFileVersions(WikiFile wikiFile, boolean descending) Retrieve a WikiResultSet consisting of all wiki file version information for
a given wiki file. | WikiResultSet | getCategories(int virtualWikiId, Pagination pagination) Retrieve a WikiResultSet containing all categories associated with a particular
virtual wiki. | WikiResultSet | getRecentChanges(String virtualWiki, Pagination pagination, boolean descending) Retrieve a WikiResultSet containing all recent changes made to the wiki for a
specific virtual wiki.
Parameters: virtualWiki - The name of the virtual wiki for which changes are beingretrieved. Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. Parameters: descending - If true then results are sorted newest tooldest. | WikiResultSet | getRecentChanges(int topicId, Pagination pagination, boolean descending) Retrieve a WikiResultSet containing all recent changes made to the wiki for a
specific topic.
Parameters: topicId - The id of the topic for which recent changes are beingretrieved. Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. Parameters: descending - If true then results are sorted newest tooldest. | WikiResultSet | getRoleMapByLogin(String loginFragment) Retrieve a WikiResultSet of user ids, group ids and role names for all
users whose login contains the given login fragment.
Parameters: loginFragment - A value that must be contained with the user'slogin. | WikiResultSet | getRoleMapByRole(String roleName) Retrieve a WikiResultSet of user ids, group ids and role names for
all users and groups who have been assigned the specified role.
Parameters: roleName - The name of the role being queried against. | WikiResultSet | getRoleMapGroup(String groupName) Retrieve a WikiResultSet containing all roles assigned to a given group.
Parameters: groupName - The name of the group for whom roles are being retrieved. | WikiResultSet | getRoleMapGroups() Retrieve a WikiResultSet of user ids, group ids and role names for
all groups that have been assigned a role.
A WikiResultSet of user ids, group ids and role names for allgroups that have been assigned a role. | WikiResultSet | getRoleMapUser(String login) Retrieve a WikiResultSet containing all roles assigned to a given user.
Parameters: login - The login of the user for whom roles are being retrieved. | WikiResultSet | getRoles() Retrieve a WikiResultSet containing all roles that have been defined for
the wiki. | WikiResultSet | getTopicsAdmin(int virtualWikiId, Pagination pagination) Retrieve a WikiResultSet containing the topic names of all admin-only
topics for the virtual wiki.
Parameters: virtualWikiId - The id of the virtual wiki for which topic namesare being retrieved. Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. | WikiResultSet | getUserContributions(String virtualWiki, String userString, Pagination pagination, boolean descending) Retrieve a WikiResultSet containing all recent changes made to the wiki by a
specific user.
Parameters: virtualWiki - The name of the virtual wiki for which user contributionsare being retrieved. Parameters: userString - The login of the user for whom changes are being retrieved; orfor anonymous users, the IP address of the user. Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. Parameters: descending - If true then results are sorted newest tooldest. | WikiResultSet | getVirtualWikis(Connection conn) Retrieve a WikiResultSet containing all virtual wiki information for all
virtual wikis.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. | WikiResultSet | getWatchlist(int virtualWikiId, int userId) Retrieve a WikiResultSet containing the topic ID and topic name for
topics in the user's watchlist.
Parameters: virtualWikiId - The virtual wiki ID for the virtual wiki for thewatchlist topics. Parameters: userId - The user ID for the user retrieving the watchlist. | WikiResultSet | getWatchlist(int virtualWikiId, int userId, Pagination pagination) Retrieve a WikiResultSet containing all recent changes for topics in the
user's watchlist.
Parameters: virtualWikiId - The virtual wiki ID for the virtual wiki for thewatchlist topics. Parameters: userId - The user ID for the user retrieving the watchlist. Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. | void | insertCategory(Category category, int virtualWikiId, Connection conn) Add a new category record to the database. | void | insertRecentChange(RecentChange change, int virtualWikiId, Connection conn) Add a new recent change record to the database. | void | insertRole(Role role, Connection conn) Add a new role record to the database. | void | insertRoleMap(int userId, int groupId, String role, Connection conn) Add a new role mapping for a specific user or group. | void | insertTopic(Topic topic, int virtualWikiId, Connection conn) Add a new topic record to the database. | void | insertTopicVersion(TopicVersion topicVersion, Connection conn) Add a new topic version record to the database. | void | insertVirtualWiki(VirtualWiki virtualWiki, Connection conn) Add a new virtual wiki record to the database. | void | insertWatchlistEntry(int virtualWikiId, String topicName, int userId, Connection conn) Add a new watchlist entry record to the database. | void | insertWikiFile(WikiFile wikiFile, int virtualWikiId, Connection conn) Add a new wiki file record to the database. | void | insertWikiFileVersion(WikiFileVersion wikiFileVersion, Connection conn) Add a new wiki file version record to the database. | void | insertWikiGroup(WikiGroup group, Connection conn) Add a new group record to the database. | void | insertWikiUser(WikiUser user, Connection conn) Add a new user record to the database. | void | insertWikiUserInfo(WikiUserInfo userInfo, Connection conn) Add a new user information record to the database. | WikiResultSet | lookupCategoryTopics(int virtualWikiId, String categoryName) Retrieve a result set containing the topic name and sort key for all
topics associated with a category.
Parameters: virtualWikiId - The virtual wiki id for the virtual wiki of the topicsbeing retrieved. Parameters: categoryName - The name of the category for which associated topicsare to be retrieved. | WikiResultSet | lookupTopic(int virtualWikiId, String topicName, boolean caseSensitive, Connection conn) Retrieve a WikiResultSet containing all topic information for a given topic.
Parameters: virtualWikiId - The virtual wiki id for the virtual wiki of the topicbeing retrieved. Parameters: topicName - The name of the topic being retrieved. Parameters: caseSensitive - Set to true if the topic name should besearched for in a case-sensitive manner. Parameters: conn - A database connection to use when connecting to the databasefrom this method. | WikiResultSet | lookupTopicByType(int virtualWikiId, int topicType, Pagination pagination) Retrieve a result set of all topics of a given type within a virtual wiki.
Parameters: virtualWikiId - The virtual wiki id for the virtual wiki of the topicsbeing retrieved. Parameters: topicType - The topic type (image, normal, etc) for the topics to beretrieved. Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. | WikiResultSet | lookupTopicCount(int virtualWikiId) Return a count of all topics, including redirects, comments pages and templates,
currently available on the Wiki. | WikiResultSet | lookupTopicVersion(int topicVersionId, Connection conn) Retrieve a result set containing a specific topic version.
Parameters: topicVersionId - The id for the topic version record being retrieved. Parameters: conn - A database connection to use when connecting to the databasefrom this method. | WikiResultSet | lookupWikiFile(int virtualWikiId, int topicId) Retrieve a result set containing all wiki file information for a given WikiFile.
Parameters: virtualWikiId - The virtual wiki id for the virtual wiki of the wiki filebeing retrieved. Parameters: topicId - The id of the parent topic for the wiki file being retrieved. | WikiResultSet | lookupWikiFileCount(int virtualWikiId) Return a count of all wiki files currently available on the Wiki. | WikiResultSet | lookupWikiUser(int userId, Connection conn) Retrieve a result set containing all user information for a given WikiUser.
Parameters: userId - The id of the user record being retrieved. Parameters: conn - A database connection to use when connecting to the databasefrom this method. | WikiResultSet | lookupWikiUser(String login, Connection conn) Retrieve a result set containing all user information for a given WikiUser.
Parameters: login - The login of the user record being retrieved. Parameters: conn - A database connection to use when connecting to the databasefrom this method. | WikiResultSet | lookupWikiUser(String login, String encryptedPassword, Connection conn) Retrieve a result set containing all user information for a given WikiUser.
Parameters: login - The login of the user record being retrieved. Parameters: encryptedPassword - The encrypted password for the user record beingretrieved. Parameters: conn - A database connection to use when connecting to the databasefrom this method. | WikiResultSet | lookupWikiUserCount() Return a count of all wiki users. | WikiResultSet | lookupWikiUserInfo(String login) Retrieve a result set containing all user information for a given
WikiUserInfo.
Parameters: login - The login of the user record being retrieved. | WikiResultSet | lookupWikiUsers(Pagination pagination) Retrieve a result set of all logins for every wiki user.
Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. | int | nextTopicId(Connection conn) Retrieve the next available topic id from the topic table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. | int | nextTopicVersionId(Connection conn) Retrieve the next available topic version id from the topic version table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. | int | nextVirtualWikiId(Connection conn) Retrieve the next available virtual wiki id from the virtual wiki table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. | int | nextWikiFileId(Connection conn) Retrieve the next available wiki file id from the wiki file table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. | int | nextWikiFileVersionId(Connection conn) Retrieve the next available wiki file version id from the wiki file
version table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. | int | nextWikiGroupId(Connection conn) Retrieve the next available wiki group id from the wiki group table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. | int | nextWikiUserId(Connection conn) Retrieve the next available wiki user id from the wiki user table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. | void | reloadRecentChanges(Connection conn) Refresh the recent changes content by reloading the recent changes table. | void | updateRole(Role role, Connection conn) Update a role record in the database. | void | updateTopic(Topic topic, int virtualWikiId, Connection conn) Update a topic record in the database. | void | updateVirtualWiki(VirtualWiki virtualWiki, Connection conn) Update a virtual wiki record in the database. | void | updateWikiFile(WikiFile wikiFile, int virtualWikiId, Connection conn) Update a wiki file record in the database. | void | updateWikiGroup(WikiGroup group, Connection conn) Update a group record in the database. | void | updateWikiUser(WikiUser user, Connection conn) Update a wiki user record in the database. | void | updateWikiUserInfo(WikiUserInfo userInfo, Connection conn) Update a wiki user information record in the database. |
connectionValidationQuery | String connectionValidationQuery()(Code) | | Returns the simplest possible query that can be used to validate
whether or not a database connection is valid. Note that the query
returned MUST NOT query any JAMWiki tables since it will be used prior
to setting up the JAMWiki tables.
Returns a simple query that can be used to validate a databaseconnection. |
createTables | void createTables(Connection conn) throws Exception(Code) | | Method called to set up all JAMWiki system tables, indexes, and other
required database objects. If a failure occurs during object creation
then this method will not attempt to clean up any objects that were
created prior to the failure.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
deleteRecentChanges | void deleteRecentChanges(int topicId, Connection conn) throws Exception(Code) | | Delete all records from the recent changes table for a specific topic.
Parameters: topicId - The topic id for which recent changes are being deleted. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
deleteRoleMapGroup | void deleteRoleMapGroup(int groupId, Connection conn) throws Exception(Code) | | Delete all role records for a specific group.
Parameters: groupId - The group id for which role records are being deleted. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
deleteRoleMapUser | void deleteRoleMapUser(int userId, Connection conn) throws Exception(Code) | | Delete all role records for a specific user.
Parameters: userId - The user id for which role records are being deleted. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
deleteTopicCategories | void deleteTopicCategories(int topicId, Connection conn) throws Exception(Code) | | Delete all categories associated with a topic.
Parameters: topicId - The topic for which category association records are beingdeleted. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
deleteWatchlistEntry | void deleteWatchlistEntry(int virtualWikiId, String topicName, int userId, Connection conn) throws Exception(Code) | | Delete a user's watchlist entry using the topic name to determine which
entry to remove.
Parameters: virtualWikiId - The id of the virtual wiki for which the watchlistentry is being deleted. Parameters: topicName - The topic name for which the watchlist entry is beingdeleted. Parameters: userId - The user for which the watchlist entry is being deleted. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
dropTables | void dropTables(Connection conn)(Code) | | Drop all JAMWiki database objects. This method drops tables, indexes, and
any database objects, as well as all data in those objects. Note that if
a failure occurs while deleting any one object the method will continue
trying to delete any remaining objects.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. |
existenceValidationQuery | String existenceValidationQuery()(Code) | | Return a simple query, that if successfully run indicates that JAMWiki
tables have been initialized in the database.
Returns a simple query that, if successfully run, indicatesthat JAMWiki tables have been set up in the database. |
getAllTopicNames | WikiResultSet getAllTopicNames(int virtualWikiId) throws Exception(Code) | | Retrieve a WikiResultSet containing all topic names that exist for a
virtual wiki. This method will not return the names of previously
deleted topics.
Parameters: virtualWikiId - The id of the virtual wiki for which topic namesare being retrieved. A WikiResultSet containing the names of all topics for the virtualwiki, not including any previously deleted topics. throws: Exception - Thrown if any error occurs during method execution. |
getAllWikiFileVersions | WikiResultSet getAllWikiFileVersions(WikiFile wikiFile, boolean descending) throws Exception(Code) | | Retrieve a WikiResultSet consisting of all wiki file version information for
a given wiki file. Version information is sorted by wiki file version id, which
in effect sorts the wiki file versions from newest to oldest.
Parameters: wikiFile - A WikiFile object for which version information is to be retrieved. Parameters: descending - If true then results are sorted newest tooldest. A WikiResultSet containing wiki file version information for allversions of the specified wiki file. throws: Exception - Thrown if any error occurs during method execution. |
getCategories | WikiResultSet getCategories(int virtualWikiId, Pagination pagination) throws Exception(Code) | | Retrieve a WikiResultSet containing all categories associated with a particular
virtual wiki. The result set may be limited by specifying the number of results
to retrieve in a Pagination object.
Parameters: virtualWikiId - The virtual wiki id for the virtual wiki from which allcategories are to be retrieved. Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. A WikiResultSet containing all categories associated with a particularvirtual wiki. throws: Exception - Thrown if any error occurs during method execution. |
getRecentChanges | WikiResultSet getRecentChanges(String virtualWiki, Pagination pagination, boolean descending) throws Exception(Code) | | Retrieve a WikiResultSet containing all recent changes made to the wiki for a
specific virtual wiki.
Parameters: virtualWiki - The name of the virtual wiki for which changes are beingretrieved. Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. Parameters: descending - If true then results are sorted newest tooldest. A WikiResultSet containing all recent changes for a particular virtualwiki. throws: Exception - Thrown if any error occurs during method execution. |
getRecentChanges | WikiResultSet getRecentChanges(int topicId, Pagination pagination, boolean descending) throws Exception(Code) | | Retrieve a WikiResultSet containing all recent changes made to the wiki for a
specific topic.
Parameters: topicId - The id of the topic for which recent changes are beingretrieved. Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. Parameters: descending - If true then results are sorted newest tooldest. A WikiResultSet containing all recent changes for a particular virtualwiki. throws: Exception - Thrown if any error occurs during method execution. |
getRoleMapByLogin | WikiResultSet getRoleMapByLogin(String loginFragment) throws Exception(Code) | | Retrieve a WikiResultSet of user ids, group ids and role names 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 WikiResultSet of user ids, group ids and role names for allusers whose login contains the login fragment. If no matches arefound then this method returns an empty WikiResultSet. throws: Exception - Thrown if any error occurs during method execution. |
getRoleMapByRole | WikiResultSet getRoleMapByRole(String roleName) throws Exception(Code) | | Retrieve a WikiResultSet of user ids, group ids and role names for
all users and groups who have been assigned the specified role.
Parameters: roleName - The name of the role being queried against. A WikiResultSet of user ids, group ids and role names for allusers and groups who have been assigned the specified role, or anempty WikiResultSet if no matches are found. throws: Exception - Thrown if any error occurs during method execution. |
getRoleMapGroup | WikiResultSet getRoleMapGroup(String groupName) throws Exception(Code) | | Retrieve a WikiResultSet containing all roles assigned to a given group.
Parameters: groupName - The name of the group for whom roles are being retrieved. A WikiResultSet of role names for the given user, or an emptyWikiResultSet if no roles are assigned to the user. throws: Exception - Thrown if any error occurs during method execution. |
getRoleMapGroups | WikiResultSet getRoleMapGroups() throws Exception(Code) | | Retrieve a WikiResultSet of user ids, group ids and role names for
all groups that have been assigned a role.
A WikiResultSet of user ids, group ids and role names for allgroups that have been assigned a role. If no matches are found thenthis method returns an empty WikiResultSet. throws: Exception - Thrown if any error occurs during method execution. |
getRoleMapUser | WikiResultSet getRoleMapUser(String login) throws Exception(Code) | | Retrieve a WikiResultSet containing all roles assigned to a given user.
Parameters: login - The login of the user for whom roles are being retrieved. A WikiResultSet of role names for the given user, or an emptyWikiResultSet if no roles are assigned to the user. throws: Exception - Thrown if any error occurs during method execution. |
getRoles | WikiResultSet getRoles() throws Exception(Code) | | Retrieve a WikiResultSet containing all roles that have been defined for
the wiki.
Returns a WikiResult set containing all roles that have beendefined for the wiki. throws: Exception - Thrown if any error occurs during method execution. |
getTopicsAdmin | WikiResultSet getTopicsAdmin(int virtualWikiId, Pagination pagination) throws Exception(Code) | | Retrieve a WikiResultSet containing the topic names of all admin-only
topics for the virtual wiki.
Parameters: virtualWikiId - The id of the virtual wiki for which topic namesare being retrieved. Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. A WikiResultSet containing the topic names of all admin-onlytopics for the virtual wiki. throws: Exception - Thrown if any error occurs during method execution. |
getUserContributions | WikiResultSet getUserContributions(String virtualWiki, String userString, Pagination pagination, boolean descending) throws Exception(Code) | | Retrieve a WikiResultSet containing all recent changes made to the wiki by a
specific user.
Parameters: virtualWiki - The name of the virtual wiki for which user contributionsare being retrieved. Parameters: userString - The login of the user for whom changes are being retrieved; orfor anonymous users, the IP address of the user. Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. Parameters: descending - If true then results are sorted newest tooldest. A WikiResultSet containing all recent changes made by a particular user. throws: Exception - Thrown if any error occurs during method execution. |
getVirtualWikis | WikiResultSet getVirtualWikis(Connection conn) throws Exception(Code) | | Retrieve a WikiResultSet containing all virtual wiki information for all
virtual wikis.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. Returns a WikiResult set containing all virtual wiki informationfor every virtual wiki. throws: Exception - Thrown if any error occurs during method execution. |
getWatchlist | WikiResultSet getWatchlist(int virtualWikiId, int userId) throws Exception(Code) | | Retrieve a WikiResultSet containing the topic ID and topic name for
topics in the user's watchlist.
Parameters: virtualWikiId - The virtual wiki ID for the virtual wiki for thewatchlist topics. Parameters: userId - The user ID for the user retrieving the watchlist. A WikiResultSet containing topic ID and topic name for allwatchlist items. throws: Exception - Thrown if any error occurs during method execution. |
getWatchlist | WikiResultSet getWatchlist(int virtualWikiId, int userId, Pagination pagination) throws Exception(Code) | | Retrieve a WikiResultSet containing all recent changes for topics in the
user's watchlist.
Parameters: virtualWikiId - The virtual wiki ID for the virtual wiki for thewatchlist topics. Parameters: userId - The user ID for the user retrieving the watchlist. Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. A WikiResultSet containing recent changes for the watchlist. throws: Exception - Thrown if any error occurs during method execution. |
insertCategory | void insertCategory(Category category, int virtualWikiId, Connection conn) throws Exception(Code) | | Add a new category record to the database. Note that this method will fail
if an existing category of the same name is already associated with the
topic.
Parameters: category - The category record that is being created. Parameters: virtualWikiId - The virtual wiki id for the record that is being added. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
insertRecentChange | void insertRecentChange(RecentChange change, int virtualWikiId, Connection conn) throws Exception(Code) | | Add a new recent change record to the database.
Parameters: change - The RecentChange record that is to be added to the database. Parameters: virtualWikiId - The virtual wiki id for the record that is being added. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
insertRole | void insertRole(Role role, Connection conn) throws Exception(Code) | | Add a new role record to the database. The role must not already exist
in the database or else an error will be thrown.
Parameters: role - The Role record that is to be added to the database. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
insertRoleMap | void insertRoleMap(int userId, int groupId, String role, Connection conn) throws Exception(Code) | | Add a new role mapping for a specific user or group. The role
mapping must not already exist in the database or else an error will
be thrown.
Parameters: userId - The user id for the user being assigned a role, or -1 ifa group is being assigned a role. Parameters: groupId - The group id for the group being assigned a role, or -1if a user is being assigned a role. Parameters: role - The role name for the role being assigned. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
insertTopic | void insertTopic(Topic topic, int virtualWikiId, Connection conn) throws Exception(Code) | | Add a new topic record to the database. The topic must not already exist
in the database or else an error will be thrown.
Parameters: topic - The Topic record that is to be added to the database. Parameters: virtualWikiId - The virtual wiki id for the record that is being added. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
insertTopicVersion | void insertTopicVersion(TopicVersion topicVersion, Connection conn) throws Exception(Code) | | Add a new topic version record to the database. The topic version must
not already exist in the database or else an error will be thrown.
Parameters: topicVersion - The TopicVersion record that is to be added to the database. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
insertVirtualWiki | void insertVirtualWiki(VirtualWiki virtualWiki, Connection conn) throws Exception(Code) | | Add a new virtual wiki record to the database. The virtual wiki must
not already exist in the database or else an error will be thrown.
Parameters: virtualWiki - The VirtualWiki record that is to be added to the database. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
insertWatchlistEntry | void insertWatchlistEntry(int virtualWikiId, String topicName, int userId, Connection conn) throws Exception(Code) | | Add a new watchlist entry record to the database. An identical entry
must not already exist or else an exception will be thrown.
Parameters: virtualWikiId - The virtual wiki id for the watchlist entry beinginserted. Parameters: topicName - The name of the topic for the watchlist entry. Thisvalue should be set only for topics that do not yet exist, and shouldbe set to null for existing topics. Parameters: userId - The ID of the user for the watchlist entry. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
insertWikiFile | void insertWikiFile(WikiFile wikiFile, int virtualWikiId, Connection conn) throws Exception(Code) | | Add a new wiki file record to the database. The wiki file must not
already exist in the database or else an error will be thrown.
Parameters: wikiFile - The WikiFile record that is to be added to the database. Parameters: virtualWikiId - The virtual wiki id for the record that is being added. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
insertWikiFileVersion | void insertWikiFileVersion(WikiFileVersion wikiFileVersion, Connection conn) throws Exception(Code) | | Add a new wiki file version record to the database. The wiki file
version must not already exist in the database or else an error will
be thrown.
Parameters: wikiFileVersion - The WikiFileVersion record that is to be addedto the database. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
insertWikiGroup | void insertWikiGroup(WikiGroup group, Connection conn) throws Exception(Code) | | Add a new group record to the database. The group must not already exist
in the database or else an error will be thrown.
Parameters: group - The WikiGroup record that is to be added to the database. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
insertWikiUser | void insertWikiUser(WikiUser user, Connection conn) throws Exception(Code) | | Add a new user record to the database. The user must not already exist
in the database or else an error will be thrown.
Parameters: user - The WikiUser record that is to be added to the database. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
insertWikiUserInfo | void insertWikiUserInfo(WikiUserInfo userInfo, Connection conn) throws Exception(Code) | | Add a new user information record to the database. The user information
must not already exist in the database or else an error will be thrown.
Parameters: userInfo - The WikiUserInfo record that is to be added to thedatabase. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
lookupCategoryTopics | WikiResultSet lookupCategoryTopics(int virtualWikiId, String categoryName) throws Exception(Code) | | Retrieve a result set containing the topic name and sort key for all
topics associated with a category.
Parameters: virtualWikiId - The virtual wiki id for the virtual wiki of the topicsbeing retrieved. Parameters: categoryName - The name of the category for which associated topicsare to be retrieved. A WikiResultSet containing topic name and sort key for all topicsassociated with a specific category. throws: Exception - Thrown if any error occurs during method execution. |
lookupTopic | WikiResultSet lookupTopic(int virtualWikiId, String topicName, boolean caseSensitive, Connection conn) throws Exception(Code) | | Retrieve a WikiResultSet containing all topic information for a given topic.
Parameters: virtualWikiId - The virtual wiki id for the virtual wiki of the topicbeing retrieved. Parameters: topicName - The name of the topic being retrieved. Parameters: caseSensitive - Set to true if the topic name should besearched for in a case-sensitive manner. Parameters: conn - A database connection to use when connecting to the databasefrom this method. A WikiResultSet containing all topic information for the given topicname and virtual wiki. If no matching topic is found an empty result set isreturned. throws: Exception - Thrown if any error occurs during method execution. |
lookupTopicByType | WikiResultSet lookupTopicByType(int virtualWikiId, int topicType, Pagination pagination) throws Exception(Code) | | Retrieve a result set of all topics of a given type within a virtual wiki.
Parameters: virtualWikiId - The virtual wiki id for the virtual wiki of the topicsbeing retrieved. Parameters: topicType - The topic type (image, normal, etc) for the topics to beretrieved. Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. A WikiResult set of all non-deleted topics for the given virtual wikiof the specified topic type, and within the bounds specified by the paginationobject. throws: Exception - Thrown if any error occurs during method execution. |
lookupTopicCount | WikiResultSet lookupTopicCount(int virtualWikiId) throws Exception(Code) | | Return a count of all topics, including redirects, comments pages and templates,
currently available on the Wiki. This method excludes deleted topics.
Parameters: virtualWikiId - The virtual wiki id for the virtual wiki of the topicsbeing retrieved. |
lookupTopicVersion | WikiResultSet lookupTopicVersion(int topicVersionId, Connection conn) throws Exception(Code) | | Retrieve a result set containing a specific topic version.
Parameters: topicVersionId - The id for the topic version record being retrieved. Parameters: conn - A database connection to use when connecting to the databasefrom this method. A WikiResultSet containing the topic version record, or an emptyresult set if no matching record is found. throws: Exception - Thrown if any error occurs during method execution. |
lookupWikiFile | WikiResultSet lookupWikiFile(int virtualWikiId, int topicId) throws Exception(Code) | | Retrieve a result set containing all wiki file information for a given WikiFile.
Parameters: virtualWikiId - The virtual wiki id for the virtual wiki of the wiki filebeing retrieved. Parameters: topicId - The id of the parent topic for the wiki file being retrieved. A WikiResultSet containing all wiki file information for the given topicid and virtual wiki. If no matching wiki file is found an empty result set isreturned. throws: Exception - Thrown if any error occurs during method execution. |
lookupWikiFileCount | WikiResultSet lookupWikiFileCount(int virtualWikiId) throws Exception(Code) | | Return a count of all wiki files currently available on the Wiki. This
method excludes deleted files.
Parameters: virtualWikiId - The virtual wiki id for the virtual wiki of the filesbeing retrieved. |
lookupWikiUser | WikiResultSet lookupWikiUser(int userId, Connection conn) throws Exception(Code) | | Retrieve a result set containing all user information for a given WikiUser.
Parameters: userId - The id of the user record being retrieved. Parameters: conn - A database connection to use when connecting to the databasefrom this method. A WikiResultSet containing all information for the given user, oran empty result set if no matching user exists. throws: Exception - Thrown if any error occurs during method execution. |
lookupWikiUser | WikiResultSet lookupWikiUser(String login, Connection conn) throws Exception(Code) | | Retrieve a result set containing all user information for a given WikiUser.
Parameters: login - The login of the user record being retrieved. Parameters: conn - A database connection to use when connecting to the databasefrom this method. A WikiResultSet containing all information for the given user, oran empty result set if no matching user exists. throws: Exception - Thrown if any error occurs during method execution. |
lookupWikiUser | WikiResultSet lookupWikiUser(String login, String encryptedPassword, Connection conn) throws Exception(Code) | | Retrieve a result set containing all user information for a given WikiUser.
Parameters: login - The login of the user record being retrieved. Parameters: encryptedPassword - The encrypted password for the user record beingretrieved. Parameters: conn - A database connection to use when connecting to the databasefrom this method. A WikiResultSet containing all information for the given user, oran empty result set if no matching user exists. throws: Exception - Thrown if any error occurs during method execution. |
lookupWikiUserInfo | WikiResultSet lookupWikiUserInfo(String login) throws Exception(Code) | | Retrieve a result set containing all user information for a given
WikiUserInfo.
Parameters: login - The login of the user record being retrieved. A WikiResultSet containing all information for the given user, oran empty result set if no matching user exists. throws: Exception - Thrown if any error occurs during method execution. |
lookupWikiUsers | WikiResultSet lookupWikiUsers(Pagination pagination) throws Exception(Code) | | Retrieve a result set of all logins for every wiki user.
Parameters: pagination - A Pagination object that specifies the number of resultsand starting result offset for the result set to be retrieved. A WikiResult set of all logins for all wiki users, within thebounds specified by the pagination object. throws: Exception - Thrown if any error occurs during method execution. |
nextTopicId | int nextTopicId(Connection conn) throws Exception(Code) | | Retrieve the next available topic id from the topic table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. The next available topic id from the topic table. throws: Exception - Thrown if any error occurs during method execution. |
nextTopicVersionId | int nextTopicVersionId(Connection conn) throws Exception(Code) | | Retrieve the next available topic version id from the topic version table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. The next available topic version id from the topic version table. throws: Exception - Thrown if any error occurs during method execution. |
nextVirtualWikiId | int nextVirtualWikiId(Connection conn) throws Exception(Code) | | Retrieve the next available virtual wiki id from the virtual wiki table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. The next available virtual wiki id from the virtual wiki table. throws: Exception - Thrown if any error occurs during method execution. |
nextWikiFileId | int nextWikiFileId(Connection conn) throws Exception(Code) | | Retrieve the next available wiki file id from the wiki file table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. The next available wiki file id from the wiki file table. throws: Exception - Thrown if any error occurs during method execution. |
nextWikiFileVersionId | int nextWikiFileVersionId(Connection conn) throws Exception(Code) | | Retrieve the next available wiki file version id from the wiki file
version table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. The next available wiki file version id from the wiki fileversion table. throws: Exception - Thrown if any error occurs during method execution. |
nextWikiGroupId | int nextWikiGroupId(Connection conn) throws Exception(Code) | | Retrieve the next available wiki group id from the wiki group table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. The next available wiki group id from the wiki group table. throws: Exception - Thrown if any error occurs during method execution. |
nextWikiUserId | int nextWikiUserId(Connection conn) throws Exception(Code) | | Retrieve the next available wiki user id from the wiki user table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. The next available wiki user id from the wiki user table. throws: Exception - Thrown if any error occurs during method execution. |
reloadRecentChanges | void reloadRecentChanges(Connection conn) throws Exception(Code) | | Refresh the recent changes content by reloading the recent changes table.
Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
updateRole | void updateRole(Role role, Connection conn) throws Exception(Code) | | Update a role record in the database.
Parameters: role - The Role record that is to be updated in the database. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
updateTopic | void updateTopic(Topic topic, int virtualWikiId, Connection conn) throws Exception(Code) | | Update a topic record in the database.
Parameters: topic - The Topic record that is to be updated in the database. Parameters: virtualWikiId - The virtual wiki id for the record that is being updated. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
updateVirtualWiki | void updateVirtualWiki(VirtualWiki virtualWiki, Connection conn) throws Exception(Code) | | Update a virtual wiki record in the database.
Parameters: virtualWiki - The VirtualWiki record that is to be updated in the database. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
updateWikiFile | void updateWikiFile(WikiFile wikiFile, int virtualWikiId, Connection conn) throws Exception(Code) | | Update a wiki file record in the database.
Parameters: wikiFile - The WikiFile record that is to be updated in the database. Parameters: virtualWikiId - The virtual wiki id for the record that is being updated. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
updateWikiGroup | void updateWikiGroup(WikiGroup group, Connection conn) throws Exception(Code) | | Update a group record in the database.
Parameters: group - The WikiGroup record that is to be updated in the database. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
updateWikiUser | void updateWikiUser(WikiUser user, Connection conn) throws Exception(Code) | | Update a wiki user record in the database.
Parameters: user - The WikiUser record that is to be updated in the database. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
updateWikiUserInfo | void updateWikiUserInfo(WikiUserInfo userInfo, Connection conn) throws Exception(Code) | | Update a wiki user information record in the database.
Parameters: userInfo - The WikiUserInfo record that is to be updated in thedatabase. Parameters: conn - A database connection to use when connecting to the databasefrom this method. throws: Exception - Thrown if any error occurs during method execution. |
|
|