Class Scaler

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
digilib.servlet.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:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    type of error message
    static enum 
    servlet error codes
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final org.slf4j.Logger
    logger for accounting requests
    protected static final org.slf4j.Logger
    logger for authentication related
    protected AuthzOps
    AuthzOps instance
    default error message type
    static File
    authentication error image file
    protected DocuDirCache
    DocuDirCache instance
    DigilibConfiguration instance
    static File
    image error image file
    Image executor
    protected static final org.slf4j.Logger
    gengeral logger for this class
    static File
    not found error image file
    protected boolean
    send files as is?
    protected boolean
    use authorization database
    static final String
    digilib servlet version (for all components)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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
     
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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
    • imageJobCenter

      protected DigilibJobCenter<DocuImage> imageJobCenter
      Image executor
    • 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?
    • dlConfig

      protected DigilibServletConfiguration dlConfig
      DigilibConfiguration instance
    • useAuthorization

      protected boolean useAuthorization
      use authorization database
    • authzOp

      protected AuthzOps authzOp
      AuthzOps instance
  • Constructor Details

    • Scaler

      public Scaler()
  • Method Details

    • 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()