public class DeployHubDatabasesCommand
extends com.marklogic.appdeployer.command.AbstractUndoableCommand
A key aspect of this class is its attempt to deploy/undeploy databases in the correct order. For each database file that it finds that's not one of the default ones, a DeployDatabaseCommand will be created. All of those commands will then be sorted based on the presence of "triggers-database" or "schema-database" within the payload for the command.
If the above strategy doesn't work for you, you can always resort to naming your database files to control the order that they're processed in.
Constructor and Description |
---|
DeployHubDatabasesCommand(HubConfig config) |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<com.marklogic.appdeployer.command.databases.DeployDatabaseCommand> |
buildDatabaseCommands(com.marklogic.appdeployer.command.CommandContext context) |
void |
execute(com.marklogic.appdeployer.command.CommandContext context) |
protected void |
sortCommandsBeforeExecute(java.util.List<com.marklogic.appdeployer.command.databases.DeployDatabaseCommand> list,
com.marklogic.appdeployer.command.CommandContext context) |
protected void |
sortCommandsBeforeUndo(java.util.List<com.marklogic.appdeployer.command.databases.DeployDatabaseCommand> list,
com.marklogic.appdeployer.command.CommandContext context) |
void |
undo(com.marklogic.appdeployer.command.CommandContext context) |
getUndoSortOrder, setUndoSortOrder
adjustPayloadBeforeSavingResource, adjustResourceManagerForPayload, copyFileToString, copyFileToString, getExecuteSortOrder, listFilesInDirectory, logResourceDirectoryNotFound, saveResource, setExecuteSortOrder, setFilenamesToIgnore, setPayloadTokenReplacer, setResourceFilenameFilter, setResourceFilenamesExcludePattern, setResourceFilenamesIncludePattern, setStoreResourceIdsAsCustomTokens, storeTokenForResourceId
public DeployHubDatabasesCommand(HubConfig config)
public void execute(com.marklogic.appdeployer.command.CommandContext context)
protected void sortCommandsBeforeExecute(java.util.List<com.marklogic.appdeployer.command.databases.DeployDatabaseCommand> list, com.marklogic.appdeployer.command.CommandContext context)
public void undo(com.marklogic.appdeployer.command.CommandContext context)
protected void sortCommandsBeforeUndo(java.util.List<com.marklogic.appdeployer.command.databases.DeployDatabaseCommand> list, com.marklogic.appdeployer.command.CommandContext context)
protected java.util.List<com.marklogic.appdeployer.command.databases.DeployDatabaseCommand> buildDatabaseCommands(com.marklogic.appdeployer.command.CommandContext context)