Package com.jalios.jcms.db
Class SchemaUpdater
- java.lang.Object
-
- com.jalios.jcms.db.SchemaUpdater
-
public class SchemaUpdater extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CORE_SCOPE
static java.lang.String
JALIOS_SQL_SEPARATOR
static java.lang.String
SCOPE
static java.lang.String
VERSION
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doSchemaUpdate()
Do schema update from slq files.SchemaVersion
getCoreVersion()
get the current Core schema version from dBstatic SchemaUpdater
getInstance()
protected static SchemaUpdater
getInstance(java.lang.String coreBaseDir, java.lang.String pluginsBaseDir, java.lang.String scopeSuffix)
To be only used by unit testSchemaVersion
getPluginVersion(java.lang.String pluginName)
get the current plugin schema version from dB
-
-
-
Field Detail
-
JALIOS_SQL_SEPARATOR
public static final java.lang.String JALIOS_SQL_SEPARATOR
- See Also:
- Constant Field Values
-
SCOPE
public static final java.lang.String SCOPE
- See Also:
- Constant Field Values
-
CORE_SCOPE
public static final java.lang.String CORE_SCOPE
- See Also:
- Constant Field Values
-
VERSION
public static final java.lang.String VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static SchemaUpdater getInstance()
-
getInstance
protected static SchemaUpdater getInstance(java.lang.String coreBaseDir, java.lang.String pluginsBaseDir, java.lang.String scopeSuffix)
To be only used by unit test
-
getCoreVersion
public SchemaVersion getCoreVersion()
get the current Core schema version from dB- Returns:
- the
SchemaVersion
(null if not yet present in db)
-
getPluginVersion
public SchemaVersion getPluginVersion(java.lang.String pluginName)
get the current plugin schema version from dB- Parameters:
pluginName
- the name of the plugin- Returns:
- the
SchemaVersion
(null if not yet present in db)
-
doSchemaUpdate
public void doSchemaUpdate() throws java.lang.Exception
Do schema update from slq files. each schema version are done in distinct transaction- Throws:
java.lang.Exception
- Exceptio thrown if an update cannot be done
-
-