Validation connectorValidation =
connectorValidator.validateJob(job.getType(), connectorConfig);
Validation frameworkValidation =
frameworkValidator.validateJob(job.getType(), frameworkConfig);
Status finalStatus = Status.getWorstStatus(connectorValidation.getStatus(),
frameworkValidation.getStatus());
// Return back validations in all cases
ValidationBean outputBean =
new ValidationBean(connectorValidation, frameworkValidation);
// If we're good enough let's perform the action
if(finalStatus.canProceed()) {
if(update) {
RepositoryManager.getInstance().getRepository().updateJob(job);
} else {
RepositoryManager.getInstance().getRepository().createJob(job);
outputBean.setId(job.getPersistenceId());