Package org.jivesoftware.database
Class SchemaManager
java.lang.Object
org.jivesoftware.database.SchemaManager
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
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.
-
Constructor Details
-
SchemaManager
public SchemaManager()
-
-
Method Details
-
checkOpenfireSchema
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
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.
-