Modifier and Type | Interface and Description |
---|---|
static interface |
ApplicationBuilder.HasLogglerName
Interface used for getting logger names.
|
static class |
ApplicationBuilder.LogType
The type of logging to change the settings for.
|
Modifier and Type | Method and Description |
---|---|
APP |
build()
Builds this application.
|
static <BUILDER extends ApplicationBuilder<Speedment,BUILDER>> |
create(Class<? extends ApplicationMetadata> applicationMetadataclass)
Creates and returns a new ApplicationBuilder configured with the given
ApplicationMetadata class.
|
static <BUILDER extends ApplicationBuilder<Speedment,BUILDER>> |
empty()
Creates and returns a new empty
ApplicationBuilder . |
static <BUILDER extends ApplicationBuilder<Speedment,BUILDER>> |
empty(ClassLoader classLoader)
Creates and returns a new empty
ApplicationBuilder . |
static <BUILDER extends ApplicationBuilder<Speedment,BUILDER>> |
standard()
Creates and returns a new standard ApplicationBuilder.
|
static <BUILDER extends ApplicationBuilder<Speedment,BUILDER>> |
standard(ClassLoader classLoader)
Creates and returns a new standard ApplicationBuilder.
|
<C extends Document & HasEnabled> |
with(Class<C> type,
BiConsumer<com.speedment.common.injector.Injector,C> consumer)
Configures a parameter for all
Document of a certain class. |
<C extends Document & HasEnabled> |
with(Class<C> type,
Consumer<C> consumer)
Configures a parameter for all
Document of a certain class. |
<C extends Document & HasEnabled> |
with(Class<C> type,
String name,
BiConsumer<com.speedment.common.injector.Injector,C> consumer)
Configures a parameter for the named
Document of a certain class. |
default <C extends Document & HasEnabled> |
with(Class<C> type,
String name,
Consumer<C> consumer)
Configures a parameter for the named
Document of a certain class. |
BUILDER |
withBundle(Class<? extends com.speedment.common.injector.InjectBundle> bundleClass)
Adds a custom bundle of dependency injectable implementation classes.
|
default <ENTITY,I extends HasDbmsName & HasSchemaName & HasTableName & HasColumnName> |
withColumn(I id,
BiConsumer<com.speedment.common.injector.Injector,Column> consumer)
Configures a parameter for the identified column.
|
default <ENTITY,I extends HasDbmsName & HasSchemaName & HasTableName & HasColumnName> |
withColumn(I id,
Consumer<Column> consumer)
Configures a parameter for the identified table.
|
BUILDER |
withComponent(Class<?> componentClass)
Adds a custom component implementation class.
|
BUILDER |
withComponent(String key,
Class<?> componentClass)
Deprecated.
The parameter
key is not forwarded to the dependency
injection framework, so this method has exactly the same
behaviour as withComponent(java.lang.Class) , so it
is redundant. |
default <I extends HasDbmsName> |
withConnectionUrl(I id,
String connectionUrl)
Configures a connection URL for the identified dbms.
|
BUILDER |
withConnectionUrl(String connectionUrl)
Configures a connection URL for all dbmses in this project.
|
BUILDER |
withConnectionUrl(String dbmsName,
String connectionUrl)
Configures a connection URL for the named dbms in this project.
|
default <ENTITY,I extends HasDbmsName> |
withDbms(I identifier,
BiConsumer<com.speedment.common.injector.Injector,Dbms> consumer)
Configures a parameter for the identified dbms.
|
default <ENTITY,I extends HasDbmsName> |
withDbms(I id,
Consumer<Dbms> consumer)
Configures a parameter for the identified dbms.
|
default <I extends HasDbmsName> |
withIpAddress(I id,
String ipAddress)
Configures an IP Address for the identified dbms.
|
BUILDER |
withIpAddress(String ipAddress)
Configures an IP-address for all dbmses in this project.
|
BUILDER |
withIpAddress(String dbmsName,
String ipAddress)
Configures an IP-address for the named dbms.
|
BUILDER |
withLogging(ApplicationBuilder.HasLogglerName namer)
Adds a logging configuration to the application.
|
<M extends Manager<?>> |
withManager(Class<M> managerImplType)
Adds a custom manager.
|
BUILDER |
withParam(String key,
String value)
Sets a config parameter that will be set automatically in all instances
created during initialization.
|
BUILDER |
withPassword(char[] password)
Configures a password for all dbmses in this project.
|
default <I extends HasDbmsName> |
withPassword(I id,
char[] password)
Configures a password for the identified dbms.
|
default <I extends HasDbmsName> |
withPassword(I id,
String password)
Configures a password for the identified dbms.
|
BUILDER |
withPassword(String password)
Configures a password for all dbmses in this project.
|
BUILDER |
withPassword(String dbmsName,
char[] password)
Configures a password for the named dbms.
|
BUILDER |
withPassword(String dbmsName,
String password)
Configures a password for the named dbms.
|
default <I extends HasDbmsName> |
withPort(I id,
int port)
Configures a port for the identified dbms.
|
BUILDER |
withPort(int port)
Configures a port for all dbmses in this project.
|
BUILDER |
withPort(String dbmsName,
int port)
Configures a port for the named dbms.
|
default <ENTITY,I extends HasDbmsName & HasSchemaName> |
withSchema(I identifier,
BiConsumer<com.speedment.common.injector.Injector,Schema> consumer)
Configures a parameter for the identified schema.
|
default <ENTITY,I extends HasDbmsName & HasSchemaName> |
withSchema(I id,
Consumer<Schema> consumer)
Configures a parameter for the identified schema.
|
BUILDER |
withSchema(String schemaName)
Configures a new schema name for all schemas in this project.
|
BUILDER |
withSchema(String oldSchemaName,
String schemaName)
Configures a new schema name for the named old schema name.
|
BUILDER |
withSkipCheckDatabaseConnectivity()
Sets that the initial database check shall be skipped upon build().
|
BUILDER |
withSkipLogoPrintout()
Sets that the logo printout shall be skipped upon build().
|
BUILDER |
withSkipValidateRuntimeConfig()
Sets that the initial validation of the configuration shall be skipped
upon build().
|
default <ENTITY,I extends HasDbmsName & HasSchemaName & HasTableName> |
withTable(I identifier,
BiConsumer<com.speedment.common.injector.Injector,Table> consumer)
Configures a parameter for the identified table.
|
default <ENTITY,I extends HasDbmsName & HasSchemaName & HasTableName> |
withTable(I id,
Consumer<Table> consumer)
Configures a parameter for the identified table.
|
default <I extends HasDbmsName> |
withUsername(I id,
String username)
Configures a username for the identified dbms.
|
BUILDER |
withUsername(String username)
Configures a username for all dbmses in this project.
|
BUILDER |
withUsername(String dbmsName,
String username)
Configures a username for the named dbms.
|
default <ENTITY,I extends HasDbmsName> BUILDER withDbms(I id, Consumer<Dbms> consumer)
ENTITY
- entity typeI
- the identifier typeid
- of the dbmsconsumer
- the consumer to applydefault <ENTITY,I extends HasDbmsName> BUILDER withDbms(I identifier, BiConsumer<com.speedment.common.injector.Injector,Dbms> consumer)
ENTITY
- entity typeI
- the identifier typeidentifier
- of the dbmsconsumer
- the consumer to applydefault <ENTITY,I extends HasDbmsName & HasSchemaName> BUILDER withSchema(I id, Consumer<Schema> consumer)
ENTITY
- entity typeI
- the identifier typeid
- of the schemaconsumer
- the consumer to applydefault <ENTITY,I extends HasDbmsName & HasSchemaName> BUILDER withSchema(I identifier, BiConsumer<com.speedment.common.injector.Injector,Schema> consumer)
ENTITY
- entity typeI
- the identifier typeidentifier
- of the schemaconsumer
- the consumer to applydefault <ENTITY,I extends HasDbmsName & HasSchemaName & HasTableName> BUILDER withTable(I id, Consumer<Table> consumer)
ENTITY
- entity typeI
- the identifier typeid
- of the tableconsumer
- the consumer to applydefault <ENTITY,I extends HasDbmsName & HasSchemaName & HasTableName> BUILDER withTable(I identifier, BiConsumer<com.speedment.common.injector.Injector,Table> consumer)
ENTITY
- entity typeI
- the identifier typeidentifier
- of the tableconsumer
- the consumer to applydefault <ENTITY,I extends HasDbmsName & HasSchemaName & HasTableName & HasColumnName> BUILDER withColumn(I id, Consumer<Column> consumer)
ENTITY
- entity typeI
- the identifier typeid
- of the columnconsumer
- the consumer to applydefault <ENTITY,I extends HasDbmsName & HasSchemaName & HasTableName & HasColumnName> BUILDER withColumn(I id, BiConsumer<com.speedment.common.injector.Injector,Column> consumer)
ENTITY
- entity typeI
- the identifier typeid
- of the columnconsumer
- the consumer to applydefault <C extends Document & HasEnabled> BUILDER with(Class<C> type, String name, Consumer<C> consumer)
Document
of a certain class.
The consumer will then be applied after the configuration has been read
and after the System properties have been applied.<C extends Document & HasEnabled> BUILDER with(Class<C> type, String name, BiConsumer<com.speedment.common.injector.Injector,C> consumer)
Document
of a certain class.
The consumer will then be applied after the configuration has been read
and after the System properties have been applied.<C extends Document & HasEnabled> BUILDER with(Class<C> type, Consumer<C> consumer)
Document
of a certain class. The
consumer will then be applied after the configuration has been read and
after the System properties have been applied.<C extends Document & HasEnabled> BUILDER with(Class<C> type, BiConsumer<com.speedment.common.injector.Injector,C> consumer)
Document
of a certain class. The
consumer will then be applied after the configuration has been read and
after the System properties have been applied.BUILDER withParam(String key, String value)
key
- the key to setvalue
- the new valueBUILDER withPassword(char[] password)
This will not be saved in any configuration files!
password
- to use for all dbms:es in this projectBUILDER withPassword(String dbmsName, char[] password)
This will not be saved in any configuration files!
dbmsName
- the name of the dbmspassword
- to use for the named dbmsdefault <I extends HasDbmsName> BUILDER withPassword(I id, char[] password)
This will not be saved in any configuration files!
I
- identification typeid
- the identification of the dbmspassword
- to use for the identified dbmsBUILDER withPassword(String password)
This will not be saved in any configuration files!
password
- to use for all dbms:es in this projectBUILDER withPassword(String dbmsName, String password)
This will not be saved in any configuration files!
dbmsName
- the name of the dbmspassword
- to use for the named dbmsdefault <I extends HasDbmsName> BUILDER withPassword(I id, String password)
This will not be saved in any configuration files!
I
- identification typeid
- the identification of the dbmspassword
- to use for the identified dbmsBUILDER withUsername(String username)
username
- to use for all dbms:es in this projectBUILDER withUsername(String dbmsName, String username)
dbmsName
- the name of the dbmsusername
- to use for the named dbmsdefault <I extends HasDbmsName> BUILDER withUsername(I id, String username)
This will not be saved in any configuration files!
I
- identification typeid
- the identification of the dbmsusername
- to use for the identified dbmsBUILDER withIpAddress(String ipAddress)
ipAddress
- to use for all dbms:es in this projectBUILDER withIpAddress(String dbmsName, String ipAddress)
dbmsName
- the name of the dbmsipAddress
- to use for the named dbms.default <I extends HasDbmsName> BUILDER withIpAddress(I id, String ipAddress)
This will not be saved in any configuration files!
I
- identification typeid
- the identification of the dbmsipAddress
- to use for the identified dbmsBUILDER withPort(int port)
port
- to use for all dbms:es in this projectBUILDER withPort(String dbmsName, int port)
dbmsName
- the name of the dbmsport
- to use for the named dbmsdefault <I extends HasDbmsName> BUILDER withPort(I id, int port)
This will not be saved in any configuration files!
I
- identification typeid
- the identification of the dbmsport
- to use for the identified dbmsBUILDER withSchema(String schemaName)
This method is useful for multi-tenant projects where there are several identical schemas separated only by their names.
schemaName
- to use for all schemas this projectBUILDER withSchema(String oldSchemaName, String schemaName)
This method is useful for multi-tenant projects where there are several identical schemas separated only by their names.
oldSchemaName
- the current name of a schemaschemaName
- to use for the named schemaBUILDER withConnectionUrl(String connectionUrl)
null
, the connection URL will be calculated using the
dbmses' default connection URL generator (e.g. using ipAddress, port,
etc).
connectionUrl
- to use for all dbms this project or nullBUILDER withConnectionUrl(String dbmsName, String connectionUrl)
null
, the connection URL will be calculated using the
dbmses' default connection URL generator (e.g. using ipAddress, port,
etc).dbmsName
- the name of the dbmsconnectionUrl
- to use for the named dbms or nulldefault <I extends HasDbmsName> BUILDER withConnectionUrl(I id, String connectionUrl)
This will not be saved in any configuration files!
I
- identification typeid
- the identification of the dbmsconnectionUrl
- to use for the identified dbmsBUILDER withSkipCheckDatabaseConnectivity()
BUILDER withSkipValidateRuntimeConfig()
BUILDER withSkipLogoPrintout()
<M extends Manager<?>> BUILDER withManager(Class<M> managerImplType)
M
- the manager typemanagerImplType
- the manager implementation classBUILDER withComponent(Class<?> componentClass)
Inject
will be dependency injected. Methods annotated with
ExecuteBefore
will also be executed as part of the application
configuration phase.componentClass
- the implementation class@Deprecated BUILDER withComponent(String key, Class<?> componentClass)
key
is not forwarded to the dependency
injection framework, so this method has exactly the same
behaviour as withComponent(java.lang.Class)
, so it
is redundant.Inject
will be dependency injected. Methods annotated with
ExecuteBefore
will also be executed as part of the application
configuration phase.key
- the key to store it undercomponentClass
- the implementation classBUILDER withBundle(Class<? extends com.speedment.common.injector.InjectBundle> bundleClass)
The specified classes will be instantiated using its default constructor
and fields annotated with Inject
will be dependency injected.
Methods annotated with ExecuteBefore
will also be executed as
part of the application configuration phase.
bundleClass
- to use when adding injectablesBUILDER withLogging(ApplicationBuilder.HasLogglerName namer)
LogType
.namer
- logger with the namer to turn onfor standard
implementation
APP build()
static <BUILDER extends ApplicationBuilder<Speedment,BUILDER>> BUILDER empty()
ApplicationBuilder
.BUILDER
- ApplicationBuilder
typestatic <BUILDER extends ApplicationBuilder<Speedment,BUILDER>> BUILDER empty(ClassLoader classLoader)
ApplicationBuilder
.BUILDER
- ApplicationBuilder
typeclassLoader
- the class loader to use in the injectorstatic <BUILDER extends ApplicationBuilder<Speedment,BUILDER>> BUILDER standard()
BUILDER
- ApplicationBuilder
typestatic <BUILDER extends ApplicationBuilder<Speedment,BUILDER>> BUILDER standard(ClassLoader classLoader)
BUILDER
- ApplicationBuilder
typeclassLoader
- the class loader to use in the injectorstatic <BUILDER extends ApplicationBuilder<Speedment,BUILDER>> BUILDER create(Class<? extends ApplicationMetadata> applicationMetadataclass)
BUILDER
- ApplicationBuilder
typeapplicationMetadataclass
- with configurationCopyright © 2017 Speedment, Inc.. All rights reserved.