+ private void validateUri(String url) throws URISyntaxException, ServiceException {
+ if (url != null && !url.isEmpty()) {
+ URI uri = new URI(url);
+ if (!uri.isAbsolute()) {
+ throw new ServiceException("URI: " + url + " is not absolute", HttpStatus.CONFLICT);
+ }
+ } else {
+ throw new ServiceException("Missing required URL", HttpStatus.CONFLICT);
+ }
+ }
+