public class FileThumbnailTransformerImpl extends java.lang.Object implements FileThumbnailTransformer
| Constructor and Description |
|---|
FileThumbnailTransformerImpl() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<TransformationHandler> |
getHandlers() |
java.util.List<ThumbnailProvider> |
getThumbnailProviders() |
TransformationHandler |
getTransformationHandler(java.lang.String command)
Gets the transformation handler for the specified command
|
void |
setHandlers(java.util.List<TransformationHandler> handlers) |
void |
setThumbnailProviders(java.util.List<ThumbnailProvider> thumbnailProviders) |
void |
transformFile(org.apache.sling.cms.File file,
java.lang.String[] commands,
OutputFileFormat format,
java.io.OutputStream out)
Transforms the file into a thumbnail using the specified commands.
|
void |
transformFile(org.apache.sling.api.SlingHttpServletRequest request,
java.io.OutputStream out)
Transforms the file from the resource path into a thumbnail using the
specified commands from the suffix.
|
public java.util.List<TransformationHandler> getHandlers()
public java.util.List<ThumbnailProvider> getThumbnailProviders()
public TransformationHandler getTransformationHandler(java.lang.String command)
FileThumbnailTransformergetTransformationHandler in interface FileThumbnailTransformercommand - the command string to use to look up the transformation
handler.public void setHandlers(java.util.List<TransformationHandler> handlers)
handlers - the handlers to setpublic void setThumbnailProviders(java.util.List<ThumbnailProvider> thumbnailProviders)
thumbnailProviders - the thumbnailProviders to setpublic void transformFile(org.apache.sling.cms.File file,
java.lang.String[] commands,
OutputFileFormat format,
java.io.OutputStream out)
throws java.io.IOException
FileThumbnailTransformertransformFile in interface FileThumbnailTransformercommands - the commands to executeformat - the format of the file to returnout - the Outputstream to write the thumbnail tojava.io.IOException - an exception occurs transforming the filepublic void transformFile(org.apache.sling.api.SlingHttpServletRequest request,
java.io.OutputStream out)
throws java.io.IOException
FileThumbnailTransformertransformFile in interface FileThumbnailTransformerrequest - the request to parse the file and commands fromout - the Outputstream to write the thumbnail tojava.io.IOException - an exception occurs transforming the fileCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.