final String providerId = element.getAttributeValue(attributeName);
if (providerId == null || providerId.trim().equals("")) {
return false;
}
ConnectionRepository connectionRepository = getConnectionRepository(arguments.getContext());
return connectionRepository.findConnections(providerId).size() > 0;
}
private ConnectionRepository getConnectionRepository(final IContext context) {
ApplicationContext applicationContext = getSpringApplicationContextFromThymeleafContext(context);
ConnectionRepository connectionRepository = applicationContext.getBean(ConnectionRepository.class);