|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.quickstart.userInterface.URLDocumentContentHandler
DocumentContentHandler implementation for documents accessable by a URL. Combined with a
GetContentServlet, the handler gets data from
the URL and sends to browser.
The main reason to use this over a straight hyperlink to the URL is to allow RTI DocumentContentHandler pipeline processing ( such as click logging, filtering, tagging, etc.). The URLDocumentContentHandler also enables group security authentication to be implemented using NTLM Authentication.
XML Configuration Template:
<ContentHandler
contentType="[Quickstart content type]"
outputContentType="this is the Content-Type: header value"
class="com.raritantechnologies.quickstart.userInterface.URLDocumentContentHandler"
errorPage="[ page to go if URL is not found]"
proxyHost="[ name of proxy host (firewall) ]"
proxyPort="[ port number for proxy ]"
proxyUser="[ username for proxy (or for remote authentication) ]"
proxyPassword="[ password for proxy or for remote authentication ]"
proxyMapName="[ name of ProxyServerMap that can route requests to proxy server(s) ]"
useURLSocket="true|false(default)"
urlSocketType="get(default)|post"
excludeContentTypes="[comma delimited list of MIME types to ignore]"
cachedCookiesKey="[ key to get cached Cookies for this connection ]"
cachedURLKey="[ key to use to cache the current URL ]"
addBaseURLTag="[ global(true)|local|false(default) - add a base url tag to resolve relative paths ]"
useNTLMConnection="[ true|false(default) ]"
urlField="[ name of url field (default='url') ]" >
<!-- Optional String Filter -->
<StringFilter class="[ class of com.raritantechnologies.utils.filter.IStringFilter ]" >
</StringFilter>
<!-- Optional Binary to String filter (IStreamFilter) -->
<StreamFilter class="[ class of com.raritantechnologies.utils.filter.IStreamFilter ]" >
</StreamFilter>
</ContentHandler>
| Constructor Summary | |
URLDocumentContentHandler()
|
|
| Method Summary | |
java.lang.String |
getErrorPage(HttpServletRequest pReq)
|
java.lang.String |
getHandlerName()
Returns the name of document handler |
java.lang.String |
getLastContentType()
|
java.lang.String |
getLastDocumentName()
|
java.util.Map |
getLastDocumentParamMap()
Returns Map of param=value |
java.util.List |
getRequestParameters()
returns the list of parameters needed in the HTTP request. |
IStringFilter |
getStringFilter()
|
void |
initialize(org.w3c.dom.Element initElem)
Initializes the object from an XML tag or element. |
void |
sendDocumentContent(ILoginInfo userInfo,
HttpServletRequest pReq,
HttpServletResponse pRes)
Sends the document content to the HttpServletResponse using parameters in the HttpServletRequest. |
byte[] |
sendDocumentContent(java.util.Map handlerInfo)
Sends the document content to the whatever class calls it using parameters defined in a Map. |
void |
setStringFilter(IStringFilter strFilter)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public URLDocumentContentHandler()
| Method Detail |
public void sendDocumentContent(ILoginInfo userInfo,
HttpServletRequest pReq,
HttpServletResponse pRes)
throws ServletException
IDocumentContentHandler
sendDocumentContent in interface IDocumentContentHandleruserInfo - User information for this session user. May be used to restrict access to content.pReq - The HttpServletRequest for the requested content.pRes - The HttpServletResponse. The content handler will obtain a ServletOutputStream from
this object and write the content to this stream.
ServletExceptionpublic void initialize(org.w3c.dom.Element initElem)
IConfigurable
initialize in interface IDocumentContentHandlerpublic java.lang.String getErrorPage(HttpServletRequest pReq)
getErrorPage in interface IDocumentContentHandlerpublic java.lang.String getLastDocumentName()
getLastDocumentName in interface IDocumentContentHandlerpublic java.lang.String getHandlerName()
getHandlerName in interface IDocumentContentHandlerpublic java.util.Map getLastDocumentParamMap()
getLastDocumentParamMap in interface IDocumentContentHandlerpublic java.lang.String getLastContentType()
getLastContentType in interface IDocumentContentHandlerpublic void setStringFilter(IStringFilter strFilter)
public IStringFilter getStringFilter()
public java.util.List getRequestParameters()
IDocumentContentHandler
getRequestParameters in interface IDocumentContentHandlerpublic byte[] sendDocumentContent(java.util.Map handlerInfo)
IDocumentContentHandler
sendDocumentContent in interface IDocumentContentHandlerhandlerInfo - Information needed by the implementing class to retrieve and send content.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||