use of org.talend.mdm.repository.core.command.deploy.DeployCompoundCommand in project tmdm-studio-se by Talend.
the class DeployService method updateForStatus.
private void updateForStatus(boolean isUpdateServer, List<DeployStatus> deployStatuses) {
if (deployStatuses == null || deployStatuses.size() == 0) {
return;
}
for (DeployStatus deployStatus : deployStatuses) {
if (deployStatus != null && deployStatus.isOK()) {
ICommand command = deployStatus.getCommand();
if (command != null) {
CommandManager manager = CommandManager.getInstance();
manager.removeCommandStack(command, ICommand.PHASE_DEPLOY);
if (isUpdateServer) {
MDMServerDef serverDef = null;
if (command instanceof AbstractDeployCommand) {
serverDef = ((AbstractDeployCommand) command).getServerDef();
} else if (command instanceof DeployCompoundCommand) {
serverDef = ((DeployCompoundCommand) command).getServerDef();
}
if (command instanceof BatchDeployJobCommand) {
BatchDeployJobCommand deployJobCommand = (BatchDeployJobCommand) command;
pushRestoreCommand(manager, deployJobCommand.getSubCmds(), serverDef);
pushRestoreCommand(manager, deployJobCommand.getSubDeleteCmds(), serverDef);
} else {
// updateserver
pushRestoreCommand(manager, command, serverDef);
}
}
}
}
}
}
use of org.talend.mdm.repository.core.command.deploy.DeployCompoundCommand in project tmdm-studio-se by Talend.
the class CommandManager method convertToDeployCompoundCommand.
public ICommand convertToDeployCompoundCommand(AbstractDeployCommand cmd) {
CompoundCommand compoundCommand = new DeployCompoundCommand(cmd);
compoundCommand.setCommandType(cmd.getCommandType());
compoundCommand.init();
if (compoundCommand.breakUpCommand()) {
return compoundCommand;
}
return cmd;
}
Aggregations