Package org.ametys.core.ui.dispatcher
Class DispatchGenerator.ResponseHandler
- java.lang.Object
-
- org.apache.excalibur.xml.sax.ContentHandlerProxy
-
- org.ametys.core.util.IgnoreRootHandler
-
- org.ametys.core.ui.dispatcher.DispatchGenerator.ResponseHandler
-
- All Implemented Interfaces:
ContentHandler
,LexicalHandler
- Enclosing class:
- DispatchGenerator
public static class DispatchGenerator.ResponseHandler extends IgnoreRootHandler
Wrap the handler ignore start and end document, but adding a response tag.
-
-
Field Summary
Fields Modifier and Type Field Description private String
_code
private ContentHandler
_handler
private String
_parameterKey
private List<String>
_startedElements
-
Constructor Summary
Constructors Constructor Description ResponseHandler(ContentHandler handler, String parameterKey, String code)
Create the wrapper
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endDocument()
void
endElement(String uri, String loc, String raw)
void
exceptionFinish()
Finish abruptly this handler to obtain a correct XMLvoid
startDocument()
void
startElement(String uri, String loc, String raw, Attributes a)
-
Methods inherited from class org.ametys.core.util.IgnoreRootHandler
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
-
Methods inherited from class org.apache.excalibur.xml.sax.ContentHandlerProxy
characters, endPrefixMapping, ignorableWhitespace, processingInstruction, setContentHandler, setDocumentLocator, skippedEntity, startPrefixMapping
-
-
-
-
Field Detail
-
_parameterKey
private final String _parameterKey
-
_handler
private final ContentHandler _handler
-
_startedElements
private final List<String> _startedElements
-
-
Constructor Detail
-
ResponseHandler
public ResponseHandler(ContentHandler handler, String parameterKey, String code)
Create the wrapper- Parameters:
handler
- The content handler to wrapparameterKey
- The id of the responsecode
- The status code of the response
-
-
Method Detail
-
exceptionFinish
public void exceptionFinish() throws SAXException
Finish abruptly this handler to obtain a correct XML- Throws:
SAXException
- if an error occurred
-
startDocument
public void startDocument() throws SAXException
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classIgnoreRootHandler
- Throws:
SAXException
-
startElement
public void startElement(String uri, String loc, String raw, Attributes a) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classContentHandlerProxy
- Throws:
SAXException
-
endElement
public void endElement(String uri, String loc, String raw) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classContentHandlerProxy
- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classIgnoreRootHandler
- Throws:
SAXException
-
-