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_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 |
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 |
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_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.mgmt.admin.AdminManager |
getAdminManager() |
com.marklogic.appdeployer.AppConfig |
getAppConfig()
Returns the current AppConfig object attached to the HubConfig
|
java.lang.String |
getAuthMethod(com.marklogic.hub.DatabaseKind kind)
Returns the AuthMethod object for the DatabaseKind in the hub config
|
java.lang.String |
getCertFile(com.marklogic.hub.DatabaseKind kind)
Returns the SSL Cert file as a string for the DatabaseKind in the hub config
|
java.lang.String |
getCertPassword(com.marklogic.hub.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(com.marklogic.hub.DatabaseKind kind)
Returns the database name for the DatabaseKind set in the config
|
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(com.marklogic.hub.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 |
getFlowOperatorRoleName()
Get the roleName 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(com.marklogic.hub.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(com.marklogic.hub.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.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
|
com.marklogic.mgmt.ManageClient |
getManageClient() |
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(com.marklogic.hub.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(com.marklogic.hub.DatabaseKind kind)
Deprecated.
|
boolean |
getSimpleSsl(com.marklogic.hub.DatabaseKind kind)
Returns if Simple SSL is set for the DatabaseKind in the hub config
|
javax.net.ssl.SSLContext |
getSslContext(com.marklogic.hub.DatabaseKind kind)
Returns the SSL Context for the DatabaseKind set in the config
|
com.marklogic.client.DatabaseClientFactory.SSLHostnameVerifier |
getSslHostnameVerifier(com.marklogic.hub.DatabaseKind kind)
Returns the SSL hostname verifier object for the DatabaseKind in the hub config
|
java.lang.String |
getStagingTriggersDbName() |
java.nio.file.Path |
getStepDefinitionPath(StepDefinition.StepDefinitionType type) |
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
|
javax.net.ssl.X509TrustManager |
getTrustManager(com.marklogic.hub.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.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 |
newAppServicesModulesClient() |
com.marklogic.client.DatabaseClient |
newFinalClient()
Gets a new DatabaseClient that queries the Final database and appserver
|
com.marklogic.client.DatabaseClient |
newFinalClient(java.lang.String dbName)
Gets a new DatabaseClient that queries the Final database using the final appserver.
|
com.marklogic.hub.HubClient |
newHubClient() |
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(com.marklogic.hub.DatabaseKind kind,
java.lang.String authMethod)
Sets the SSL Auth Method for the DatabaseKind in the config
|
void |
setCertFile(com.marklogic.hub.DatabaseKind kind,
java.lang.String certFile)
Sets the SSL Certfile to use for the DatabaseKind in the config
|
void |
setCertPass(com.marklogic.hub.DatabaseKind kind,
java.lang.String certPassword)
Sets the SSL Cert password for the DatabaseKind in the config
|
void |
setDbName(com.marklogic.hub.DatabaseKind kind,
java.lang.String dbName)
Sets the database name for the databaseKind on the hubconfig
|
void |
setExternalName(com.marklogic.hub.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 |
setFlowOperatorRoleName(java.lang.String flowOperatorRoleName)
Set the role name that the hub uses
|
void |
setForestsPerHost(com.marklogic.hub.DatabaseKind kind,
java.lang.Integer forestsPerHost)
Sets the number of forests per host for the databaseKind on the hubconfig
|
void |
setHttpName(com.marklogic.hub.DatabaseKind kind,
java.lang.String httpName)
Sets the appserver name for the databaseKind on the hubconfig
|
void |
setIsProvisionedEnvironment(boolean isProvisionedEnvironment) |
void |
setPort(com.marklogic.hub.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(com.marklogic.hub.DatabaseKind kind,
java.lang.String scheme)
Deprecated.
|
void |
setSimpleSsl(com.marklogic.hub.DatabaseKind kind,
java.lang.Boolean simpleSsl)
Sets if Simple SSL is to be used for the DatabaseKind in the config
|
void |
setSslContext(com.marklogic.hub.DatabaseKind kind,
javax.net.ssl.SSLContext sslContext)
Sets the SSL Context for the DatabaseKind in the config
|
void |
setSslHostnameVerifier(com.marklogic.hub.DatabaseKind kind,
com.marklogic.client.DatabaseClientFactory.SSLHostnameVerifier stagingSslHostnameVerifier)
Sets the SSL Hostname Verifier object for the DatabaseKind in the config
|
void |
setTrustManager(com.marklogic.hub.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 USER_MODULES_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_DEVELOPER_ROLE_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
com.marklogic.hub.HubClient newHubClient()
com.marklogic.client.DatabaseClient newAppServicesModulesClient()
java.lang.String getHost()
java.lang.String getDbName(com.marklogic.hub.DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setDbName(com.marklogic.hub.DatabaseKind kind, java.lang.String dbName)
kind-
- DatabaseKind enum, eg: STAGING or JOBdbName
- The name desired for the databasejava.lang.String getHttpName(com.marklogic.hub.DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setHttpName(com.marklogic.hub.DatabaseKind kind, java.lang.String httpName)
kind-
- DatabaseKind enum, eg: STAGING or JOBhttpName
- The name to set for the appserverjava.lang.Integer getForestsPerHost(com.marklogic.hub.DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setForestsPerHost(com.marklogic.hub.DatabaseKind kind, java.lang.Integer forestsPerHost)
kind-
- DatabaseKind enum, eg: STAGING or JOBforestsPerHost
- The number of forests per hostjava.lang.Integer getPort(com.marklogic.hub.DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setPort(com.marklogic.hub.DatabaseKind kind, java.lang.Integer port)
kind-
- DatabaseKind enum, eg: STAGING or JOBport
- The port number for the database appserverjavax.net.ssl.SSLContext getSslContext(com.marklogic.hub.DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setSslContext(com.marklogic.hub.DatabaseKind kind, javax.net.ssl.SSLContext sslContext)
kind
- - DatabaseKind enum, eg: STAGING or JOBsslContext
- - The SSLContext set for the database connectionvoid setSslHostnameVerifier(com.marklogic.hub.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(com.marklogic.hub.DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBjava.lang.String getAuthMethod(com.marklogic.hub.DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setAuthMethod(com.marklogic.hub.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(com.marklogic.hub.DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setTrustManager(com.marklogic.hub.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(com.marklogic.hub.DatabaseKind kind)
@Deprecated void setScheme(com.marklogic.hub.DatabaseKind kind, java.lang.String scheme)
boolean getSimpleSsl(com.marklogic.hub.DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setSimpleSsl(com.marklogic.hub.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(com.marklogic.hub.DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setCertFile(com.marklogic.hub.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(com.marklogic.hub.DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setCertPass(com.marklogic.hub.DatabaseKind kind, java.lang.String certPassword)
kind
- - DatabaseKind enum, eg: STAGING or JOBcertPassword
- - The SSL certificate password for the database connectionjava.lang.String getExternalName(com.marklogic.hub.DatabaseKind kind)
kind
- - DatabaseKind enum, eg: STAGING or JOBvoid setExternalName(com.marklogic.hub.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 getFlowDeveloperRoleName()
void setFlowDeveloperRoleName(java.lang.String flowDeveloperRoleName)
flowDeveloperRoleName
- the name to use for developing flowsjava.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()
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 getStepDefinitionPath(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 getHubLogLevel()
com.marklogic.client.DatabaseClient newStagingClient()
com.marklogic.client.DatabaseClient newStagingClient(java.lang.String dbName)
dbName
- the name of the databasejava.lang.String getStagingTriggersDbName()
com.marklogic.mgmt.admin.AdminManager getAdminManager()
com.marklogic.mgmt.ManageClient getManageClient()
com.marklogic.client.DatabaseClient newReverseFlowClient()
com.marklogic.client.DatabaseClient newFinalClient()
com.marklogic.client.DatabaseClient newFinalClient(java.lang.String dbName)
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.