コード例 #1
0
 private URI buildGeneratedImagePath(ImageStyle imageStyle, URI uri) throws URISyntaxException {
   return new URI(
       uri.getScheme()
           + "://"
           + GENERATED_IMAGES_PATH
           + "/"
           + imageStyle.getKey()
           + uri.getPath());
 }
コード例 #2
0
  @Override
  public Map<String, URI> getGeneratedImagesPaths(URI uri) throws URISyntaxException {
    Map<String, URI> generatedImages = new HashMap();

    for (ImageStyle imageStyle : imageStyles.values()) {
      generatedImages.put(imageStyle.getKey(), buildGeneratedImagePath(imageStyle, uri));
    }

    return generatedImages;
  }
コード例 #3
0
  @Override
  public Map<String, URL> getGeneratedImagesUrls(URI uri) throws Exception {
    Map<String, URL> generatedImages = new HashMap();

    for (ImageStyle imageStyle : imageStyles.values()) {
      generatedImages.put(
          imageStyle.getKey(), fileService.getUrl(buildGeneratedImagePath(imageStyle, uri)));
    }

    return generatedImages;
  }