Openfire 3.9.3 Javadoc

org.jivesoftware.database
Class SchemaManager

java.lang.Object
  extended by org.jivesoftware.database.SchemaManager

public class SchemaManager
extends Object

Manages database schemas for Openfire and Openfire plugins. The manager uses the ofVersion database table to figure out which database schema is currently installed and then attempts to automatically apply database schema changes as necessary.

Running database schemas automatically requires appropriate database permissions. Without those permissions, the automatic installation/upgrade process will fail and users will be prompted to apply database changes manually.

Author:
Matt Tucker
See Also:
DbConnectionManager.getSchemaManager()

Method Summary
 boolean checkOpenfireSchema(Connection con)
          Checks the Openfire database schema to ensure that it's installed and up to date.
 boolean checkPluginSchema(Plugin plugin)
          Checks the plugin's database schema (if one is required) to ensure that it's installed and up to date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

checkOpenfireSchema

public boolean checkOpenfireSchema(Connection con)
Checks the Openfire database schema to ensure that it's installed and up to date. If the schema isn't present or up to date, an automatic update will be attempted.

Parameters:
con - a connection to the database.
Returns:
true if database schema checked out fine, or was automatically installed or updated successfully.

checkPluginSchema

public boolean checkPluginSchema(Plugin plugin)
Checks the plugin's database schema (if one is required) to ensure that it's installed and up to date. If the schema isn't present or up to date, an automatic update will be attempted.

Parameters:
plugin - the plugin.
Returns:
true if database schema checked out fine, or was automatically installed or updated successfully, or if it isn't needed. False will only be returned if there is an error.

Openfire 3.9.3 Javadoc

Copyright © 2003-2008 Jive Software.