com.day.cq.wcm.core.impl.servlets
Class ThumbnailServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by org.apache.sling.api.servlets.SlingSafeMethodsServlet
          extended by com.day.cq.wcm.core.impl.servlets.ThumbnailServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ThumbnailServlet
extends org.apache.sling.api.servlets.SlingSafeMethodsServlet

The ThumbnailServlet creates out of the requested file resources a thumbnail, either as gif, png or jpg. The width and height can be specified too. The generated thumbnail will be persisted in the dam:thumbnails folder which is a child node of the file's resource node (jcr:content)

See Also:
Serialized Form

Field Summary
protected static String CONFIG_PROPERTY_WORKSPACE
           
static String DAM_THUMBNAIL_FOLDER_NAME
          thumbnail folder
static String GIF_MIMETYPE
           
static String JPEG_MIMETYPE
           
static String MIX_DAM_RESOURCE
          dam:Resource mixin nodetype
static String MIX_DAM_THUMBNAILS
          dam:Thumbnail mixin nodetype
static String PJPEG_MIMETYPE
           
static String PNG_MIMETYPE
           
static String[] TUMBNAIL_POSTFIX
           
 
Constructor Summary
ThumbnailServlet()
           
 
Method Summary
protected  void activate(org.osgi.service.component.ComponentContext context)
          Activate
protected  void deactivate(org.osgi.service.component.ComponentContext context)
           
protected  void doGet(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)
          
 
Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet
doGeneric, doHead, doOptions, doTrace, getAllowedRequestMethods, getServletInfo, handleMethodNotImplemented, mayService, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GIF_MIMETYPE

public static final String GIF_MIMETYPE
See Also:
Constant Field Values

PNG_MIMETYPE

public static final String PNG_MIMETYPE
See Also:
Constant Field Values

JPEG_MIMETYPE

public static final String JPEG_MIMETYPE
See Also:
Constant Field Values

PJPEG_MIMETYPE

public static final String PJPEG_MIMETYPE
See Also:
Constant Field Values

TUMBNAIL_POSTFIX

public static final String[] TUMBNAIL_POSTFIX

DAM_THUMBNAIL_FOLDER_NAME

public static final String DAM_THUMBNAIL_FOLDER_NAME
thumbnail folder

See Also:
Constant Field Values

MIX_DAM_THUMBNAILS

public static final String MIX_DAM_THUMBNAILS
dam:Thumbnail mixin nodetype

See Also:
Constant Field Values

MIX_DAM_RESOURCE

public static final String MIX_DAM_RESOURCE
dam:Resource mixin nodetype

See Also:
Constant Field Values

CONFIG_PROPERTY_WORKSPACE

protected static final String CONFIG_PROPERTY_WORKSPACE
See Also:
Constant Field Values
Constructor Detail

ThumbnailServlet

public ThumbnailServlet()
Method Detail

doGet

protected void doGet(org.apache.sling.api.SlingHttpServletRequest request,
                     org.apache.sling.api.SlingHttpServletResponse response)
              throws javax.servlet.ServletException,
                     IOException

Overrides:
doGet in class org.apache.sling.api.servlets.SlingSafeMethodsServlet
Throws:
javax.servlet.ServletException
IOException

activate

protected void activate(org.osgi.service.component.ComponentContext context)
                 throws RepositoryException
Activate

Throws:
RepositoryException

deactivate

protected void deactivate(org.osgi.service.component.ComponentContext context)


Copyright © 2008 Day Management AG. All Rights Reserved.