org.w3c.tidy.servlet
Interface RepositoryFactory

All Known Implementing Classes:
DefaultRepositoryFactory

public interface RepositoryFactory

Public interface for user to redefine validation results handling. Default implementation is provided by jtidyservlet. You define class to be used by servlet using JTidyServlet.properties file.

Version:
$Revision: 1.4 $ ($Author: vlads $)
Author:
Vlad Skarzhevskyy skarzhevskyy@gmail.com
See Also:
DefaultRepositoryFactory, SessionRepositoryFactory

Method Summary
 ResponseRecord createRecord(java.lang.Object key, javax.servlet.http.HttpSession httpSession, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Create new validation results Response Record.
 ResponseRecordRepository getRepositoryInstance(javax.servlet.http.HttpSession httpSession)
          Get the Repository where to store validation results.
 java.lang.Object getResponseID(javax.servlet.http.HttpSession httpSession, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean newResponse)
          Get the ResponseID for given request.
 

Method Detail

getRepositoryInstance

public ResponseRecordRepository getRepositoryInstance(javax.servlet.http.HttpSession httpSession)
Get the Repository where to store validation results.

Parameters:
httpSession - Session to bound to.
Returns:
Returns the repository instance for given Session, or null if nothing should be stored.

getResponseID

public java.lang.Object getResponseID(javax.servlet.http.HttpSession httpSession,
                                      javax.servlet.http.HttpServletRequest request,
                                      javax.servlet.http.HttpServletResponse response,
                                      boolean newResponse)
Get the ResponseID for given request. This bunction is called

Parameters:
httpSession - HttpSession that could store ID as attribute
request - HttpServletRequest that could store ID as attribute, could be null
response - HttpServletResponse that could store ID as attribute, could be null
newResponse - Create new ResponseID anyway
Returns:
Returns the Request/Response ID or null if it should be ignored by JTidy. Object should have proper toString() function.

createRecord

public ResponseRecord createRecord(java.lang.Object key,
                                   javax.servlet.http.HttpSession httpSession,
                                   javax.servlet.http.HttpServletRequest request,
                                   javax.servlet.http.HttpServletResponse response)
Create new validation results Response Record.

Parameters:
request - HttpServletRequest
response - HttpServletResponse
Returns:
Returns new ResponseRecord or null if record for request should be ignored.


Copyright © 2004-2005 sourceforge. All Rights Reserved.