protected Optional<? extends Image> findImage(final StorageProfile storageProfile, String locatioName) { if (storageProfile.imageReference() != null) { String imageId = storageProfile.imageReference().customImageId() != null ? storageProfile.imageReference().encodeFieldsToUniqueIdCustom(locatioName) : storageProfile.imageReference().encodeFieldsToUniqueId(locatioName); return imageCache.get(imageId); } else { logger.warn("could not find image for storage profile %s", storageProfile); return Optional.absent(); } }
protected Optional<? extends Image> findImage(final StorageProfile storageProfile, String locatioName) { if (storageProfile.imageReference() != null) { String imageId = storageProfile.imageReference().customImageId() != null ? storageProfile.imageReference().encodeFieldsToUniqueIdCustom(locatioName) : storageProfile.imageReference().encodeFieldsToUniqueId(locatioName); return imageCache.get(imageId); } else { logger.warn("could not find image for storage profile %s", storageProfile); return Optional.absent(); } }