use of com.amalto.workbench.utils.OperationIgnoredException in project tmdm-studio-se by Talend.
the class DefaultDeployCommand method doExecute.
private IStatus doExecute(Object params, IProgressMonitor monitor) {
ERepositoryObjectType type = getViewObjectType();
String objectName = getLabel();
IInteractiveHandler handler = InteractiveService.findHandler(type);
if (handler != null) {
String typeLabel = handler.getLabel();
monitor.subTask(Messages.bind(Messages.Deploy_text, typeLabel));
try {
boolean isOK = handler.deploy(this);
if (getDeployStatus() != null) {
return getDeployStatus();
}
if (isOK) {
if (getCommandType() == CMD_MODIFY) {
return DeployStatus.getOKStatus(this, Messages.bind(Messages.Deploy_successfully_text, typeLabel, objectName));
}
return DeployStatus.getOKStatus(this, Messages.bind(Messages.Create_successfully_text, typeLabel, objectName));
} else {
return DeployStatus.getErrorStatus(this, Messages.bind(Messages.Deploy_fail_text, typeLabel, objectName));
}
} catch (OperationIgnoredException e) {
return null;
} catch (OperationCanceledException e) {
return DeployStatus.getInfoStatus(this, Messages.bind(Messages.Deploy_cancel_text, typeLabel, objectName));
} catch (WebServiceException e) {
return getDetailErrorMsg(Messages.Deploy_fail_cause_text, typeLabel, objectName, e);
} catch (XtentisException e) {
return getDetailErrorMsg(Messages.Deploy_fail_cause_text, typeLabel, objectName, e);
} catch (RuntimeException e) {
return getDetailErrorMsg(Messages.Deploy_fail_cause_text, typeLabel, objectName, e);
}
} else {
return DeployStatus.getErrorStatus(this, Messages.bind(Messages.Deploy_notSupport_text, objectName));
}
}
Aggregations