public interface HubConfig
refreshProject()
to wire up all clients and load the properties from gradle.properties
(optionally overridden with gradle-{env}.properties).Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_AUTH_METHOD |
static java.lang.String |
DEFAULT_CUSTOM_FOREST_PATH |
static java.lang.String |
DEFAULT_DEVELOPER_ROLE_NAME |
static java.lang.String |
DEFAULT_DEVELOPER_USER_NAME |
static java.lang.String |
DEFAULT_FINAL_NAME |
static java.lang.Integer |
DEFAULT_FINAL_PORT |
static java.lang.String |
DEFAULT_FINAL_SCHEMAS_DB_NAME |
static java.lang.String |
DEFAULT_FINAL_TRIGGERS_DB_NAME |
static java.lang.Integer |
DEFAULT_FORESTS_PER_HOST |
static java.lang.String |
DEFAULT_HUB_LOG_LEVEL |
static java.lang.String |
DEFAULT_JOB_NAME |
static java.lang.Integer |
DEFAULT_JOB_PORT |
static java.lang.String |
DEFAULT_MODULES_DB_NAME |
static java.lang.String |
DEFAULT_ROLE_NAME |
static java.lang.String |
DEFAULT_SCHEME |
static java.lang.String |
DEFAULT_STAGING_NAME |
static java.lang.Integer |
DEFAULT_STAGING_PORT |
static java.lang.String |
DEFAULT_STAGING_SCHEMAS_DB_NAME |
static java.lang.String |
DEFAULT_STAGING_TRIGGERS_DB_NAME |
static java.lang.String |
DEFAULT_USER_NAME |
static java.lang.String |
ENTITY_CONFIG_DIR |
static java.lang.String |
EXP_FINAL_ENTITY_QUERY_OPTIONS_FILE |
static java.lang.String |
EXP_STAGING_ENTITY_QUERY_OPTIONS_FILE |
static java.lang.String |
FINAL_ENTITY_DATABASE_FILE |
static java.lang.String |
FINAL_ENTITY_QUERY_OPTIONS_FILE |
static java.lang.String |
HUB_CONFIG_DIR |
static java.lang.String |
HUB_MODULES_DEPLOY_TIMESTAMPS_PROPERTIES |
static java.lang.String |
PATH_PREFIX |
static java.lang.String |
PII_PROTECTED_PATHS_FILE |
static java.lang.String |
PII_QUERY_ROLESET_FILE |
static java.lang.String |
STAGING_ENTITY_DATABASE_FILE |
static java.lang.String |
STAGING_ENTITY_QUERY_OPTIONS_FILE |
static java.lang.String |
USER_CONFIG_DIR |
static java.lang.String |
USER_CONTENT_DEPLOY_TIMESTAMPS_PROPERTIES |
static java.lang.String |
USER_MODULES_DEPLOY_TIMESTAMPS_PROPERTIES |
Modifier and Type | Method and Description |
---|---|
void |
createProject(java.lang.String projectDirString)
Initializes the java application state to a specific location.
|
com.marklogic.appdeployer.AppConfig |
getAppConfig()
Returns the current AppConfig object attached to the HubConfig
|
java.lang.String |
getAuthMethod(DatabaseKind kind)
Returns the AuthMethod object for the DatabaseKind in the hub config
|
java.lang.String |
getCertFile(DatabaseKind kind)
Returns the SSL Cert file as a string for the DatabaseKind in the hub config
|
java.lang.String |
getCertPassword(DatabaseKind kind)
Returns the SSL Cert Password as a string for the DatabaseKind in the hub config
|
java.lang.String |
getCustomForestPath()
Returns the path for the custom forests definition
|
java.lang.String |
getDbName(DatabaseKind kind)
Returns the database name for the DatabaseKind set in the config
|
java.lang.String |
getDHFVersion()
Gets the current version of the project properties file is targeting
|
java.nio.file.Path |
getEntityDatabaseDir()
Gets the path for the entity database directory
|
java.lang.String |
getEntityModelPermissions()
Prior to 5.1.0, entities were assigned permissions returned by getModulePermissions.
|
java.lang.String |
getExternalName(DatabaseKind kind)
Returns the external name for the host for the DatabaseKind in the hub config
|
java.lang.String |
getFlowDeveloperRoleName()
Get the roleName the hub uses for developing flows
|
java.lang.String |
getFlowDeveloperUserName()
Get the current marklogic user name the hub uses to develop flows
|
java.lang.String |
getFlowOperatorRoleName()
Get the roleName the hub uses
|
java.lang.String |
getFlowOperatorUserName()
Get the current marklogic user name the hub uses
|
java.lang.String |
getFlowPermissions()
Prior to 5.2.0, entities were assigned permissions returned by getModulePermissions.
|
java.nio.file.Path |
getFlowsDir()
Gets the path for the flows directory
|
java.lang.Integer |
getForestsPerHost(DatabaseKind kind)
Returns the number of forests per host for the DatabaseKind set in the config
|
java.lang.String |
getHost()
Gets the hostname of the AppConfig
|
java.lang.String |
getHttpName(DatabaseKind kind)
Returns the appserver name for the DatabaseKind set in the config
|
java.nio.file.Path |
getHubConfigDir()
Gets the path for the hub's config directory
|
java.nio.file.Path |
getHubDatabaseDir()
Gets the path for the hub's database directory
|
java.nio.file.Path |
getHubEntitiesDir()
Gets the path for the hub entities directory
|
java.lang.String |
getHubLogLevel()
Gets the current level of logging set for the data hub
|
java.nio.file.Path |
getHubMappingsDir()
Gets the path for the hub mappings directory
|
java.lang.String |
getHubModulesDeployTimestampFile()
Returns the last deployed timestamp file for the hub config and modules
|
java.nio.file.Path |
getHubPluginsDir()
Gets the path for the hub plugins directory
|
HubProject |
getHubProject()
Returns the HubProject associated with the HubConfig
|
java.nio.file.Path |
getHubSecurityDir()
Gets the path for the hub's security directory
|
java.nio.file.Path |
getHubServersDir()
Gets the path for the hub servers directory
|
java.lang.String |
getInfo()
Gets information on a datahub configuration
|
java.lang.Boolean |
getIsHostLoadBalancer()
Signifies if the host is a load balancer host.
|
java.lang.Boolean |
getIsProvisionedEnvironment()
Signifies if we are dealing with a provisioned environment.
|
java.lang.String |
getJarVersion()
Gets the current version of the DHF Jar
|
java.lang.String |
getLoadBalancerHost()
Gets a string of load balancer host
|
java.lang.String |
getMappingPermissions()
Prior to 5.2.0, entities were assigned permissions returned by getModulePermissions.
|
java.lang.String |
getModulePermissions()
Gets the permissions used to execute a module in string form
|
java.nio.file.Path |
getModulesDir()
Gets the path for the modules directory
|
java.lang.Integer |
getPort(DatabaseKind kind)
Returns the port number for the DatabaseKind set in the config
|
java.lang.String |
getProjectDir()
Obtains the project directory as a string
|
java.lang.String |
getScheme(DatabaseKind kind)
Deprecated.
|
boolean |
getSimpleSsl(DatabaseKind kind)
Returns if Simple SSL is set for the DatabaseKind in the hub config
|
javax.net.ssl.SSLContext |
getSslContext(DatabaseKind kind)
Returns the SSL Context for the DatabaseKind set in the config
|
com.marklogic.client.DatabaseClientFactory.SSLHostnameVerifier |
getSslHostnameVerifier(DatabaseKind kind)
Returns the SSL hostname verifier object for the DatabaseKind in the hub config
|
java.lang.String |
getStepDefinitionPermissions()
Prior to 5.2.0, entities were assigned permissions returned by getModulePermissions.
|
java.nio.file.Path |
getStepDefinitionsDir()
Gets the path for the step definitions directory
|
java.nio.file.Path |
getStepsDirByType(StepDefinition.StepDefinitionType type) |
javax.net.ssl.X509TrustManager |
getTrustManager(DatabaseKind kind)
Returns the TrustManager object for the DatabaseKind in the hub config
|
java.nio.file.Path |
getUserConfigDir()
Gets the path for the user config directory
|
java.nio.file.Path |
getUserDatabaseDir()
Gets the path for the user database directory
|
java.lang.String |
getUserModulesDeployTimestampFile()
Returns the last deployed timestamp file for the user modules
|
java.nio.file.Path |
getUserSchemasDir()
Gets the path for the user schemas directory
|
java.nio.file.Path |
getUserSecurityDir()
Gets the path for the user security directory
|
java.nio.file.Path |
getUserServersDir()
Gets the path for the user servers directory
|
void |
initHubProject()
Initializes the hub project on disk
|
com.marklogic.client.DatabaseClient |
newAppServicesClient()
Creates a new DatabaseClient for accessing the AppServices app
|
com.marklogic.client.DatabaseClient |
newFinalClient()
Gets a new DatabaseClient that queries the Final database using the final appserver.
|
com.marklogic.client.DatabaseClient |
newJobDbClient()
Creates a new DatabaseClient for accessing the Job database
|
com.marklogic.client.DatabaseClient |
newModulesDbClient()
Creates a new DatabaseClient for accessing the Hub Modules database
|
com.marklogic.client.DatabaseClient |
newReverseFlowClient()
Gets a new DatabaseClient that queries the Final database using the staging appserver.
|
com.marklogic.client.DatabaseClient |
newStagingClient()
Gets a new DatabaseClient that queries the staging database and appserver
|
com.marklogic.client.DatabaseClient |
newStagingClient(java.lang.String dbName)
Gets a new DatabaseClient that queries the staging database and appserver
|
com.marklogic.client.DatabaseClient |
newTraceDbClient()
Deprecated.
|
void |
refreshProject()
Loads HubConfig object with values from gradle.properties (optionally overridden with
gradle-(environment).properties).
|
void |
setAppConfig(com.marklogic.appdeployer.AppConfig config)
Sets the AppConfig for the current HubConfig
|
void |
setAppConfig(com.marklogic.appdeployer.AppConfig config,
boolean skipUpdate)
Sets the AppConfig for the current HubConfig, with skipUpdate option
|
void |
setAuthMethod(DatabaseKind kind,
java.lang.String authMethod)
Sets the SSL Auth Method for the DatabaseKind in the config
|
void |
setCertFile(DatabaseKind kind,
java.lang.String certFile)
Sets the SSL Certfile to use for the DatabaseKind in the config
|
void |
setCertPass(DatabaseKind kind,
java.lang.String certPassword)
Sets the SSL Cert password for the DatabaseKind in the config
|
void |
setDbName(DatabaseKind kind,
java.lang.String dbName)
Sets the database name for the databaseKind on the hubconfig
|
void |
setExternalName(DatabaseKind kind,
java.lang.String externalName)
Sets the external hostname for the DatabaseKind in the config
|
void |
setFlowDeveloperRoleName(java.lang.String flowDeveloperRoleName)
Set the role name that the hub uses for developing flows
|
void |
setFlowDeveloperUserName(java.lang.String flowDeveloperUserName)
Sets the username for the hub to use in MarkLogic for developing flows
|
void |
setFlowOperatorRoleName(java.lang.String flowOperatorRoleName)
Set the role name that the hub uses
|
void |
setFlowOperatorUserName(java.lang.String flowOperatorUserName)
Sets the username for the hub to use in MarkLogic
|
void |
setForestsPerHost(DatabaseKind kind,
java.lang.Integer forestsPerHost)
Sets the number of forests per host for the databaseKind on the hubconfig
|
void |
setHttpName(DatabaseKind kind,
java.lang.String httpName)
Sets the appserver name for the databaseKind on the hubconfig
|
void |
setIsProvisionedEnvironment(boolean isProvisionedEnvironment) |
void |
setPort(DatabaseKind kind,
java.lang.Integer port)
Sets the port number for the databaseKind on the hubconfig
|
void |
setProjectDir(java.lang.String projectDir)
Sets the directory for the current project
|
void |
setScheme(DatabaseKind kind,
java.lang.String scheme)
Deprecated.
|
void |
setSimpleSsl(DatabaseKind kind,
java.lang.Boolean simpleSsl)
Sets if Simple SSL is to be used for the DatabaseKind in the config
|
void |
setSslContext(DatabaseKind kind,
javax.net.ssl.SSLContext sslContext)
Sets the SSL Context for the DatabaseKind in the config
|
void |
setSslHostnameVerifier(DatabaseKind kind,
com.marklogic.client.DatabaseClientFactory.SSLHostnameVerifier stagingSslHostnameVerifier)
Sets the SSL Hostname Verifier object for the DatabaseKind in the config
|
void |
setTrustManager(DatabaseKind kind,
javax.net.ssl.X509TrustManager trustManager)
Sets the Trust Manager for the DatabaseKind in the config
|
HubConfig |
withPropertiesFromEnvironment(java.lang.String environment)
In a non-Gradle environment, a client can use this to load properties from a "gradle-(environment).properties"
file, similar to how the Gradle properties plugin would process such a file in a Gradle context.
|
static final java.lang.String HUB_MODULES_DEPLOY_TIMESTAMPS_PROPERTIES
static final java.lang.String USER_MODULES_DEPLOY_TIMESTAMPS_PROPERTIES
static final java.lang.String USER_CONTENT_DEPLOY_TIMESTAMPS_PROPERTIES
static final java.lang.String PATH_PREFIX
static final java.lang.String HUB_CONFIG_DIR
static final java.lang.String USER_CONFIG_DIR
static final java.lang.String ENTITY_CONFIG_DIR
static final java.lang.String STAGING_ENTITY_QUERY_OPTIONS_FILE
static final java.lang.String FINAL_ENTITY_QUERY_OPTIONS_FILE
static final java.lang.String EXP_STAGING_ENTITY_QUERY_OPTIONS_FILE
static final java.lang.String EXP_FINAL_ENTITY_QUERY_OPTIONS_FILE
static final java.lang.String STAGING_ENTITY_DATABASE_FILE
static final java.lang.String FINAL_ENTITY_DATABASE_FILE
static final java.lang.String DEFAULT_STAGING_NAME
static final java.lang.String DEFAULT_FINAL_NAME
static final java.lang.String DEFAULT_JOB_NAME
static final java.lang.String DEFAULT_MODULES_DB_NAME
static final java.lang.String DEFAULT_STAGING_TRIGGERS_DB_NAME
static final java.lang.String DEFAULT_FINAL_TRIGGERS_DB_NAME
static final java.lang.String DEFAULT_STAGING_SCHEMAS_DB_NAME
static final java.lang.String DEFAULT_FINAL_SCHEMAS_DB_NAME
static final java.lang.String DEFAULT_ROLE_NAME
static final java.lang.String DEFAULT_USER_NAME
static final java.lang.String DEFAULT_DEVELOPER_ROLE_NAME
static final java.lang.String DEFAULT_DEVELOPER_USER_NAME
static final java.lang.Integer DEFAULT_STAGING_PORT
static final java.lang.Integer DEFAULT_FINAL_PORT
static final java.lang.Integer DEFAULT_JOB_PORT
static final java.lang.String DEFAULT_AUTH_METHOD
static final java.lang.String DEFAULT_HUB_LOG_LEVEL
static final java.lang.String DEFAULT_SCHEME
static final java.lang.Integer DEFAULT_FORESTS_PER_HOST
static final java.lang.String DEFAULT_CUSTOM_FOREST_PATH
static final java.lang.String PII_QUERY_ROLESET_FILE
static final java.lang.String PII_PROTECTED_PATHS_FILE
java.lang.String getHost()
java.lang.String getDbName(DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setDbName(DatabaseKind kind, java.lang.String dbName)
kind-
- DatabaseKind enum, eg: STAGING or JOBdbName
- The name desired for the databasejava.lang.String getHttpName(DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setHttpName(DatabaseKind kind, java.lang.String httpName)
kind-
- DatabaseKind enum, eg: STAGING or JOBhttpName
- The name to set for the appserverjava.lang.Integer getForestsPerHost(DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setForestsPerHost(DatabaseKind kind, java.lang.Integer forestsPerHost)
kind-
- DatabaseKind enum, eg: STAGING or JOBforestsPerHost
- The number of forests per hostjava.lang.Integer getPort(DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setPort(DatabaseKind kind, java.lang.Integer port)
kind-
- DatabaseKind enum, eg: STAGING or JOBport
- The port number for the database appserverjavax.net.ssl.SSLContext getSslContext(DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setSslContext(DatabaseKind kind, javax.net.ssl.SSLContext sslContext)
kind
- - DatabaseKind enum, eg: STAGING or JOBsslContext
- - The SSLContext set for the database connectionvoid setSslHostnameVerifier(DatabaseKind kind, com.marklogic.client.DatabaseClientFactory.SSLHostnameVerifier stagingSslHostnameVerifier)
kind
- - DatabaseKind enum, eg: STAGING or JOBstagingSslHostnameVerifier
- - The SSL Hostname Verifier object for the database connectioncom.marklogic.client.DatabaseClientFactory.SSLHostnameVerifier getSslHostnameVerifier(DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBjava.lang.String getAuthMethod(DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setAuthMethod(DatabaseKind kind, java.lang.String authMethod)
kind
- - DatabaseKind enum, eg: STAGING or JOBauthMethod
- - The SSL Auth Method for the database connectionjavax.net.ssl.X509TrustManager getTrustManager(DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setTrustManager(DatabaseKind kind, javax.net.ssl.X509TrustManager trustManager)
kind
- - DatabaseKind enum, eg: STAGING or JOBtrustManager
- - The Trust Manager for the database connection@Deprecated java.lang.String getScheme(DatabaseKind kind)
@Deprecated void setScheme(DatabaseKind kind, java.lang.String scheme)
boolean getSimpleSsl(DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setSimpleSsl(DatabaseKind kind, java.lang.Boolean simpleSsl)
kind
- - DatabaseKind enum, eg: STAGING or JOBsimpleSsl-
- true if you want to use Simple SSL, false if you don'tjava.lang.String getCertFile(DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setCertFile(DatabaseKind kind, java.lang.String certFile)
kind
- - DatabaseKind enum, eg: STAGING or JOBcertFile
- - The SSL Cert File as a string to be used for the database connectionjava.lang.String getCertPassword(DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setCertPass(DatabaseKind kind, java.lang.String certPassword)
kind
- - DatabaseKind enum, eg: STAGING or JOBcertPassword
- - The SSL certificate password for the database connectionjava.lang.String getExternalName(DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setExternalName(DatabaseKind kind, java.lang.String externalName)
kind
- - DatabaseKind enum, eg: STAGING or JOBexternalName-
- The external host name for the database connectionjava.lang.String getFlowOperatorRoleName()
void setFlowOperatorRoleName(java.lang.String flowOperatorRoleName)
flowOperatorRoleName
- the name to usejava.lang.String getFlowOperatorUserName()
void setFlowOperatorUserName(java.lang.String flowOperatorUserName)
flowOperatorUserName
- - username to usejava.lang.String getFlowDeveloperRoleName()
void setFlowDeveloperRoleName(java.lang.String flowDeveloperRoleName)
flowDeveloperRoleName
- the name to use for developing flowsjava.lang.String getFlowDeveloperUserName()
void setFlowDeveloperUserName(java.lang.String flowDeveloperUserName)
flowDeveloperUserName
- - username to usejava.lang.String getLoadBalancerHost()
java.lang.Boolean getIsHostLoadBalancer()
java.lang.Boolean getIsProvisionedEnvironment()
void setIsProvisionedEnvironment(boolean isProvisionedEnvironment)
java.lang.String getCustomForestPath()
java.lang.String getModulePermissions()
java.lang.String getEntityModelPermissions()
java.lang.String getFlowPermissions()
java.lang.String getMappingPermissions()
java.lang.String getStepDefinitionPermissions()
java.lang.String getProjectDir()
void setProjectDir(java.lang.String projectDir)
projectDir
- - a string that represents the path to the project directoryHubProject getHubProject()
void initHubProject()
java.lang.String getHubModulesDeployTimestampFile()
java.lang.String getUserModulesDeployTimestampFile()
com.marklogic.client.DatabaseClient newAppServicesClient()
com.marklogic.client.DatabaseClient newJobDbClient()
@Deprecated com.marklogic.client.DatabaseClient newTraceDbClient()
com.marklogic.client.DatabaseClient newModulesDbClient()
java.nio.file.Path getModulesDir()
java.nio.file.Path getHubPluginsDir()
java.nio.file.Path getHubEntitiesDir()
java.nio.file.Path getHubMappingsDir()
java.nio.file.Path getStepsDirByType(StepDefinition.StepDefinitionType type)
java.nio.file.Path getHubConfigDir()
java.nio.file.Path getHubDatabaseDir()
java.nio.file.Path getHubServersDir()
java.nio.file.Path getHubSecurityDir()
java.nio.file.Path getUserConfigDir()
java.nio.file.Path getUserSecurityDir()
java.nio.file.Path getUserDatabaseDir()
java.nio.file.Path getUserSchemasDir()
java.nio.file.Path getUserServersDir()
java.nio.file.Path getEntityDatabaseDir()
java.nio.file.Path getFlowsDir()
java.nio.file.Path getStepDefinitionsDir()
com.marklogic.appdeployer.AppConfig getAppConfig()
void setAppConfig(com.marklogic.appdeployer.AppConfig config)
config
- AppConfig to associate with the HubConfigvoid setAppConfig(com.marklogic.appdeployer.AppConfig config, boolean skipUpdate)
config
- - AppConfig to associate with the HubConfigskipUpdate
- false to force update of AppConfig, true to skip itjava.lang.String getJarVersion()
java.lang.String getDHFVersion()
java.lang.String getHubLogLevel()
com.marklogic.client.DatabaseClient newStagingClient()
com.marklogic.client.DatabaseClient newStagingClient(java.lang.String dbName)
dbName
- the name of the databasecom.marklogic.client.DatabaseClient newReverseFlowClient()
com.marklogic.client.DatabaseClient newFinalClient()
java.lang.String getInfo()
void createProject(java.lang.String projectDirString)
projectDirString
- The directory in which to find properties for a project.HubConfig withPropertiesFromEnvironment(java.lang.String environment)
environment
- - The name of the environment to use (local,dev,qa,prod,...)void refreshProject()
createProject(String)
you can use setter methods to change HubConfig properties
and then call this method.