com.raritantechnologies.quickstart.taglibrary.request
Class PatternRequestFormatter

java.lang.Object
  extended bycom.raritantechnologies.quickstart.taglibrary.request.PatternRequestFormatter
All Implemented Interfaces:
IConfigurable, IRequestFormatter

public class PatternRequestFormatter
extends java.lang.Object
implements IRequestFormatter

Uses a String pattern template to format a field or fields of an HTTP Request.

The template can be any string pattern. Field values are inserted into the template at positions indicated by {fieldname} sections where "fieldname" is the name of some HTTP Request parameter.

XML Configuration Template:
   <RequestFormatter class="com.raritantechnologies.quickstart.taglibrary.request.PatternRequestFormatter"
                      startBraceChar="[ character to start field name block - default is '{' ]"
                      endBraceChar="[ character to start field name block - default is '}' ]"
                      useSessionData="[true(default)|false - use session data if request is null ]" >

     <!-- =========================================================== -->
     <!-- String template that request field values will be inserted  -->
     <!-- into. If this is HTML or XML, the template block should be  -->
     <!-- wrapped in a <!CDATA[  ]]> section.                         -->
     <!-- =========================================================== -->
     <Template>
        Display string with {fieldname} sections that will have http request values
        inserted by the PatternRequestFormatter.
     </Template>

     <StringFilters>
       <!-- ==================================================== -->
       <!--  One or more IStringFilters to be used to filter     -->
       <!--  request parameter values. requestParams="ALL"       -->
       <!--  indicates that the filter should be used with       -->
       <!--  all parameter values.                               -->
       <!-- ==================================================== -->
       <StringFilter class="[ class of com.raritantechnologies.utils.filter.IStringFilter ]"
                        requestParams="[ comma separated list of the request parameter that is(are) to be filtered ]" >
         <!-- Configuration parameters for the StringFilter ... -->
       </StringFilter>
     </StringFilters>

   </RequestFormatter>
 

Developed by Raritan Technologies Inc..

Author:
Ted Sullivan, Kepler Gelotte

Constructor Summary
PatternRequestFormatter()
           
 
Method Summary
 java.lang.String formatSearchRequest(RaritanPageContext pageContext)
          Reformat the http request as a String.
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternRequestFormatter

public PatternRequestFormatter()
Method Detail

formatSearchRequest

public java.lang.String formatSearchRequest(RaritanPageContext pageContext)
Description copied from interface: IRequestFormatter
Reformat the http request as a String.

Specified by:
formatSearchRequest in interface IRequestFormatter

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IRequestFormatter