class ConnectorDefinitionService {

    protected void validate(List<ConnectorDefinition> connectorDefinitions) {
        if (!connectorDefinitions.isEmpty()) {
            Set<String> processedNames = new HashSet<>();

            for (ConnectorDefinition connectorDefinition : connectorDefinitions) {
                String name = connectorDefinition.getName();
                if (name == null || name.isEmpty()) {
                    throw new IllegalStateException("connectorDefinition name cannot be null or empty");
                }
                if (name.contains(".")) {
                    throw new IllegalStateException("connectorDefinition name cannot have '.' character");
                }
                if (!processedNames.add(name)) {
                    throw new IllegalStateException("More than one connectorDefinition with name '" + name + "' was found. Names must be unique.");
                }
            }
        }
    }

    public  ConnectorDefinitionService(String connectorRoot, ObjectMapper objectMapper, ResourcePatternResolver resourceLoader);

}