infosapient.servlet
Class RuleServlet

infosapient.servlet.RuleServlet

public class RuleServlet

RuleServlet

Version:
$Revision: 1.1.1.1 $

Field Summary
private static java.util.Properties properties
           
private  boolean trace_enabled
           
private  int trace_indent
           
 
Constructor Summary
RuleServlet()
           
 
Method Summary
(package private)  void deleteRule(infosapient.servlet.HttpServletRequest request, infosapient.servlet.HttpServletResponse response)
          Delete a selected Rule from the knowledge base Expects to find the follwing in the request stream: ruleName: Name of the rule If the rule exists, it's deleted RUSure chcking is done in the html page.
 void doGet(infosapient.servlet.HttpServletRequest request, infosapient.servlet.HttpServletResponse response)
          Forward this to doPost Creation date: (03/26/01 3:22:50 PM)
 void doPost(infosapient.servlet.HttpServletRequest request, infosapient.servlet.HttpServletResponse response)
          Insert the method's description here.
(package private)  void getRule(infosapient.servlet.HttpServletRequest request, infosapient.servlet.HttpServletResponse response)
          Returns a rule in html table format.
 java.lang.String getServletInfo()
           
 void init(infosapient.servlet.ServletConfig config)
           
(package private)  void listRulesForAttribute(infosapient.servlet.HttpServletRequest request, infosapient.servlet.HttpServletResponse response)
          Return the list of rules as an html table Expects parameters: referring: sets whether referring or deducing rules to be listed.
 void log(java.lang.String str)
          Insert the method's description here.
private  void returnFriendlyError(java.lang.String methodName, java.lang.String errorMessage, infosapient.servlet.HttpServletRequest request, infosapient.servlet.HttpServletResponse response)
          Handles passing error messages back to the client
(package private)  void setRule(infosapient.servlet.HttpServletRequest request, infosapient.servlet.HttpServletResponse response)
          Sets the value of a rule in the kb Expects to find the follwing in the request stream: ruleName: Name of the rule ruleText: The expression If the rule exists, it's updated otherwise it's added Creation date: (12/14/1999 10:16:34 PM)
private  void trace_call(java.lang.String s)
           
private  void trace_return(java.lang.String s)
           
 

Field Detail

properties

private static java.util.Properties properties

trace_enabled

private boolean trace_enabled

trace_indent

private int trace_indent
Constructor Detail

RuleServlet

public RuleServlet()
Method Detail

deleteRule

void deleteRule(infosapient.servlet.HttpServletRequest request,
                infosapient.servlet.HttpServletResponse response)
Delete a selected Rule from the knowledge base Expects to find the follwing in the request stream:
  • ruleName: Name of the rule If the rule exists, it's deleted RUSure chcking is done in the html page. Creation date: (12/14/1999 10:30:00 PM)

  • doGet

    public void doGet(infosapient.servlet.HttpServletRequest request,
                      infosapient.servlet.HttpServletResponse response)
               throws javax.servlet.ServletException
    Forward this to doPost Creation date: (03/26/01 3:22:50 PM)
    Throws:
    javax.servlet.ServletException - The exception description.

    doPost

    public void doPost(infosapient.servlet.HttpServletRequest request,
                       infosapient.servlet.HttpServletResponse response)
                throws javax.servlet.ServletException
    Insert the method's description here. Creation date: (03/26/01 3:22:50 PM)
    Throws:
    javax.servlet.ServletException - The exception description.

    getRule

    void getRule(infosapient.servlet.HttpServletRequest request,
                 infosapient.servlet.HttpServletResponse response)
    Returns a rule in html table format. Expects that this will be called inside a form - no buttons. Expects the rule name will be in the request stream Creation date: (12/14/1999 10:09:02 AM)
    Parameters:
    request - javax.servlet.http.HttpServletRequest
    response - javax.servlet.http.HttpServletResponse

    getServletInfo

    public java.lang.String getServletInfo()

    init

    public void init(infosapient.servlet.ServletConfig config)
              throws infosapient.servlet.ServletException

    listRulesForAttribute

    void listRulesForAttribute(infosapient.servlet.HttpServletRequest request,
                               infosapient.servlet.HttpServletResponse response)
    Return the list of rules as an html table Expects parameters:
  • referring: sets whether referring or deducing rules to be listed. if referring == null, then deducing is used
  • attribute: the name of the attribute for the rules Creation date: (12/13/1999 8:56:05 PM)

  • log

    public void log(java.lang.String str)
    Insert the method's description here. Creation date: (12/13/1999 8:50:25 PM)
    Parameters:
    str - java.lang.String

    returnFriendlyError

    private void returnFriendlyError(java.lang.String methodName,
                                     java.lang.String errorMessage,
                                     infosapient.servlet.HttpServletRequest request,
                                     infosapient.servlet.HttpServletResponse response)
                              throws java.io.IOException,
                                     infosapient.servlet.ServletException
    Handles passing error messages back to the client
    Parameters:
    String - errorMessage
    HttpServletRequest - request
    HttpServletResponse - response

    setRule

    void setRule(infosapient.servlet.HttpServletRequest request,
                 infosapient.servlet.HttpServletResponse response)
    Sets the value of a rule in the kb Expects to find the follwing in the request stream:
  • ruleName: Name of the rule
  • ruleText: The expression If the rule exists, it's updated otherwise it's added Creation date: (12/14/1999 10:16:34 PM)

  • trace_call

    private final void trace_call(java.lang.String s)

    trace_return

    private final void trace_return(java.lang.String s)

    License to use this program is provided under the TERMS OF THE COMMON PUBLIC LICENSE 0.5. ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.

    Copyright (c) 2001, Workplace Performance Tools, All Rights Reserved