infosapient.servlet
Class AttributeServlet

infosapient.servlet.AttributeServlet

public class AttributeServlet

AttributeServlet

Version:
$Revision: 1.1.1.1 $ NOTE: The 'GetAttribute' was intentionally left out since there was not a current need.

Field Summary
private static java.util.Properties properties
           
private  boolean trace_enabled
           
private  int trace_indent
           
 
Constructor Summary
AttributeServlet()
           
 
Method Summary
(package private)  void deleteAttribute(infosapient.servlet.HttpServletRequest request, infosapient.servlet.HttpServletResponse response)
          Delete an Attribute from the knowledge base.
 void doGet(infosapient.servlet.HttpServletRequest request, infosapient.servlet.HttpServletResponse response)
          This implementation of doGet forwards the request to doPost.
 void doPost(infosapient.servlet.HttpServletRequest request, infosapient.servlet.HttpServletResponse response)
          Handle the jsp/html request.
 java.lang.String getServletInfo()
           
private  void goToPage(java.lang.String address, infosapient.servlet.HttpServletRequest request, infosapient.servlet.HttpServletResponse response)
          Method for forwarding pages instead of duplicating code in other methods.
 void init(infosapient.servlet.ServletConfig config)
           
(package private)  void listAttributes(infosapient.servlet.HttpServletRequest request, infosapient.servlet.HttpServletResponse response)
          Return the list of attributes in a droplist Creation date: (12/15/1999 9:24:05 AM)
 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 setAttribute(infosapient.servlet.HttpServletRequest request, infosapient.servlet.HttpServletResponse response)
          Sets the value of an attribute in the kb Expects to find the follwing in the request stream: attributeName: Name of the Attribute attributeDesc: The description of the attribute attributePrompt: The prompt for the attribute ( may be in the form of a question ).
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

AttributeServlet

public AttributeServlet()
Method Detail

deleteAttribute

void deleteAttribute(infosapient.servlet.HttpServletRequest request,
                     infosapient.servlet.HttpServletResponse response)
Delete an Attribute from the knowledge base. Expects to find the follwing in the request stream:
  • attributeName: Name of the attribute If the attribute exists, it will be deleted, along with any Sets or Rules that are associated with the attribute. RUSure chcking is done in the html page. Creation date: (12/15/1999 8:50:00 AM)

  • doGet

    public void doGet(infosapient.servlet.HttpServletRequest request,
                      infosapient.servlet.HttpServletResponse response)
               throws infosapient.servlet.ServletException
    This implementation of doGet forwards the request to doPost.
    Parameters:
    HttpServletRequest - request
    HttpServletResponse - response
    Throws:
    infosapient.servlet.ServletException - Creation date: (03/21/01 11:12:20 AM)

    doPost

    public void doPost(infosapient.servlet.HttpServletRequest request,
                       infosapient.servlet.HttpServletResponse response)
                throws infosapient.servlet.ServletException
    Handle the jsp/html request.
    Parameters:
    HttpServletRequest - request
    HttpServletResponse - response
    Throws:
    infosapient.servlet.ServletException - Creation date: (03/21/01 11:12:20 AM)

    getServletInfo

    public java.lang.String getServletInfo()

    goToPage

    private void goToPage(java.lang.String address,
                          infosapient.servlet.HttpServletRequest request,
                          infosapient.servlet.HttpServletResponse response)
                   throws java.io.IOException,
                          javax.servlet.ServletException
    Method for forwarding pages instead of duplicating code in other methods. Creation date: (03/01/01 10:47:11 AM)
    Parameters:
    address - java.lang.String
    request - javax.servlet.http.HttpServletRequest
    response - javax.servlet.http.HttpServletResponse
    Throws:
    java.io.IOException -  
    javax.servlet.ServletException -  

    init

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

    listAttributes

    void listAttributes(infosapient.servlet.HttpServletRequest request,
                        infosapient.servlet.HttpServletResponse response)
    Return the list of attributes in a droplist Creation date: (12/15/1999 9:24:05 AM)

    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

    setAttribute

    void setAttribute(infosapient.servlet.HttpServletRequest request,
                      infosapient.servlet.HttpServletResponse response)
    Sets the value of an attribute in the kb Expects to find the follwing in the request stream:
  • attributeName: Name of the Attribute
  • attributeDesc: The description of the attribute
  • attributePrompt: The prompt for the attribute ( may be in the form of a question ).
  • attributeBoolean: Whether the attribute is boolean or not
  • booleanType: Whether the boolean attribute is sinusoidal or triangle If the attribute exists, it's updated otherwise it's added Creation date: (12/15/1999 9:35:34 AM)

  • 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