Module org.apache.santuario.xmlsec
Package org.apache.xml.security.stax.ext
Class AbstractOutputProcessor
java.lang.Object
org.apache.xml.security.stax.ext.AbstractOutputProcessor
- All Implemented Interfaces:
OutputProcessor
- Direct Known Subclasses:
AbstractBufferingOutputProcessor
An abstract OutputProcessor class for reusabilty
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected XMLSecurityConstants.Actionprotected intprotected XMLSecurityProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAfterProcessor(Class<? extends OutputProcessor> processor) Add this processor after the given processororg.apache.xml.security.stax.ext.stax.XMLSecStartElementaddAttributes(org.apache.xml.security.stax.ext.stax.XMLSecStartElement xmlSecStartElement, List<org.apache.xml.security.stax.ext.stax.XMLSecAttribute> attributeList) voidaddBeforeProcessor(Class<? extends OutputProcessor> processor) Add this processor before the given processororg.apache.xml.security.stax.ext.stax.XMLSecAttributecreateAttribute(QName attribute, String attributeValue) org.apache.xml.security.stax.ext.stax.XMLSecCharacterscreateCharacters(char[] text) org.apache.xml.security.stax.ext.stax.XMLSecCharacterscreateCharacters(String characters) voidcreateCharactersAndOutputAsEvent(OutputProcessorChain outputProcessorChain, char[] text) voidcreateCharactersAndOutputAsEvent(OutputProcessorChain outputProcessorChain, String characters) org.apache.xml.security.stax.ext.stax.XMLSecEndElementcreateEndElement(QName element) voidcreateEndElementAndOutputAsEvent(OutputProcessorChain outputProcessorChain, QName element) org.apache.xml.security.stax.ext.stax.XMLSecNamespacecreateNamespace(String prefix, String uri) org.apache.xml.security.stax.ext.stax.XMLSecStartElementcreateStartElementAndOutputAsEvent(OutputProcessorChain outputProcessorChain, QName element, boolean outputLocalNs, List<org.apache.xml.security.stax.ext.stax.XMLSecAttribute> attributes) voidcreateStartElementAndOutputAsEvent(OutputProcessorChain outputProcessorChain, QName element, List<org.apache.xml.security.stax.ext.stax.XMLSecNamespace> namespaces, List<org.apache.xml.security.stax.ext.stax.XMLSecAttribute> attributes) voiddoFinal(OutputProcessorChain outputProcessorChain) Will be called when the whole document is processed.intSet<Class<? extends OutputProcessor>> This OutputProcessor will be added after the processors in this setSet<Class<? extends OutputProcessor>> This OutputProcessor will be added before the processors in this setgetPhase()The Phase in which this OutputProcessor should be appliedvoidinit(OutputProcessorChain outputProcessorChain) Method will be called after setting the propertiesprotected voidoutputAsEvent(OutputProcessorChain outputProcessorChain, org.apache.xml.security.stax.ext.stax.XMLSecEvent xmlSecEvent) protected voidoutputDOMElement(Element element, OutputProcessorChain outputProcessorChain) protected SecurePartsecurePartMatches(org.apache.xml.security.stax.ext.stax.XMLSecStartElement xmlSecStartElement, Map<Object, SecurePart> secureParts) protected SecurePartsecurePartMatches(org.apache.xml.security.stax.ext.stax.XMLSecStartElement xmlSecStartElement, OutputProcessorChain outputProcessorChain, String dynamicParts) voidsetAction(XMLSecurityConstants.Action action, int actionOrder) setter for the Action after instantiation of the processorvoidvoidsetXMLSecurityProperties(XMLSecurityProperties xmlSecurityProperties) setter for the XMLSecurityProperties after instantiation of the processorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.xml.security.stax.ext.OutputProcessor
processEvent
-
Field Details
-
securityProperties
-
action
-
actionOrder
protected int actionOrder
-
-
Constructor Details
-
AbstractOutputProcessor
- Throws:
XMLSecurityException
-
-
Method Details
-
setXMLSecurityProperties
Description copied from interface:OutputProcessorsetter for the XMLSecurityProperties after instantiation of the processor- Specified by:
setXMLSecurityPropertiesin interfaceOutputProcessor- Parameters:
xmlSecurityProperties-
-
setAction
Description copied from interface:OutputProcessorsetter for the Action after instantiation of the processor- Specified by:
setActionin interfaceOutputProcessor- Parameters:
action- The action this processor belongs to, possiblynullfor no particular action.actionOrder- The action order of this processor, possibly-1for no particular action order.
-
init
Description copied from interface:OutputProcessorMethod will be called after setting the properties- Specified by:
initin interfaceOutputProcessor- Throws:
XMLSecurityException
-
getPhase
Description copied from interface:OutputProcessorThe Phase in which this OutputProcessor should be applied- Specified by:
getPhasein interfaceOutputProcessor- Returns:
- The Phase
-
setPhase
-
addBeforeProcessor
Description copied from interface:OutputProcessorAdd this processor before the given processor- Specified by:
addBeforeProcessorin interfaceOutputProcessor- Parameters:
processor-
-
getBeforeProcessors
Description copied from interface:OutputProcessorThis OutputProcessor will be added before the processors in this set- Specified by:
getBeforeProcessorsin interfaceOutputProcessor- Returns:
- The set with the named OutputProcessor
-
addAfterProcessor
Description copied from interface:OutputProcessorAdd this processor after the given processor- Specified by:
addAfterProcessorin interfaceOutputProcessor- Parameters:
processor-
-
getAfterProcessors
Description copied from interface:OutputProcessorThis OutputProcessor will be added after the processors in this set- Specified by:
getAfterProcessorsin interfaceOutputProcessor- Returns:
- The set with the named OutputProcessor
-
getSecurityProperties
-
getAction
- Specified by:
getActionin interfaceOutputProcessor- Returns:
- The action to which this processor belongs, if any, else
null.
-
getActionOrder
public int getActionOrder()- Specified by:
getActionOrderin interfaceOutputProcessor- Returns:
- The action order of this processor, or
-1.
-
doFinal
public void doFinal(OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException Description copied from interface:OutputProcessorWill be called when the whole document is processed.- Specified by:
doFinalin interfaceOutputProcessor- Parameters:
outputProcessorChain-- Throws:
XMLStreamException- thrown when a streaming error occursXMLSecurityException- thrown when a Security failure occurs
-
addAttributes
public org.apache.xml.security.stax.ext.stax.XMLSecStartElement addAttributes(org.apache.xml.security.stax.ext.stax.XMLSecStartElement xmlSecStartElement, List<org.apache.xml.security.stax.ext.stax.XMLSecAttribute> attributeList) throws XMLStreamException - Throws:
XMLStreamException
-
createStartElementAndOutputAsEvent
public void createStartElementAndOutputAsEvent(OutputProcessorChain outputProcessorChain, QName element, List<org.apache.xml.security.stax.ext.stax.XMLSecNamespace> namespaces, List<org.apache.xml.security.stax.ext.stax.XMLSecAttribute> attributes) throws XMLStreamException, XMLSecurityException -
createStartElementAndOutputAsEvent
public org.apache.xml.security.stax.ext.stax.XMLSecStartElement createStartElementAndOutputAsEvent(OutputProcessorChain outputProcessorChain, QName element, boolean outputLocalNs, List<org.apache.xml.security.stax.ext.stax.XMLSecAttribute> attributes) throws XMLStreamException, XMLSecurityException -
createEndElement
-
createEndElementAndOutputAsEvent
public void createEndElementAndOutputAsEvent(OutputProcessorChain outputProcessorChain, QName element) throws XMLStreamException, XMLSecurityException -
createCharactersAndOutputAsEvent
public void createCharactersAndOutputAsEvent(OutputProcessorChain outputProcessorChain, String characters) throws XMLStreamException, XMLSecurityException -
createCharactersAndOutputAsEvent
public void createCharactersAndOutputAsEvent(OutputProcessorChain outputProcessorChain, char[] text) throws XMLStreamException, XMLSecurityException -
createCharacters
-
createCharacters
public org.apache.xml.security.stax.ext.stax.XMLSecCharacters createCharacters(char[] text) -
createAttribute
-
createNamespace
-
outputAsEvent
protected void outputAsEvent(OutputProcessorChain outputProcessorChain, org.apache.xml.security.stax.ext.stax.XMLSecEvent xmlSecEvent) throws XMLStreamException, XMLSecurityException -
securePartMatches
protected SecurePart securePartMatches(org.apache.xml.security.stax.ext.stax.XMLSecStartElement xmlSecStartElement, OutputProcessorChain outputProcessorChain, String dynamicParts) -
securePartMatches
protected SecurePart securePartMatches(org.apache.xml.security.stax.ext.stax.XMLSecStartElement xmlSecStartElement, Map<Object, SecurePart> secureParts) -
outputDOMElement
protected void outputDOMElement(Element element, OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException
-