| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
static java.lang.String |
MIN_UPGRADE_VERSION |
| Constructor and Description |
|---|
DataHubImpl(HubConfig hubConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearDatabase(java.lang.String database)
Clears the database of all documents
|
void |
clearUserModules()
Removes user's modules from the modules db
|
java.util.List<com.marklogic.appdeployer.command.Command> |
getCommandList() |
java.lang.String |
getPortInUseBy(DatabaseKind kind)
Returns name of what is using the port
|
java.lang.String |
getServerVersion()
Returns the string presentation of the server version, eg: "9.03-1"
|
void |
initProject()
Initializes the project on disk, creates scaffold project code
|
void |
install()
Installs the data hub configuration and server-side config files into MarkLogic
|
void |
install(HubDeployStatusListener listener)
Installs the data hub configuration and server-side config files into MarkLogic
|
InstallInfo |
isInstalled()
Determines if the data hub is installed in MarkLogic
|
boolean |
isPortInUse(DatabaseKind kind)
Checks to see if the port is in use
|
boolean |
isSafeToInstall()
Checks to make sure all the versions and database in a valid configuration with version check
|
boolean |
isServerVersionOk()
Checks to see if the datahub and server versions are compatible
|
boolean |
isServerVersionValid(java.lang.String versionString)
Validates the MarkLogic server to ensure compatibility with the hub
|
java.util.HashMap |
runPreInstallCheck()
Runs the pre-install check for the datahub populating the object
with variables necessary to perform the install.
|
java.util.HashMap |
runPreInstallCheck(Versions versions)
Runs the pre-install check for the datahub populating the object
with variables necessary to perform the install.
|
void |
setPortInUseBy(DatabaseKind kind,
java.lang.String usedBy)
Sets what appserver name is using the port
|
void |
setServerManager(com.marklogic.mgmt.resource.appservers.ServerManager manager) |
void |
setServerVersion(java.lang.String serverVersion)
Sets the server version holder on the datahub object - currently unused
|
void |
setServerVersionOk(boolean serverVersionOk)
Sets true or false if the server version is okay with this version of DHF
|
void |
uninstall()
Uninstalls the data hub configuration and server-side config files from MarkLogic
|
void |
uninstall(HubDeployStatusListener listener)
Uninstalls the data hub configuration and server-side config files from MarkLogic
|
void |
updateIndexes()
Updates the indexes in the database based on the project
|
boolean |
upgradeHub()
Upgrades the installed datahub on the server to this version of the DataHub
|
boolean |
upgradeHub(java.util.List<java.lang.String> updatedFlows)
Upgrades the hub based on list of provided updated flows.
|
protected final org.slf4j.Logger logger
public static java.lang.String MIN_UPGRADE_VERSION
public DataHubImpl(HubConfig hubConfig)
public void clearDatabase(java.lang.String database)
DataHubclearDatabase in interface DataHubdatabase - - the name of the database in string formpublic void setServerManager(com.marklogic.mgmt.resource.appservers.ServerManager manager)
public InstallInfo isInstalled()
DataHubisInstalled in interface DataHubpublic boolean isServerVersionValid(java.lang.String versionString)
DataHubisServerVersionValid in interface DataHubversionString - - the version of the server to validatepublic void initProject()
DataHubinitProject in interface DataHubpublic void clearUserModules()
DataHubclearUserModules in interface DataHubpublic java.util.List<com.marklogic.appdeployer.command.Command> getCommandList()
public java.util.HashMap runPreInstallCheck()
DataHubrunPreInstallCheck in interface DataHubpublic java.util.HashMap runPreInstallCheck(Versions versions)
DataHubrunPreInstallCheck in interface DataHubversions - - the versions that the check is to be run againstpublic void install()
public void install(HubDeployStatusListener listener)
public void updateIndexes()
DataHubupdateIndexes in interface DataHubpublic void uninstall()
public void uninstall(HubDeployStatusListener listener)
public boolean isSafeToInstall()
DataHubisSafeToInstall in interface DataHubpublic boolean isPortInUse(DatabaseKind kind)
DataHubisPortInUse in interface DataHubkind - - the DatabaseKind enum value (ex STAGING or JOB)public void setPortInUseBy(DatabaseKind kind, java.lang.String usedBy)
DataHubsetPortInUseBy in interface DataHubkind - - the DatabaseKind enum value (ex STAGING or JOB)usedBy - - string name of what is using the portpublic java.lang.String getPortInUseBy(DatabaseKind kind)
DataHubgetPortInUseBy in interface DataHubkind - - the DatabaseKind enum value (ex STAGING or JOB)public boolean isServerVersionOk()
DataHubisServerVersionOk in interface DataHubpublic void setServerVersionOk(boolean serverVersionOk)
DataHubsetServerVersionOk in interface DataHubserverVersionOk - - true if it compatible or false if it is notpublic java.lang.String getServerVersion()
DataHubgetServerVersion in interface DataHubpublic void setServerVersion(java.lang.String serverVersion)
DataHubsetServerVersion in interface DataHubserverVersion - - server version as a string, eg: "9.03-1"public boolean upgradeHub()
throws CantUpgradeException
DataHubupgradeHub in interface DataHubCantUpgradeException - - exception thrown when an upgrade can't happenpublic boolean upgradeHub(java.util.List<java.lang.String> updatedFlows)
throws CantUpgradeException
DataHubupgradeHub in interface DataHubCantUpgradeException - - should the hub fail to upgrade for incompatibility reasons