use of org.talend.mdm.repository.core.command.deploy.job.BatchDeployJobCommand in project tmdm-studio-se by Talend.
the class CommandManager method removeCommandStack.
public void removeCommandStack(ICommand cmd, int phase) {
if (cmd == null) {
return;
}
if (cmd instanceof BatchDeployJobCommand) {
BatchDeployJobCommand jobCommand = (BatchDeployJobCommand) cmd;
removeCommandStack(jobCommand.getSubCmds(), phase);
removeCommandStack(jobCommand.getSubDeleteCmds(), phase);
} else {
removeCommandStack(cmd.getCommandId(), phase);
}
}
use of org.talend.mdm.repository.core.command.deploy.job.BatchDeployJobCommand in project tmdm-studio-se by Talend.
the class CommandManager method arrangeForJobCommands.
public void arrangeForJobCommands(List<ICommand> cmds) {
BatchDeployJobCommand jobCommand = new BatchDeployJobCommand();
for (Iterator<ICommand> il = cmds.iterator(); il.hasNext(); ) {
ICommand cmd = il.next();
IRepositoryViewObject viewObject = cmd.getViewObject();
if (viewObject.getRepositoryObjectType() == ERepositoryObjectType.PROCESS) {
if (cmd instanceof CompoundCommand) {
for (ICommand subCmd : ((CompoundCommand) cmd).getSubCommands()) {
int type = subCmd.getCommandType();
if (type == ICommand.CMD_DELETE) {
jobCommand.addDeleteCommand(subCmd);
} else if (type == ICommand.CMD_MODIFY) {
jobCommand.addCommand(subCmd);
}
}
} else {
int type = cmd.getCommandType();
if (type == ICommand.CMD_DELETE) {
jobCommand.addDeleteCommand(cmd);
} else {
jobCommand.addCommand(cmd);
}
}
il.remove();
}
}
if (!jobCommand.isEmpty()) {
cmds.add(jobCommand);
}
}
Aggregations