Class AbstractEncryptOutputProcessor.AbstractInternalEncryptionOutputProcessor
- java.lang.Object
-
- org.apache.xml.security.stax.ext.AbstractOutputProcessor
-
- org.apache.xml.security.stax.impl.processor.output.AbstractEncryptOutputProcessor.AbstractInternalEncryptionOutputProcessor
-
- All Implemented Interfaces:
OutputProcessor
- Enclosing class:
- AbstractEncryptOutputProcessor
public abstract class AbstractEncryptOutputProcessor.AbstractInternalEncryptionOutputProcessor extends AbstractOutputProcessor
Processor which handles the effective encryption of the data
-
-
Field Summary
Fields Modifier and Type Field Description private AbstractEncryptOutputProcessor.CharacterEventGeneratorOutputStreamcharacterEventGeneratorOutputStreamprivate java.io.OutputStreamcipherOutputStreamprivate intelementCounterprivate java.lang.Stringencodingprivate EncryptionPartDefencryptionPartDefprivate javax.xml.stream.XMLEventWriterxmlEventWriterprivate XMLSecStartElementxmlSecStartElement-
Fields inherited from class org.apache.xml.security.stax.ext.AbstractOutputProcessor
action, securityProperties
-
-
Constructor Summary
Constructors Constructor Description AbstractInternalEncryptionOutputProcessor(EncryptionPartDef encryptionPartDef, XMLSecStartElement xmlSecStartElement, java.lang.String encoding)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.io.OutputStreamapplyTransforms(java.io.OutputStream outputStream)protected abstract voidcreateKeyInfoStructure(OutputProcessorChain outputProcessorChain)protected voiddoFinalInternal(OutputProcessorChain outputProcessorChain)private voidencryptEvent(XMLSecEvent xmlSecEvent)java.lang.StringgetEncoding()protected EncryptionPartDefgetEncryptionPartDef()protected XMLSecStartElementgetXmlSecStartElement()voidinit(OutputProcessorChain outputProcessorChain)Method will be called after setting the propertiesvoidprocessEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)protected voidprocessEventInternal(XMLSecStartElement xmlSecStartElement, OutputProcessorChain outputProcessorChain)Creates the Data structure around the cipher datavoidsetEncoding(java.lang.String encoding)protected voidsetEncryptionPartDef(EncryptionPartDef encryptionPartDef)protected voidsetXmlSecStartElement(XMLSecStartElement xmlSecStartElement)-
Methods inherited from class org.apache.xml.security.stax.ext.AbstractOutputProcessor
addAfterProcessor, addAttributes, addBeforeProcessor, createAttribute, createCharacters, createCharacters, createCharactersAndOutputAsEvent, createCharactersAndOutputAsEvent, createEndElement, createEndElementAndOutputAsEvent, createNamespace, createStartElementAndOutputAsEvent, createStartElementAndOutputAsEvent, doFinal, getAction, getAfterProcessors, getBeforeProcessors, getPhase, getSecurityProperties, outputAsEvent, outputDOMElement, processNextEvent, securePartMatches, securePartMatches, setAction, setPhase, setXMLSecurityProperties
-
-
-
-
Field Detail
-
encryptionPartDef
private EncryptionPartDef encryptionPartDef
-
characterEventGeneratorOutputStream
private AbstractEncryptOutputProcessor.CharacterEventGeneratorOutputStream characterEventGeneratorOutputStream
-
xmlEventWriter
private javax.xml.stream.XMLEventWriter xmlEventWriter
-
cipherOutputStream
private java.io.OutputStream cipherOutputStream
-
encoding
private java.lang.String encoding
-
xmlSecStartElement
private XMLSecStartElement xmlSecStartElement
-
elementCounter
private int elementCounter
-
-
Constructor Detail
-
AbstractInternalEncryptionOutputProcessor
public AbstractInternalEncryptionOutputProcessor(EncryptionPartDef encryptionPartDef, XMLSecStartElement xmlSecStartElement, java.lang.String encoding) throws XMLSecurityException
- Throws:
XMLSecurityException
-
-
Method Detail
-
init
public void init(OutputProcessorChain outputProcessorChain) throws XMLSecurityException
Description copied from interface:OutputProcessorMethod will be called after setting the properties- Specified by:
initin interfaceOutputProcessor- Overrides:
initin classAbstractOutputProcessor- Throws:
XMLSecurityException
-
applyTransforms
protected java.io.OutputStream applyTransforms(java.io.OutputStream outputStream) throws XMLSecurityException- Throws:
XMLSecurityException
-
processEvent
public void processEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain) throws javax.xml.stream.XMLStreamException, XMLSecurityException
- Specified by:
processEventin classAbstractOutputProcessor- Throws:
javax.xml.stream.XMLStreamExceptionXMLSecurityException
-
encryptEvent
private void encryptEvent(XMLSecEvent xmlSecEvent) throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
-
processEventInternal
protected void processEventInternal(XMLSecStartElement xmlSecStartElement, OutputProcessorChain outputProcessorChain) throws javax.xml.stream.XMLStreamException, XMLSecurityException
Creates the Data structure around the cipher data- Throws:
javax.xml.stream.XMLStreamExceptionXMLSecurityException
-
createKeyInfoStructure
protected abstract void createKeyInfoStructure(OutputProcessorChain outputProcessorChain) throws javax.xml.stream.XMLStreamException, XMLSecurityException
- Throws:
javax.xml.stream.XMLStreamExceptionXMLSecurityException
-
doFinalInternal
protected void doFinalInternal(OutputProcessorChain outputProcessorChain) throws javax.xml.stream.XMLStreamException, XMLSecurityException
- Throws:
javax.xml.stream.XMLStreamExceptionXMLSecurityException
-
getEncryptionPartDef
protected EncryptionPartDef getEncryptionPartDef()
-
setEncryptionPartDef
protected void setEncryptionPartDef(EncryptionPartDef encryptionPartDef)
-
getXmlSecStartElement
protected XMLSecStartElement getXmlSecStartElement()
-
setXmlSecStartElement
protected void setXmlSecStartElement(XMLSecStartElement xmlSecStartElement)
-
getEncoding
public java.lang.String getEncoding()
-
setEncoding
public void setEncoding(java.lang.String encoding)
-
-