throws SyncopeClientCompositeErrorException {
SyncopeClientCompositeErrorException compositeErrorException = new SyncopeClientCompositeErrorException(
HttpStatus.BAD_REQUEST);
SyncopeClientException requiredValuesMissing = new SyncopeClientException(
SyncopeClientExceptionType.RequiredValuesMissing);
if (connInstanceTO.getBundleName() == null) {
requiredValuesMissing.addElement("bundlename");
}
if (connInstanceTO.getVersion() == null) {
requiredValuesMissing.addElement("bundleversion");
}
if (connInstanceTO.getConnectorName() == null) {
requiredValuesMissing.addElement("connectorname");
}
if (connInstanceTO.getConfiguration() == null || connInstanceTO.getConfiguration().isEmpty()) {
requiredValuesMissing.addElement("configuration");
}
ConnInstance connectorInstance = new ConnInstance();
BeanUtils.copyProperties(connInstanceTO, connectorInstance, IGNORE_PROPERTIES);
// Throw composite exception if there is at least one element set
// in the composing exceptions
if (!requiredValuesMissing.isEmpty()) {
compositeErrorException.addException(requiredValuesMissing);
}
if (compositeErrorException.hasExceptions()) {
throw compositeErrorException;