/** * Gets resource from a String location. * * @param location the metadata location * @return the resource from * @throws IOException the exception */ public static AbstractResource getResourceFrom(final String location) throws IOException { val metadataLocationResource = getRawResourceFrom(location); if (!metadataLocationResource.exists() || !metadataLocationResource.isReadable()) { throw new FileNotFoundException("Resource " + location + " does not exist or is unreadable"); } return metadataLocationResource; }
LOGGER.debug("Service [{}] is configured to use a custom theme [{}]", rService, rService.getTheme()); val resource = ResourceUtils.getRawResourceFrom(rService.getTheme()); if (resource instanceof FileSystemResource && resource.exists()) { LOGGER.debug("Executing groovy script to determine theme for [{}]", service.getId());