Class ResourceServlet

  • All Implemented Interfaces:
    jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable, net.anotheria.moskito.core.producers.IStatsProducer
    Direct Known Subclasses:
    CMSFileServlet, CMSImageServlet

    public abstract class ResourceServlet
    extends net.anotheria.moskito.web.MoskitoHttpServlet
    Resource servlet. Serves for Images and Files stream.
    Author:
    h3ll
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class jakarta.servlet.http.HttpServlet

        LEGACY_DO_HEAD
    • Constructor Summary

      Constructors 
      Constructor Description
      ResourceServlet()
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract String getFileName​(ResourceReadType type, String propertyValue)
      Returns file name, from document which was selected!
      static org.slf4j.Logger getLog()  
      IASResourceDataService getResourceService()  
      protected void moskitoDoGet​(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res)  
      protected void moskitoDoPost​(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res)  
      • Methods inherited from class net.anotheria.moskito.web.MoskitoHttpServlet

        doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getCategory, getLastModified, getMonitoringIntervals, getProducerId, getStats, getSubsystem, init, moskitoDoDelete, moskitoDoHead, moskitoDoOptions, moskitoDoPut, moskitoDoTrace, moskitoGetLastModified, useShortStatList
      • Methods inherited from class jakarta.servlet.http.HttpServlet

        service, service
      • Methods inherited from class jakarta.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
    • Constructor Detail

      • ResourceServlet

        public ResourceServlet()
        Constructor.
    • Method Detail

      • moskitoDoGet

        protected void moskitoDoGet​(jakarta.servlet.http.HttpServletRequest req,
                                    jakarta.servlet.http.HttpServletResponse res)
                             throws jakarta.servlet.ServletException,
                                    IOException
        Overrides:
        moskitoDoGet in class net.anotheria.moskito.web.MoskitoHttpServlet
        Throws:
        jakarta.servlet.ServletException
        IOException
      • getFileName

        protected abstract String getFileName​(ResourceReadType type,
                                              String propertyValue)
                                       throws jakarta.servlet.ServletException
        Returns file name, from document which was selected!
        Parameters:
        type - ResourceReadType
        propertyValue - value of property
        Returns:
        file name
        Throws:
        jakarta.servlet.ServletException - on errors from ResourceService
      • getLog

        public static org.slf4j.Logger getLog()
      • moskitoDoPost

        protected void moskitoDoPost​(jakarta.servlet.http.HttpServletRequest req,
                                     jakarta.servlet.http.HttpServletResponse res)
                              throws jakarta.servlet.ServletException,
                                     IOException
        Overrides:
        moskitoDoPost in class net.anotheria.moskito.web.MoskitoHttpServlet
        Throws:
        jakarta.servlet.ServletException
        IOException