com.ibm.commerce.context.content.resources.file.servlet

Class ManagedFilePreviewRequestPluginImpl

  • java.lang.Object
    • com.ibm.commerce.context.content.resources.file.servlet.ManagedFilePreviewRequestPluginImpl
  • All Implemented Interfaces:
    PreviewRequestPlugin


    public class ManagedFilePreviewRequestPluginImpl
    extends java.lang.Object
    implements PreviewRequestPlugin
    A file preview request plug-in for content management. This request plug-in accepts the incoming request only if the file requested exists in the database for either the base or the workspace of the request. If the file exists, it is returned to the client. If not, then the preview request plug-in will not handle the request.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.ServletContext servletContext)
      This method looks to see whether the file request has a version that exists in the content management system (the CMFILE table).
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ManagedFilePreviewRequestPluginImpl

        public ManagedFilePreviewRequestPluginImpl()
        This is the default constructor for this class. It calls the constructor from the superclass.
    • Method Detail

      • handleRequest

        public boolean handleRequest(javax.servlet.http.HttpServletRequest request,
                                     javax.servlet.http.HttpServletResponse response,
                                     javax.servlet.ServletContext servletContext)
                              throws javax.servlet.ServletException,
                                     java.io.IOException
        This method looks to see whether the file request has a version that exists in the content management system (the CMFILE table). It will return that instance if a record exists. IF a workspace is associated with the request, it will determine whether there is a version of the file for that workspace. If not, it will return the file associated with the base, if any.
        Specified by:
        handleRequest in interface PreviewRequestPlugin
        Parameters:
        request - The HTTP request.
        response - The HTTP response.
        servletContext - The servlet context of the servlet making the request.
        Returns:
        Whether the preview request plug-in handled the request. This depends on whether there is a version of the request that exists in the content management system.
        Throws:
        javax.servlet.ServletException - A problem occurred when modifying the response object.
        java.io.IOException - A problem occurred while writing the response in the response object.
        See Also:
        com.ibm.commerce.context.preview.servlet.PreviewRequestPlugin#handleRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)