|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.searchApp.logging.DBLoggingDocumentContentHandler
Logs user document access to a SQL database.
XML Configuration Template:
<ContentHandler contentType="[logged content name]"
class="com.raritantechnologies.searchApp.logging.DBLoggingDocumentContentHandler"
loggedType="[Name of the actual IDocumentContentHandler]"
applicationName="[Application Name]"
connectionManager="[Connection Manager Name]"
queryManager="[Query Manager Name]"
insertSQL="insert into --TableName-- [fields]"
>
<Columns>
<Column Field="_USER_NAME_" SQL="USERNAME"/>
<Column Field="_SESSION_ID_" SQL="SESSIONID"/>
<Column Field="_CURRENTTIME_" SQL="QUERYTIME"/>
<Column Field="_APPLICATION_NAME_" SQL="APPLICATIONNAME"/>
<Column Field="_DOCUMENT_NAME_" SQL="ADHOCFIELD"/>
</Columns>
</ContentHandler>
| Constructor Summary | |
DBLoggingDocumentContentHandler()
|
|
| 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 elem)
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DBLoggingDocumentContentHandler()
| Method Detail |
public void initialize(org.w3c.dom.Element elem)
IConfigurable
initialize in interface IDocumentContentHandler
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 java.lang.String getErrorPage(HttpServletRequest pReq)
getErrorPage in interface IDocumentContentHandlerpublic java.lang.String getLastDocumentName()
getLastDocumentName in interface IDocumentContentHandlerpublic java.lang.String getHandlerName()
IDocumentContentHandler
getHandlerName in interface IDocumentContentHandlerpublic java.util.Map getLastDocumentParamMap()
IDocumentContentHandler
getLastDocumentParamMap in interface IDocumentContentHandlerpublic java.lang.String getLastContentType()
getLastContentType in interface IDocumentContentHandlerpublic 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 | |||||||||