com.raritantechnologies.quickstart.userInterface
Interface IDocumentContentHandler

All Superinterfaces:
IConfigurable
All Known Subinterfaces:
IProcessDocumentContentHandler
All Known Implementing Classes:
AjaxDocumentContentHandler, DBLoggingDocumentContentHandler, DieselDocumentContentHandler, DocumentContentHandlerFilter, DocumentumDocumentContentHandler, DynamicContentHandlerFilter, FileDocumentContentHandler, FileLoggingDocumentContentHandler, FTPDocumentContentHandler, JCIFSDocumentContentHandler, Log4JLoggingDocumentContentHandler, NullDocumentContentHandler, RecommendDocumentContentHandler, RedirectContentHandler, RedirectFileContentHandler, SecureDocumentContentHandler, SOAPDocumentContentHandler, SystemObjectDocumentContentHandler, URLDocumentContentHandler, VerityDocumentContentHandler

public interface IDocumentContentHandler
extends IConfigurable

Interface for document content (full text) retrieval through an HttpServlet.

Used by the GetContentServlet. Document content handlers are configurable.
Examples:

XML Configuration Template for ContentHandlers:

   <ContentHandlers>
     <ContentHandler contentType="[ name of the content handler in the http request ]"
                        class="[ class of com.raritantechnologies.quickstart.userInterface.IDocumentContentHandler ]" >

     </ContentHandler>

   </ContentHandlers>
 

Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

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 a Map of document param=value
 java.util.List getRequestParameters()
          returns the list of parameters needed in the HTTP request.
 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.
 

Method Detail

sendDocumentContent

public void sendDocumentContent(ILoginInfo userInfo,
                                HttpServletRequest pReq,
                                HttpServletResponse pRes)
                         throws ServletException
Sends the document content to the HttpServletResponse using parameters in the HttpServletRequest.

Parameters:
userInfo - 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.
Throws:
ServletException

sendDocumentContent

public byte[] sendDocumentContent(java.util.Map handlerInfo)
Sends the document content to the whatever class calls it using parameters defined in a Map.

Parameters:
handlerInfo - Information needed by the implementing class to retrieve and send content.

initialize

public void initialize(org.w3c.dom.Element initElem)
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

getErrorPage

public java.lang.String getErrorPage(HttpServletRequest pReq)

getLastDocumentName

public java.lang.String getLastDocumentName()

getHandlerName

public java.lang.String getHandlerName()
Returns the name of document handler


getLastDocumentParamMap

public java.util.Map getLastDocumentParamMap()
Returns a Map of document param=value


getLastContentType

public java.lang.String getLastContentType()

getRequestParameters

public java.util.List getRequestParameters()
returns the list of parameters needed in the HTTP request.