Package com.im.df.impl.db.api
Class DBImplSchemaProvider
- java.lang.Object
-
- com.im.df.impl.db.api.DBImplSchemaProvider
-
public final class DBImplSchemaProvider extends Object
This class is used as starting point to DIF database implementation ofDFSchemaProvider
. UsecreateSchemaProvider(PropsProvider)
method to create a new instance ofDFSchemaProvider
.The basic idea is that this class creates a default implementation of
DFSchemaProvider
and through this other basic DIF objects will be accessed (DFSchema
,DFEntities
, etc.). To connect to data source this default implementation needs some configuration information (usually DB driver, DB URL, username, password, etc.). These properties can be modified during schema initialisation process and so should be stored for next time (e.g. remember username).And so there is a
DBImplSchemaProvider.PropsProvider
interface which provide the current connection properties and is able to store updated values. The typical implementation of this interface will read/write the props from file.- Author:
- Petr Hamernik
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DBImplSchemaProvider.PropsProvider
Callback for reading/writing schema init properties.static interface
DBImplSchemaProvider.PropsProviderExtra
Extra implementation can provide also a capability to be added toDFSchema
when it's created.static class
DBImplSchemaProvider.ShowOpts
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.im.df.api.DFSchemaProvider
createSchemaProvider(DBImplSchemaProvider.PropsProvider propsProvider)
Creates the schema provider based on properties given by propsProvider.static void
decryptUserAndPass(Properties props, Set<String> encryptedKeys)
static void
encrypUserAndPass(Properties props, Set<String> originallyEncryptedKeys)
-
-
-
Field Detail
-
SCHEMA_ID
public static final String SCHEMA_ID
Constant used byDBImplSchemaProvider.PropsProvider
. DFSchema's id- See Also:
- Constant Field Values
-
SCHEMA_NAME
public static final String SCHEMA_NAME
Constant used byDBImplSchemaProvider.PropsProvider
. DFSchema's display name- See Also:
- Constant Field Values
-
SCHEMA_AUTO_CONNECT
public static final String SCHEMA_AUTO_CONNECT
Constant used byDBImplSchemaProvider.PropsProvider
. Should schema be auto-connected after project opening? If not present means 'false'- See Also:
- Constant Field Values
-
DATABASE_IS_LOCAL
public static final String DATABASE_IS_LOCAL
Constant used byDBImplSchemaProvider.PropsProvider
. Is the database local or remote?- See Also:
- Constant Field Values
-
DATABASE_URL
public static final String DATABASE_URL
Constant used byDBImplSchemaProvider.PropsProvider
. Database URL- See Also:
- Constant Field Values
-
DATABASE_DRIVER
public static final String DATABASE_DRIVER
Constant used byDBImplSchemaProvider.PropsProvider
. Database driver- See Also:
- Constant Field Values
-
DATABASE_USERNAME
public static final String DATABASE_USERNAME
Constant used byDBImplSchemaProvider.PropsProvider
. Database connection username- See Also:
- Constant Field Values
-
DATABASE_PASSWORD
public static final String DATABASE_PASSWORD
Constant used byDBImplSchemaProvider.PropsProvider
. Database connection password- See Also:
- Constant Field Values
-
ENCRYPT_ALGORITHM
public static final String ENCRYPT_ALGORITHM
Constant used byDBImplSchemaProvider.PropsProvider
. Version of algorithm for encryption the security.- See Also:
- Constant Field Values
-
DATABASE_SCHEMA
public static final String DATABASE_SCHEMA
Constant used byDBImplSchemaProvider.PropsProvider
. Database schema (some DBs don't use that)- See Also:
- Constant Field Values
-
DATABASE_CATALOG
public static final String DATABASE_CATALOG
Constant used byDBImplSchemaProvider.PropsProvider
. Database catalog (some DBs don't use that)- See Also:
- Constant Field Values
-
IJC_LICENSE
public static final String IJC_LICENSE
- See Also:
- Constant Field Values
-
IJC_USERNAME
public static final String IJC_USERNAME
Constant used byDBImplSchemaProvider.PropsProvider
. IJC username (if IJC authorization is used)- See Also:
- Constant Field Values
-
IJC_PASSWORD
public static final String IJC_PASSWORD
Constant used byDBImplSchemaProvider.PropsProvider
. IJC password (if IJC authorization is used)- See Also:
- Constant Field Values
-
SERVER_SCHEMA_REFRESH_URL
public static final String SERVER_SCHEMA_REFRESH_URL
A schema property name to specify URL to deployed connect for schema refresh.- See Also:
- Constant Field Values
-
SERVER_SCHEMA_REFRESH_ID
public static final String SERVER_SCHEMA_REFRESH_ID
A schema property name to specify a server schema id of deployed connect for schema refresh. The server schema id is file name of ijs file without extension.- See Also:
- Constant Field Values
-
SERVER_SCHEMA_REFRESH_HTTP_WARNING
public static final String SERVER_SCHEMA_REFRESH_HTTP_WARNING
A schema property name to specify HTTP warning to deployed connect for schema refresh. Value is true by default and warning is shown for HTTP. For security reasons URL with HTTPS is preferred.- See Also:
- Constant Field Values
-
SHOW_OPTIONS_IJCSERVER_USERNAME
public static final String SHOW_OPTIONS_IJCSERVER_USERNAME
- See Also:
- Constant Field Values
-
SHOW_OPTIONS_IJC_USERNAME
public static final String SHOW_OPTIONS_IJC_USERNAME
- See Also:
- Constant Field Values
-
DISABLE_REMEBER_IJC_PASSWORD
public static final String DISABLE_REMEBER_IJC_PASSWORD
- See Also:
- Constant Field Values
-
SHOW_OPTIONS_DB_USERNAME
public static final String SHOW_OPTIONS_DB_USERNAME
- See Also:
- Constant Field Values
-
SHOW_OPTIONS_MODE_SELECT
public static final String SHOW_OPTIONS_MODE_SELECT
- See Also:
- Constant Field Values
-
SHOW_OPTIONS_MODE_ADMIN
public static final String SHOW_OPTIONS_MODE_ADMIN
- See Also:
- Constant Field Values
-
-
Method Detail
-
createSchemaProvider
public static com.im.df.api.DFSchemaProvider createSchemaProvider(DBImplSchemaProvider.PropsProvider propsProvider)
Creates the schema provider based on properties given by propsProvider. If you want to simplify the schema initialization, useDIFUtilities.registerWhenSchemaReady(DFSchemaProvider, SchemaReadyRunnable)
then.- Parameters:
propsProvider
- The PropsProvider which provides the properties required to initialize the DFSchemaProvider- Returns:
- A fully initialized DFSchemaProvider instance.
-
encrypUserAndPass
public static void encrypUserAndPass(Properties props, Set<String> originallyEncryptedKeys)
-
decryptUserAndPass
public static void decryptUserAndPass(Properties props, Set<String> encryptedKeys)
-
-