Class Scaler

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    @WebServlet(name="Scaler",
                urlPatterns={"/Scaler/*","/servlet/Scaler/*"},
                asyncSupported=true)
    public class Scaler
    extends javax.servlet.http.HttpServlet
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Scaler.ErrMsg
      type of error message
      static class  Scaler.Error
      servlet error codes
    • Constructor Summary

      Constructors 
      Constructor Description
      Scaler()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void digilibError​(Scaler.ErrMsg type, Scaler.Error error, String msg, javax.servlet.http.HttpServletResponse response)
      Sends an error to the client as text or image.
      void doGet​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      protected void doHead​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)  
      protected void doOptions​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)  
      void doPost​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      long getLastModified​(javax.servlet.http.HttpServletRequest request)
      Returns modification time relevant to the request for caching.
      static String getVersion()  
      void init​(javax.servlet.ServletConfig config)
      Initialisation on first run.
      void processRequest​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Service this request using the response.
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doPut, doTrace, service, service
      • Methods inherited from class javax.servlet.GenericServlet

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

      • version

        public static final String version
        digilib servlet version (for all components)
      • defaultErrMsgType

        public static Scaler.ErrMsg defaultErrMsgType
        default error message type
      • accountlog

        protected static final org.slf4j.Logger accountlog
        logger for accounting requests
      • logger

        protected static final org.slf4j.Logger logger
        gengeral logger for this class
      • authlog

        protected static final org.slf4j.Logger authlog
        logger for authentication related
      • dirCache

        protected DocuDirCache dirCache
        DocuDirCache instance
      • denyImgFile

        public static File denyImgFile
        authentication error image file
      • errorImgFile

        public static File errorImgFile
        image error image file
      • notfoundImgFile

        public static File notfoundImgFile
        not found error image file
      • sendFileAllowed

        protected boolean sendFileAllowed
        send files as is?
      • useAuthorization

        protected boolean useAuthorization
        use authorization database
      • authzOp

        protected AuthzOps authzOp
        AuthzOps instance
    • Constructor Detail

      • Scaler

        public Scaler()
    • Method Detail

      • init

        public void init​(javax.servlet.ServletConfig config)
                  throws javax.servlet.ServletException
        Initialisation on first run.
        Specified by:
        init in interface javax.servlet.Servlet
        Overrides:
        init in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException
        See Also:
        Servlet.init(javax.servlet.ServletConfig)
      • getLastModified

        public long getLastModified​(javax.servlet.http.HttpServletRequest request)
        Returns modification time relevant to the request for caching.
        Overrides:
        getLastModified in class javax.servlet.http.HttpServlet
        See Also:
        HttpServlet.getLastModified(javax.servlet.http.HttpServletRequest)
      • doGet

        public void doGet​(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws javax.servlet.ServletException
        Overrides:
        doGet in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
      • doPost

        public void doPost​(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
                    throws javax.servlet.ServletException
        Overrides:
        doPost in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
      • doHead

        protected void doHead​(javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse resp)
                       throws javax.servlet.ServletException,
                              IOException
        Overrides:
        doHead in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • doOptions

        protected void doOptions​(javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse resp)
                          throws javax.servlet.ServletException,
                                 IOException
        Overrides:
        doOptions in class javax.servlet.http.HttpServlet
        Throws:
        javax.servlet.ServletException
        IOException
      • processRequest

        public void processRequest​(javax.servlet.http.HttpServletRequest request,
                                   javax.servlet.http.HttpServletResponse response)
                            throws javax.servlet.ServletException
        Service this request using the response.
        Parameters:
        request -
        response -
        Throws:
        javax.servlet.ServletException
      • digilibError

        public static void digilibError​(Scaler.ErrMsg type,
                                        Scaler.Error error,
                                        String msg,
                                        javax.servlet.http.HttpServletResponse response)
        Sends an error to the client as text or image.
        Parameters:
        type -
        error -
        msg -
        response -
      • getVersion

        public static String getVersion()