com.citytechinc.aem.bedrock.api
Interface ImageSource

All Known Subinterfaces:
BasicNode, ComponentNode, PageDecorator

public interface ImageSource

Definition for items with associated images, such as pages and components.


Method Summary
 Optional<String> getImageSource()
          Get the image source for the default image (named "image") for this node.
 Optional<String> getImageSource(int width)
          Get the image source for the default image (named "image") for this node for the given width.
 Optional<String> getImageSource(String name)
          Get the image source for this node for the named image.
 Optional<String> getImageSource(String name, int width)
          Get the image source for this node for the named image and given width.
 boolean isHasImage()
          Check if the current resource has a default image.
 boolean isHasImage(String name)
          Check if the current resource has a named image.
 

Method Detail

getImageSource

Optional<String> getImageSource()
Get the image source for the default image (named "image") for this node. Uses the image servlet rather than a direct reference to the DAM path.

Returns:
optional image source (absent if the referenced image has no content)

getImageSource

Optional<String> getImageSource(int width)
Get the image source for the default image (named "image") for this node for the given width.

Parameters:
width - image width
Returns:
optional image source (absent if the referenced image has no content)

getImageSource

Optional<String> getImageSource(String name)
Get the image source for this node for the named image.

Parameters:
name - image name (name of image as defined in dialog)
Returns:
optional image source (absent if the referenced image has no content)

getImageSource

Optional<String> getImageSource(String name,
                                int width)
Get the image source for this node for the named image and given width.

Parameters:
name - image name (name of image as defined in dialog)
width - image width
Returns:
optional image source (absent if the referenced image has no content)

isHasImage

boolean isHasImage()
Check if the current resource has a default image.

Returns:
true if image has content

isHasImage

boolean isHasImage(String name)
Check if the current resource has a named image.

Parameters:
name - image name (name of image as defined in dialog)
Returns:
true if image has content


Copyright © 2015 CITYTECH, Inc.. All rights reserved.