/** * Installs the data hub configuration and server-side config files into MarkLogic */ @Override public void install() { install(null); }
/** * This is still needed by the Gradle tasks. * * @param hubConfig */ public DeployHubAmpsCommand(HubConfig hubConfig) { this.hubConfig = hubConfig; this.versions = new Versions(hubConfig); }
/** * Creates and returns an installinfo object * @return InstallInfo object */ static InstallInfo create() { return new InstallInfoImpl(); }
@JsonIgnore public void refreshProject(Properties properties, boolean loadGradleProperties) { loadConfigurationFromProperties(properties, loadGradleProperties); flowManager.setupClient(); dataHub.wireClient(); versions.setupClient(); }
public void wireClients() { fm.setupClient(); dataHub.wireClient(); versions.setupClient(); } //Use this method sparingly as it slows down the test
@Override public boolean isSafeToInstall() { return !(isPortInUse(DatabaseKind.FINAL) || isPortInUse(DatabaseKind.STAGING) || isPortInUse(DatabaseKind.JOB)) && isServerVersionOk(); }
private void writeMetadataForFile(File file, String metadataTemplatePath, String metadataName) { String fileContent = getFileContent(metadataTemplatePath, metadataName); File metadataFile = createEmptyMetadataForFile(file, metadataName); writeToFile(fileContent, metadataFile); }
private File createEmptyRestExtensionFile(String entityName, String extensionName, FlowType flowType, CodeFormat codeFormat) { Path restDir = getRestDirectory(entityName, flowType); return createEmptyFile(restDir, "services", extensionName + "." + codeFormat); }
@Override // this method uses STAGING appserver but FINAL database. // it's only use is for reverse flows, which need to use staging modules. public DatabaseClient newReverseFlowClient() { return newStagingClient(finalDbName); }
/** * Uninstalls the data hub configuration and server-side config files from MarkLogic */ @Override public void uninstall() { uninstall(null); }
@Override public boolean upgradeHub() throws CantUpgradeException { return upgradeHub(null); }
private void hydrateAppConfigs(Properties properties) { com.marklogic.mgmt.util.PropertySource propertySource = properties::getProperty; hydrateAppConfigs(propertySource); }
@Override public void setAppConfig(AppConfig config, boolean skipUpdate) { this.appConfig = config; if (!skipUpdate) { updateAppConfig(this.appConfig); } }
/** * Creates and returns a tracing object * @param client - the databaseclient that will be used * @return the Tracing object */ static Tracing create(DatabaseClient client){ return new TracingImpl(client); };
/** * Creates and returns a debugging object * @param client - the databaseclient that will be used * @return the debugging object */ static Debugging create(DatabaseClient client){ return new DebuggingImpl(client); }
@Override public void createFlow(String entityName, String flowName, FlowType flowType, CodeFormat codeFormat, DataFormat dataFormat) { createFlow(entityName, flowName, flowType, codeFormat, dataFormat, true); }
private void writeResourceFileWithReplace(Map<String, String> customTokens, String srcFile, Path dstFile) { writeResourceFileWithReplace(customTokens, srcFile, dstFile, false); }
private File createEmptyRestTransformFile(String entityName, String transformName, FlowType flowType, CodeFormat codeFormat) { Path restDir = getRestDirectory(entityName, flowType); return createEmptyFile(restDir, "transforms", transformName + "." + codeFormat); }
@Override public DatabaseClient newStagingClient() { return newStagingClient(stagingDbName); }
private void hydrateAppConfigs(Environment environment) { com.marklogic.mgmt.util.PropertySource propertySource = environment::getProperty; hydrateAppConfigs(propertySource); }