Class SizeHandler
- java.lang.Object
-
- org.apache.sling.cms.transformer.internal.SizeHandler
-
- All Implemented Interfaces:
TransformationHandler
public class SizeHandler extends Object implements TransformationHandler
A transformer for resizing an image
-
-
Field Summary
Fields Modifier and Type Field Description static String
PN_HEIGHT
static String
PN_WIDTH
-
Fields inherited from interface org.apache.sling.cms.transformer.TransformationHandler
HANDLER_RESOURCE_TYPE
-
-
Constructor Summary
Constructors Constructor Description SizeHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getResourceType()
Get the resource type associated with this handlervoid
handle(net.coobird.thumbnailator.Thumbnails.Builder<? extends InputStream> builder, org.apache.sling.api.resource.Resource config)
Handles the transformation of the file using the command values from the suffix segment.
-
-
-
Field Detail
-
PN_HEIGHT
public static final String PN_HEIGHT
- See Also:
- Constant Field Values
-
PN_WIDTH
public static final String PN_WIDTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getResourceType
public String getResourceType()
Description copied from interface:TransformationHandler
Get the resource type associated with this handler- Specified by:
getResourceType
in interfaceTransformationHandler
- Returns:
- the handler resource type
-
handle
public void handle(net.coobird.thumbnailator.Thumbnails.Builder<? extends InputStream> builder, org.apache.sling.api.resource.Resource config) throws IOException
Description copied from interface:TransformationHandler
Handles the transformation of the file using the command values from the suffix segment.- Specified by:
handle
in interfaceTransformationHandler
- Parameters:
builder
- the Thumbnails builder to use / updateconfig
- the configuration values for the transformation- Throws:
IOException
- an exception occurs transforming the file
-
-