com.raritantechnologies.searchApp.taglibrary
Class URLPageImportRenderer

java.lang.Object
  extended bycom.raritantechnologies.searchApp.taglibrary.PageImportRenderer
      extended bycom.raritantechnologies.searchApp.taglibrary.URLPageImportRenderer
All Implemented Interfaces:
IConfigurable, IPageContextRenderer

public class URLPageImportRenderer
extends PageImportRenderer

Imports an html fragment from an outside URL.

XML Configuration Template:
  <SystemObject 
     type="PageImportRenderer" 
     name="someName"
     configurableClass="com.raritantechnologies.searchApp.taglibrary.URLPageImportRenderer"
     pageFrom="requestURL|requestParams|requestParam|dynamicURL"
     urlBase="http://someurl.com/someaction"
     requestParam="parameter to get url from if pageFrom equals requestParam"
     useURLSocket="true|false" 
     urlSocketType="get|post"
     proxyHost="[ host name for HTTP proxy ]"
     proxyPort="[ port number for HTTP proxy ]"
     proxyAuthentication="true|false(default)" 
     proxyMapName="[ name of system ProxyServerMap ]"
     addBaseURLTag="[true|false(default) - automatically add base url tag to resolve relative paths ]" >

     <!-- param mapping for dynamicURL -->
     <Param inputParam="foo" outputParam="baa" /> 

     <!-- transfer bar value filtered by string filter to ba -->
     <Param inputParam="bar" outputParam="ba" >
        <StringFilter class="[class of com.raritantechnologies.utils.filter.IStringFilter]" >
          <!-- initialization parameters for StringFilter -->
        </StringFilter> 
     </Param>

     <FixedParam outputParam="fixed" outputValue="aaa" /> 

     <FixedParam outputParam="current" outputValue="FROM_FILTER" > 
       <StringFilter class="[class of com.raritantechnologies.utils.filter.IStringFilter]"
                        inputString="[fixed input string to string filter]" >
          <!-- initialization parameters for StringFilter -->
        </StringFilter> 
     </FixedParam>

     <!-- Optional StringFilter to be applied to the URL before rendering -->
     <URLFilter class="[ class of com.raritantechnologies.utils.filter.IStringFilter]" >
         <!-- configuration parameters for URL StringFilter -->
     </URLFilter>

     <!-- Optional StringFilter applied to entire page HTML -->
     <PageFilter class="[class of com.raritantechnologies.utils.filter.IStringFilter]" >
         <!-- configuration parameters for Page StringFilter -->
     </PageFilter>

  </SystemObject>
 

Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Nested Class Summary
 
Nested classes inherited from class com.raritantechnologies.searchApp.taglibrary.PageImportRenderer
PageImportRenderer.PageElement
 
Field Summary
 
Fields inherited from class com.raritantechnologies.searchApp.taglibrary.PageImportRenderer
caching
 
Constructor Summary
URLPageImportRenderer()
           
 
Method Summary
 java.lang.String getPage(RaritanPageContext pContext)
          returns an HTML page or page fragment given a set of request parameters.
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 
Methods inherited from class com.raritantechnologies.searchApp.taglibrary.PageImportRenderer
addPageElement, getAddPersistent, getConfigurationXML, getFragmentFile, getPageHeader, getPageName, getPageTrailer, render, setAddPersistent, setPageHeader, setPageName, setPageTrailer, setStringFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLPageImportRenderer

public URLPageImportRenderer()
Method Detail

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 IConfigurable
Overrides:
initialize in class PageImportRenderer

getPage

public java.lang.String getPage(RaritanPageContext pContext)
Description copied from class: PageImportRenderer
returns an HTML page or page fragment given a set of request parameters.

Overrides:
getPage in class PageImportRenderer
Parameters:
pContext - contains request and session parameters needed to execute the page retrieval.
Returns:
A string containing the page data.