tigase.util

## Class SchemaLoader

- java.lang.Object
- - tigase.util.SchemaLoader

-     public abstract class SchemaLoader
      extends Object

  Author:
    andrzej

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SchemaLoader.Result`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SchemaLoader()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract SchemaLoader.Result` | `addXmppAdminAccount(Properties variables)` Method attempts to add XMPP admin user account to the database using `AuthRepository`.
    `abstract SchemaLoader.Result` | `loadSchemaFile(Properties variables)` Method checks whether the connection to the database is possible and that database of specified name exists.
    `static SchemaLoader` | `newInstance(Properties props)`
    `abstract SchemaLoader.Result` | `postInstallation(Properties variables)`
    `abstract SchemaLoader.Result` | `printInfo(Properties variables)`
    `abstract SchemaLoader.Result` | `shutdown(Properties variables)`
    `abstract SchemaLoader.Result` | `validateDBConnection(Properties variables)` Method validates whether the connection can at least be established.
    `abstract SchemaLoader.Result` | `validateDBExists(Properties variables)` Method, if the connection is validated by `validateDBConnection`, checks whether desired database exists.
    `abstract SchemaLoader.Result` | `validateDBSchema(Properties variables)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SchemaLoader

          public SchemaLoader()

  - ### Method Detail

    - #### newInstance

          public static SchemaLoader newInstance(Properties props)

    - #### validateDBConnection

          public abstract SchemaLoader.Result validateDBConnection(Properties variables)

      Method validates whether the connection can at least be established. If yes then appropriate flag is set.
      Parameters:
        `variables` - set of `Properties` with all configuration options

    - #### validateDBExists

          public abstract SchemaLoader.Result validateDBExists(Properties variables)

      Method, if the connection is validated by `validateDBConnection`, checks whether desired database exists. If not it creates such database using `*-installer-create-db.sql` schema file substituting it's variables with ones provided.
      Parameters:
        `variables` - set of `Properties` with all configuration options

    - #### validateDBSchema

          public abstract SchemaLoader.Result validateDBSchema(Properties variables)

    - #### postInstallation

          public abstract SchemaLoader.Result postInstallation(Properties variables)

    - #### printInfo

          public abstract SchemaLoader.Result printInfo(Properties variables)

    - #### addXmppAdminAccount

          public abstract SchemaLoader.Result addXmppAdminAccount(Properties variables)

      Method attempts to add XMPP admin user account to the database using `AuthRepository`.
      Parameters:
        `variables` - set of `Properties` with all configuration options

    - #### loadSchemaFile

          public abstract SchemaLoader.Result loadSchemaFile(Properties variables)

      Method checks whether the connection to the database is possible and that database of specified name exists. If yes then a schema file from properties is loaded.
      Parameters:
        `variables` - set of `Properties` with all configuration options

    - #### shutdown

          public abstract SchemaLoader.Result shutdown(Properties variables)

Copyright © 2017 "Tigase, Inc.". All rights reserved.