com.ibm.bdsl.web.dtx

Class DecisionTableEditorServlet

  • java.lang.Object
    • javax.servlet.GenericServlet
      • javax.servlet.http.HttpServlet
        • com.ibm.bdsl.web.dtx.DecisionTableEditorServlet
  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig


    public abstract class DecisionTableEditorServlet
    extends javax.servlet.http.HttpServlet
    Represents the base class for the web Decision Table Editor.
    See Also:
    Serialized Form
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      protected abstract void addHandleToCache(java.lang.String key, DecisionTableHandle handle, javax.servlet.http.HttpServletRequest request)
      Stores a DecisionTableHandle instance to the web application cache using the specified key.
      protected ilog.rules.dt.IlrDTController createDTController(DecisionTableEditorEnvironment environment)
      Creates the IlrDTController that is used to edit the decision table.
      protected java.io.InputStream createEmptyDta()
      Returns a new empty decision table (.dta).
      protected abstract DecisionTableEditorEnvironment createEnvironment(javax.servlet.http.HttpServletRequest request)
      Creates a new environment for a decision table editor, according to the specified HTTP request.
      void destroy()
      Destroys this servlet and release all resources.
      protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
      Handles a GET request.
      protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
      Handles a POST request.
      protected abstract DecisionTableHandle getHandleFromCache(java.lang.String key, javax.servlet.http.HttpServletRequest request)
      Retrieves a DecisionTableHandle instance with the specified key, from the web application cache.
      void init()
      Initializes this servlet.
      protected abstract DecisionTableHandle removeHandleFromCache(java.lang.String key, javax.servlet.http.HttpServletRequest request)
      Removes a DecisionTableHandle object with the cache according to the specified key.
      • Methods inherited from class javax.servlet.http.HttpServlet

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

        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
    • Constructor Detail

      • DecisionTableEditorServlet

        public DecisionTableEditorServlet()
    • Method Detail

      • doPost

        protected void doPost(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse resp)
                       throws javax.servlet.ServletException,
                              java.io.IOException
        Handles a POST request.
        Overrides:
        doPost in class javax.servlet.http.HttpServlet
        Throws:
        java.io.IOException - if an input or output error is detected when the servlet handles the POST request
        javax.servlet.ServletException - if the request for the POST could not be handled
        Parameters:
        req - an HttpServletRequest object that contains the request the client has made of the servlet
        resp - an HttpServletResponse object that contains the response the servlet sends to the client
      • doGet

        protected void doGet(javax.servlet.http.HttpServletRequest req,
                 javax.servlet.http.HttpServletResponse resp)
                      throws javax.servlet.ServletException,
                             java.io.IOException
        Handles a GET request.
        Overrides:
        doGet in class javax.servlet.http.HttpServlet
        Throws:
        java.io.IOException - if an input or output error is detected when the servlet handles the GET request
        javax.servlet.ServletException - if the request for the GET could not be handled
        Parameters:
        req - an HttpServletRequest object that contains the request the client has made of the servlet
        resp - an HttpServletResponse object that contains the response the servlet sends to the client
      • destroy

        public void destroy()
        Destroys this servlet and release all resources.
        Specified by:
        destroy in interface javax.servlet.Servlet
        Overrides:
        destroy in class javax.servlet.GenericServlet
      • init

        public void init()
                  throws javax.servlet.ServletException
        Initializes this servlet.
        Overrides:
        init in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException - if an init-time error occurs
      • createEnvironment

        protected abstract DecisionTableEditorEnvironment createEnvironment(javax.servlet.http.HttpServletRequest request)
        Creates a new environment for a decision table editor, according to the specified HTTP request.
        Parameters:
        request - An HttpServletRequest object that contains the request the client has made of the servlet
        Returns:
        A new DecisionTableEditorEnvironment instance describing a decision table
      • addHandleToCache

        protected abstract void addHandleToCache(java.lang.String key,
                            DecisionTableHandle handle,
                            javax.servlet.http.HttpServletRequest request)
        Stores a DecisionTableHandle instance to the web application cache using the specified key.
        Parameters:
        key - The key to use to identify the DecisionTableHandle instance
        handle - The DecisionTableHandle object to store
        request - An HttpServletRequest object that contains the request the client has made of the servlet
      • getHandleFromCache

        protected abstract DecisionTableHandle getHandleFromCache(java.lang.String key,
                                             javax.servlet.http.HttpServletRequest request)
        Retrieves a DecisionTableHandle instance with the specified key, from the web application cache.
        Parameters:
        key - The key to use to identify the DecisionTableHandle object to retrieve
        request - An HttpServletRequest object that contains the request the client has made of the servlet
        Returns:
        A DecisionTableHandle instance
      • removeHandleFromCache

        protected abstract DecisionTableHandle removeHandleFromCache(java.lang.String key,
                                                javax.servlet.http.HttpServletRequest request)
        Removes a DecisionTableHandle object with the cache according to the specified key.
        Parameters:
        key - The key to use to identify the DecisionTableHandle object to remove
        request - An HttpServletRequest object that contains the request the client has made of the servlet
        Returns:
        The DecisionTableHandle object that has been removed
      • createEmptyDta

        protected java.io.InputStream createEmptyDta()
        Returns a new empty decision table (.dta).

        Use this method to when you need to create an empty decision table, ready to be edited.

      • createDTController

        protected ilog.rules.dt.IlrDTController createDTController(DecisionTableEditorEnvironment environment)
        Creates the IlrDTController that is used to edit the decision table.

        Override this method only if you need some in-depth customisation of the editor.

        Parameters:
        environment - the decision table editor environment
        Returns:
        A new IlrDTController instance.

© Copyright IBM Corp. 1987, 2017