Esri Geoportal Server
1.2.9

com.esri.gpt.control.cart
Class KeysetProcessor

java.lang.Object
  extended by com.esri.gpt.control.cart.KeysetProcessor
Direct Known Subclasses:
MergeThenTransform, XslBundler, ZipXmls

public abstract class KeysetProcessor
extends Object

Processes the documents associated with a set of keys.


Field Summary
protected static XsltTemplates XSLTTEMPLATES
          class variables =========================================================
 
Constructor Summary
KeysetProcessor()
          Default constructor
 
Method Summary
abstract  void execute(HttpServletRequest request, HttpServletResponse response, RequestContext context)
          Processes the HTTP request.
protected  XsltTemplate getCompiledTemplate(String xsltPath)
          Gets a compiled XSLT template.
static KeysetProcessor newProcessor(HttpServletRequest request, RequestContext context)
          Instantiates a new keyset processor based upon the "processor" parameter supplied to the HTTP request.
 String[] readKeys(HttpServletRequest request, RequestContext context, boolean useCartMaximum)
          Reads the keys parameter for the request.
 String readXml(HttpServletRequest request, RequestContext context, String id)
          Reads the metadata XML for an item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSLTTEMPLATES

protected static XsltTemplates XSLTTEMPLATES
class variables =========================================================

Constructor Detail

KeysetProcessor

public KeysetProcessor()
Default constructor

Method Detail

getCompiledTemplate

protected XsltTemplate getCompiledTemplate(String xsltPath)
                                    throws TransformerException
Gets a compiled XSLT template.

Parameters:
xsltPath - the path to an XSLT
Returns:
the compiled template
Throws:
IOException - if an IO exception occurs
TransformerException - if a transformation exception occurs
SAXException - if a SAX parsing exception occurs

execute

public abstract void execute(HttpServletRequest request,
                             HttpServletResponse response,
                             RequestContext context)
                      throws Exception
Processes the HTTP request.

Parameters:
request - the HTTP request
response - HTTP response
context - the request context
Throws:
Exception - if an exception occurs

newProcessor

public static KeysetProcessor newProcessor(HttpServletRequest request,
                                           RequestContext context)
                                    throws Exception
Instantiates a new keyset processor based upon the "processor" parameter supplied to the HTTP request.

Parameters:
request - the HTTP request
context - the request context
Returns:
the processor
Throws:
Exception - if an exception occurs

readKeys

public String[] readKeys(HttpServletRequest request,
                         RequestContext context,
                         boolean useCartMaximum)
                  throws Exception
Reads the keys parameter for the request.

Parameters:
request - the HTTP servlet request
context - the request context
useCartMaximum - if true throw an exception if the the number of keys exceeds the maximum
Returns:
the keys
Throws:
Exception - if an exception occurs

readXml

public String readXml(HttpServletRequest request,
                      RequestContext context,
                      String id)
               throws Exception
Reads the metadata XML for an item.

Parameters:
request - the HTTP servlet request
context - the request context
id - the document id
Returns:
the XML
Throws:
Exception - if an exception occurs

Esri Geoportal Server
1.2.9

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.