You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by gi...@apache.org on 2012/10/18 14:17:43 UTC
svn commit: r1399606 [1/2] - in /santuario/xml-security-java/trunk: ./
src/main/java/org/apache/xml/security/stax/config/
src/main/java/org/apache/xml/security/stax/ext/
src/main/java/org/apache/xml/security/stax/ext/stax/
src/main/java/org/apache/xml/...
Author: giger
Date: Thu Oct 18 12:17:41 2012
New Revision: 1399606
URL: http://svn.apache.org/viewvc?rev=1399606&view=rev
Log:
cleanups
Modified:
santuario/xml-security-java/trunk/pom.xml
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/ConfigurationProperties.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/Init.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/JCEAlgorithmMapper.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/ResourceResolverMapper.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/SecurityHeaderHandlerMapper.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/TransformerAlgorithmMapper.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/XIncludeHandler.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractInputProcessor.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractInputSecurityHeaderHandler.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractOutputProcessor.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/InputProcessorChain.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/OutputProcessorChain.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/ProcessorChain.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/SecurityContext.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/SecurityTokenProvider.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/stax/XMLSecEvent.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/DocumentContextImpl.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/InputProcessorChainImpl.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/OutputProcessorChainImpl.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/SecurityContextImpl.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityEventWriter.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamReader.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamWriter.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/HMACSignatureAlgorithm.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/PKISignatureAlgorithm.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLEncryptedKeyInputHandler.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLSignatureInputHandler.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureEndingOutputProcessor.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/securityToken/AbstractInboundSecurityToken.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecAttributeImpl.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecCharactersImpl.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecStartElementImpl.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/ConcreteLSInput.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/DigestOutputStream.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/MultiInputStream.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/SignerOutputStream.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/securityEvent/SecurityEventListener.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/RFC2253Parser.java
santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/InputProcessorChainTest.java
santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/OutputProcessorChainTest.java
santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/XMLSecurityStreamReaderTest.java
santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/c14n/Canonicalizer11Test.java
santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/c14n/Canonicalizer20010315Test.java
santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java
santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/utils/StAX2DOM.java
santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/utils/XMLSecEventAllocator.java
Modified: santuario/xml-security-java/trunk/pom.xml
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/pom.xml?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/pom.xml (original)
+++ santuario/xml-security-java/trunk/pom.xml Thu Oct 18 12:17:41 2012
@@ -122,7 +122,7 @@
<targetJdk>1.6</targetJdk>
<excludes>
<exclude>
- **/XMLX509SKI.java,**/CryptoBase.java, **/XPathFactory.java,**/MultiInputStream.java,**/AbstractDecryptInputProcessor.java,**/DEREncodedKeyValue.java
+ **/XMLX509SKI.java,**/CryptoBase.java, **/XPathFactory.java,**/DEREncodedKeyValue.java
</exclude>
</excludes>
</configuration>
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/ConfigurationProperties.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/ConfigurationProperties.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/ConfigurationProperties.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/ConfigurationProperties.java Thu Oct 18 12:17:41 2012
@@ -38,7 +38,7 @@ public class ConfigurationProperties {
super();
}
- protected synchronized static void init(PropertiesType propertiesType) throws Exception {
+ protected static synchronized void init(PropertiesType propertiesType) throws Exception {
properties = new Properties();
List<PropertyType> handlerList = propertiesType.getProperty();
for (int i = 0; i < handlerList.size(); i++) {
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/Init.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/Init.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/Init.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/Init.java Thu Oct 18 12:17:41 2012
@@ -46,7 +46,7 @@ public class Init {
private static URI initialized = null;
@SuppressWarnings("unchecked")
- public synchronized static void init(URI uri) throws XMLSecurityException {
+ public static synchronized void init(URI uri) throws XMLSecurityException {
if (initialized == null || (uri != null && !uri.equals(initialized))) {
try {
JAXBContext jaxbContext = JAXBContext.newInstance("org.xmlsecurity.ns.configuration");
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/JCEAlgorithmMapper.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/JCEAlgorithmMapper.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/JCEAlgorithmMapper.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/JCEAlgorithmMapper.java Thu Oct 18 12:17:41 2012
@@ -40,7 +40,7 @@ public class JCEAlgorithmMapper {
private JCEAlgorithmMapper() {
}
- protected synchronized static void init(JCEAlgorithmMappingsType jceAlgorithmMappingsType) throws Exception {
+ protected static synchronized void init(JCEAlgorithmMappingsType jceAlgorithmMappingsType) throws Exception {
List<AlgorithmType> algorithms = jceAlgorithmMappingsType.getAlgorithm();
uriToJCEName = new HashMap<String, String>(algorithms.size() + 1);
algorithmsMap = new HashMap<String, AlgorithmType>(algorithms.size() + 1);
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/ResourceResolverMapper.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/ResourceResolverMapper.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/ResourceResolverMapper.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/ResourceResolverMapper.java Thu Oct 18 12:17:41 2012
@@ -39,7 +39,7 @@ public class ResourceResolverMapper {
private ResourceResolverMapper() {
}
- protected synchronized static void init(ResourceResolversType resourceResolversType) throws Exception {
+ protected static synchronized void init(ResourceResolversType resourceResolversType) throws Exception {
List<ResolverType> handlerList = resourceResolversType.getResolver();
resourceResolvers = new ArrayList<ResourceResolverLookup>(handlerList.size() + 1);
for (int i = 0; i < handlerList.size(); i++) {
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/SecurityHeaderHandlerMapper.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/SecurityHeaderHandlerMapper.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/SecurityHeaderHandlerMapper.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/SecurityHeaderHandlerMapper.java Thu Oct 18 12:17:41 2012
@@ -40,7 +40,7 @@ public class SecurityHeaderHandlerMapper
private SecurityHeaderHandlerMapper() {
}
- protected synchronized static void init(SecurityHeaderHandlersType securityHeaderHandlersType) throws Exception {
+ protected static synchronized void init(SecurityHeaderHandlersType securityHeaderHandlersType) throws Exception {
List<HandlerType> handlerList = securityHeaderHandlersType.getHandler();
handlerClassMap = new HashMap<QName, Class<?>>(handlerList.size() + 1);
for (int i = 0; i < handlerList.size(); i++) {
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/TransformerAlgorithmMapper.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/TransformerAlgorithmMapper.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/TransformerAlgorithmMapper.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/TransformerAlgorithmMapper.java Thu Oct 18 12:17:41 2012
@@ -43,7 +43,7 @@ public class TransformerAlgorithmMapper
private TransformerAlgorithmMapper() {
}
- protected synchronized static void init(TransformAlgorithmsType transformAlgorithms) throws Exception {
+ protected static synchronized void init(TransformAlgorithmsType transformAlgorithms) throws Exception {
List<TransformAlgorithmType> algorithms = transformAlgorithms.getTransformAlgorithm();
algorithmsClassMapInOut = new HashMap<String, Class<?>>();
algorithmsClassMapIn = new HashMap<String, Class<?>>();
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/XIncludeHandler.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/XIncludeHandler.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/XIncludeHandler.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/config/XIncludeHandler.java Thu Oct 18 12:17:41 2012
@@ -77,7 +77,7 @@ public class XIncludeHandler extends Def
this.uriDocMap = uriDocMap;
}
-
+ @Override
public void setDocumentLocator(Locator locator) {
//this.systemId could already be set when we do a IdentityTransform (@see below)
if (locator.getSystemId() == null && this.systemId == null) {
@@ -93,30 +93,35 @@ public class XIncludeHandler extends Def
this.contentHandler.setDocumentLocator(locator);
}
+ @Override
public void startDocument() throws SAXException {
if (!skipEvents) {
this.contentHandler.startDocument();
}
}
+ @Override
public void endDocument() throws SAXException {
if (!skipEvents) {
this.contentHandler.endDocument();
}
}
+ @Override
public void startPrefixMapping(String prefix, String uri) throws SAXException {
if (!skipEvents) {
this.contentHandler.startPrefixMapping(prefix, uri);
}
}
+ @Override
public void endPrefixMapping(String prefix) throws SAXException {
if (!skipEvents) {
this.contentHandler.endPrefixMapping(prefix);
}
}
+ @Override
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
if (xIncludeNS.equals(uri) && xIncludeLN.equals(localName)) {
String href = atts.getValue("href");
@@ -192,24 +197,29 @@ public class XIncludeHandler extends Def
}
}
+ @Override
public void endElement(String uri, String localName, String qName) throws SAXException {
if (!(xIncludeNS.equals(uri) && xIncludeLN.equals(localName))) {
this.contentHandler.endElement(uri, localName, qName);
}
}
+ @Override
public void characters(char[] ch, int start, int length) throws SAXException {
this.contentHandler.characters(ch, start, length);
}
+ @Override
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
this.contentHandler.ignorableWhitespace(ch, start, length);
}
+ @Override
public void processingInstruction(String target, String data) throws SAXException {
this.contentHandler.processingInstruction(target, data);
}
+ @Override
public void skippedEntity(String name) throws SAXException {
this.contentHandler.skippedEntity(name);
}
@@ -264,6 +274,7 @@ public class XIncludeHandler extends Def
return null;
}
+ @Override
public Iterator<String> getPrefixes(String namespaceURI) {
return null;
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractInputProcessor.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractInputProcessor.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractInputProcessor.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractInputProcessor.java Thu Oct 18 12:17:41 2012
@@ -46,6 +46,7 @@ public abstract class AbstractInputProce
this.securityProperties = securityProperties;
}
+ @Override
public XMLSecurityConstants.Phase getPhase() {
return phase;
}
@@ -54,11 +55,13 @@ public abstract class AbstractInputProce
this.phase = phase;
}
+ @Override
public void addBeforeProcessor(Object processor) {
this.beforeProcessors = new HashSet<Object>();
this.beforeProcessors.add(processor);
}
+ @Override
public Set<Object> getBeforeProcessors() {
if (this.beforeProcessors == null) {
return Collections.emptySet();
@@ -66,11 +69,13 @@ public abstract class AbstractInputProce
return this.beforeProcessors;
}
+ @Override
public void addAfterProcessor(Object processor) {
this.afterProcessors = new HashSet<Object>();
this.afterProcessors.add(processor);
}
+ @Override
public Set<Object> getAfterProcessors() {
if (this.afterProcessors == null) {
return Collections.emptySet();
@@ -78,10 +83,13 @@ public abstract class AbstractInputProce
return this.afterProcessors;
}
+ @Override
public abstract XMLSecEvent processNextHeaderEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException;
+ @Override
public abstract XMLSecEvent processNextEvent(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException;
+ @Override
public void doFinal(InputProcessorChain inputProcessorChain) throws XMLStreamException, XMLSecurityException {
inputProcessorChain.doFinal();
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractInputSecurityHeaderHandler.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractInputSecurityHeaderHandler.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractInputSecurityHeaderHandler.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractInputSecurityHeaderHandler.java Thu Oct 18 12:17:41 2012
@@ -18,8 +18,6 @@
*/
package org.apache.xml.security.stax.ext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.xml.security.exceptions.XMLSecurityException;
import org.apache.xml.security.stax.ext.stax.XMLSecEvent;
import org.apache.xml.security.stax.impl.XMLSecurityEventReader;
@@ -39,8 +37,6 @@ import java.util.List;
*/
public abstract class AbstractInputSecurityHeaderHandler implements XMLSecurityHeaderHandler {
- protected final transient Log logger = LogFactory.getLog(this.getClass());
-
@SuppressWarnings("unchecked")
protected <T> T parseStructure(final Deque<XMLSecEvent> eventDeque, final int index,
final XMLSecurityProperties securityProperties) throws XMLSecurityException {
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractOutputProcessor.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractOutputProcessor.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractOutputProcessor.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/AbstractOutputProcessor.java Thu Oct 18 12:17:41 2012
@@ -75,6 +75,7 @@ public abstract class AbstractOutputProc
outputProcessorChain.addProcessor(this);
}
+ @Override
public XMLSecurityConstants.Phase getPhase() {
return phase;
}
@@ -83,6 +84,7 @@ public abstract class AbstractOutputProc
this.phase = phase;
}
+ @Override
public void addBeforeProcessor(Object processor) {
if (this.beforeProcessors == null) {
this.beforeProcessors = new HashSet<Object>();
@@ -90,6 +92,7 @@ public abstract class AbstractOutputProc
this.beforeProcessors.add(processor);
}
+ @Override
public Set<Object> getBeforeProcessors() {
if (this.beforeProcessors == null) {
return Collections.emptySet();
@@ -97,6 +100,7 @@ public abstract class AbstractOutputProc
return this.beforeProcessors;
}
+ @Override
public void addAfterProcessor(Object processor) {
if (this.afterProcessors == null) {
this.afterProcessors = new HashSet<Object>();
@@ -104,6 +108,7 @@ public abstract class AbstractOutputProc
this.afterProcessors.add(processor);
}
+ @Override
public Set<Object> getAfterProcessors() {
if (this.afterProcessors == null) {
return Collections.emptySet();
@@ -122,11 +127,13 @@ public abstract class AbstractOutputProc
public abstract void processEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)
throws XMLStreamException, XMLSecurityException;
+ @Override
public void processNextEvent(XMLSecEvent xmlSecEvent, OutputProcessorChain outputProcessorChain)
throws XMLStreamException, XMLSecurityException {
processEvent(xmlSecEvent, outputProcessorChain);
}
+ @Override
public void doFinal(OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException {
outputProcessorChain.doFinal();
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/InputProcessorChain.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/InputProcessorChain.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/InputProcessorChain.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/InputProcessorChain.java Thu Oct 18 12:17:41 2012
@@ -39,35 +39,35 @@ public interface InputProcessorChain ext
*
* @param inputProcessor The InputProcessor which should be placed in the chain
*/
- public void addProcessor(InputProcessor inputProcessor);
+ void addProcessor(InputProcessor inputProcessor);
/**
* Removes the specified InputProcessor from this chain.
*
* @param inputProcessor to remove
*/
- public void removeProcessor(InputProcessor inputProcessor);
+ void removeProcessor(InputProcessor inputProcessor);
/**
* Returns a list with the active processors.
*
* @return List<InputProcessor>
*/
- public List<InputProcessor> getProcessors();
+ List<InputProcessor> getProcessors();
/**
* The actual processed document's security context
*
* @return The SecurityContext
*/
- public SecurityContext getSecurityContext();
+ SecurityContext getSecurityContext();
/**
* The actual processed document's document context
*
* @return The DocumentContext
*/
- public DocumentContext getDocumentContext();
+ DocumentContext getDocumentContext();
/**
* Create a new SubChain. The XMLEvents will be only be processed from the given InputProcessor to the end.
@@ -78,7 +78,7 @@ public interface InputProcessorChain ext
* @throws XMLStreamException thrown when a streaming error occurs
* @throws XMLSecurityException thrown when a Security failure occurs
*/
- public InputProcessorChain createSubChain(InputProcessor inputProcessor) throws XMLStreamException, XMLSecurityException;
+ InputProcessorChain createSubChain(InputProcessor inputProcessor) throws XMLStreamException, XMLSecurityException;
/**
* Requests the next security header XMLEvent from the next processor in the chain.
@@ -87,7 +87,7 @@ public interface InputProcessorChain ext
* @throws XMLStreamException thrown when a streaming error occurs
* @throws XMLSecurityException thrown when a Security failure occurs
*/
- public XMLSecEvent processHeaderEvent() throws XMLStreamException, XMLSecurityException;
+ XMLSecEvent processHeaderEvent() throws XMLStreamException, XMLSecurityException;
/**
* Requests the next XMLEvent from the next processor in the chain.
@@ -96,5 +96,5 @@ public interface InputProcessorChain ext
* @throws XMLStreamException thrown when a streaming error occurs
* @throws XMLSecurityException thrown when a Security failure occurs
*/
- public XMLSecEvent processEvent() throws XMLStreamException, XMLSecurityException;
+ XMLSecEvent processEvent() throws XMLStreamException, XMLSecurityException;
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/OutputProcessorChain.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/OutputProcessorChain.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/OutputProcessorChain.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/OutputProcessorChain.java Thu Oct 18 12:17:41 2012
@@ -40,35 +40,35 @@ public interface OutputProcessorChain ex
*
* @param outputProcessor The OutputProcessor which should be placed in the chain
*/
- public void addProcessor(OutputProcessor outputProcessor);
+ void addProcessor(OutputProcessor outputProcessor);
/**
* Removes the specified OutputProcessor from this chain.
*
* @param outputProcessor to remove
*/
- public void removeProcessor(OutputProcessor outputProcessor);
+ void removeProcessor(OutputProcessor outputProcessor);
/**
* Returns a list with the active processors.
*
* @return List<InputProcessor>
*/
- public List<OutputProcessor> getProcessors();
+ List<OutputProcessor> getProcessors();
/**
* The actual processed document's security context
*
* @return The SecurityContext
*/
- public SecurityContext getSecurityContext();
+ SecurityContext getSecurityContext();
/**
* The actual processed document's document context
*
* @return The DocumentContext
*/
- public DocumentContext getDocumentContext();
+ DocumentContext getDocumentContext();
/**
* Create a new SubChain. The XMLEvents will be only be processed from the given OutputProcessor to the end.
@@ -79,9 +79,9 @@ public interface OutputProcessorChain ex
* @throws XMLStreamException thrown when a streaming error occurs
* @throws XMLSecurityException thrown when a Security failure occurs
*/
- public OutputProcessorChain createSubChain(OutputProcessor outputProcessor) throws XMLStreamException, XMLSecurityException;
+ OutputProcessorChain createSubChain(OutputProcessor outputProcessor) throws XMLStreamException, XMLSecurityException;
- public OutputProcessorChain createSubChain(OutputProcessor outputProcessor, XMLSecStartElement parentXMLSecStartElement) throws XMLStreamException, XMLSecurityException;
+ OutputProcessorChain createSubChain(OutputProcessor outputProcessor, XMLSecStartElement parentXMLSecStartElement) throws XMLStreamException, XMLSecurityException;
/**
* Forwards the XMLEvent to the next processor in the chain.
@@ -90,5 +90,5 @@ public interface OutputProcessorChain ex
* @throws XMLStreamException thrown when a streaming error occurs
* @throws XMLSecurityException thrown when a Security failure occurs
*/
- public void processEvent(XMLSecEvent xmlSecEvent) throws XMLStreamException, XMLSecurityException;
+ void processEvent(XMLSecEvent xmlSecEvent) throws XMLStreamException, XMLSecurityException;
}
\ No newline at end of file
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/ProcessorChain.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/ProcessorChain.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/ProcessorChain.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/ProcessorChain.java Thu Oct 18 12:17:41 2012
@@ -33,7 +33,7 @@ public interface ProcessorChain {
/**
* resets the chain so that the next event will go again to the first processor in the chain.
*/
- public void reset();
+ void reset();
/**
* Will finally be called when the whole document is processed
@@ -41,5 +41,5 @@ public interface ProcessorChain {
* @throws XMLStreamException thrown when a streaming error occurs
* @throws XMLSecurityException thrown when a Security failure occurs
*/
- public void doFinal() throws XMLStreamException, XMLSecurityException;
+ void doFinal() throws XMLStreamException, XMLSecurityException;
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/SecurityContext.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/SecurityContext.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/SecurityContext.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/SecurityContext.java Thu Oct 18 12:17:41 2012
@@ -43,7 +43,7 @@ public interface SecurityContext extends
<T> List<T> getAsList(Object key);
- public <T, U> void putAsMap(Object key, T mapKey, U mapValue);
+ <T, U> void putAsMap(Object key, T mapKey, U mapValue);
<T, U> Map<T, U> getAsMap(Object key);
@@ -68,5 +68,5 @@ public interface SecurityContext extends
*
* @param securityEventListener The SecurityEventListener
*/
- public void addSecurityEventListener(SecurityEventListener securityEventListener);
+ void addSecurityEventListener(SecurityEventListener securityEventListener);
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/SecurityTokenProvider.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/SecurityTokenProvider.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/SecurityTokenProvider.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/SecurityTokenProvider.java Thu Oct 18 12:17:41 2012
@@ -34,7 +34,7 @@ public interface SecurityTokenProvider {
* @return The SecurityToken
* @throws XMLSecurityException if the token couldn't be loaded
*/
- public <T> T getSecurityToken() throws XMLSecurityException;
+ <T> T getSecurityToken() throws XMLSecurityException;
- public String getId();
+ String getId();
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/stax/XMLSecEvent.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/stax/XMLSecEvent.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/stax/XMLSecEvent.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/ext/stax/XMLSecEvent.java Thu Oct 18 12:17:41 2012
@@ -41,11 +41,11 @@ public interface XMLSecEvent extends XML
XMLSecStartElement getStartElementAtLevel(int level);
@Override
- public XMLSecStartElement asStartElement();
+ XMLSecStartElement asStartElement();
@Override
- public XMLSecEndElement asEndElement();
+ XMLSecEndElement asEndElement();
@Override
- public XMLSecCharacters asCharacters();
+ XMLSecCharacters asCharacters();
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/DocumentContextImpl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/DocumentContextImpl.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/DocumentContextImpl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/DocumentContextImpl.java Thu Oct 18 12:17:41 2012
@@ -36,6 +36,7 @@ public class DocumentContextImpl impleme
private final Map<Integer, XMLSecurityConstants.ContentType> contentTypeMap = new TreeMap<Integer, XMLSecurityConstants.ContentType>();
private final Map<Object, Integer> processorToIndexMap = new HashMap<Object, Integer>();
+ @Override
public String getEncoding() {
return encoding;
}
@@ -44,6 +45,7 @@ public class DocumentContextImpl impleme
this.encoding = encoding;
}
+ @Override
public String getBaseURI() {
return baseURI;
}
@@ -52,30 +54,36 @@ public class DocumentContextImpl impleme
this.baseURI = baseURI;
}
+ @Override
public synchronized void setIsInEncryptedContent(int index, Object key) {
contentTypeMap.put(index, XMLSecurityConstants.ContentType.ENCRYPTION);
processorToIndexMap.put(key, index);
}
+ @Override
public synchronized void unsetIsInEncryptedContent(Object key) {
Integer index = processorToIndexMap.remove(key);
contentTypeMap.remove(index);
}
+ @Override
public boolean isInEncryptedContent() {
return contentTypeMap.containsValue(XMLSecurityConstants.ContentType.ENCRYPTION);
}
+ @Override
public synchronized void setIsInSignedContent(int index, Object key) {
contentTypeMap.put(index, XMLSecurityConstants.ContentType.SIGNATURE);
processorToIndexMap.put(key, index);
}
+ @Override
public synchronized void unsetIsInSignedContent(Object key) {
Integer index = processorToIndexMap.remove(key);
contentTypeMap.remove(index);
}
+ @Override
public boolean isInSignedContent() {
return contentTypeMap.containsValue(XMLSecurityConstants.ContentType.SIGNATURE);
}
@@ -85,6 +93,7 @@ public class DocumentContextImpl impleme
return new ArrayList<XMLSecurityConstants.ContentType>(contentTypeMap.values());
}
+ @Override
public Map<Integer, XMLSecurityConstants.ContentType> getContentTypeMap() {
return Collections.unmodifiableMap(contentTypeMap);
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/InputProcessorChainImpl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/InputProcessorChainImpl.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/InputProcessorChainImpl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/InputProcessorChainImpl.java Thu Oct 18 12:17:41 2012
@@ -66,18 +66,22 @@ public class InputProcessorChainImpl imp
this.inputProcessors = inputProcessors;
}
+ @Override
public void reset() {
this.curPos = startPos;
}
+ @Override
public SecurityContext getSecurityContext() {
return this.securityContext;
}
+ @Override
public DocumentContext getDocumentContext() {
return this.documentContext;
}
+ @Override
public synchronized void addProcessor(InputProcessor newInputProcessor) {
int startPhaseIdx = 0;
int endPhaseIdx = inputProcessors.size();
@@ -163,6 +167,7 @@ public class InputProcessorChainImpl imp
}
}
+ @Override
public synchronized void removeProcessor(InputProcessor inputProcessor) {
if (isDebugEnabled) {
log.debug("Removing processor " + inputProcessor.getClass().getName() + " from input chain");
@@ -173,22 +178,27 @@ public class InputProcessorChainImpl imp
this.inputProcessors.remove(inputProcessor);
}
+ @Override
public List<InputProcessor> getProcessors() {
return this.inputProcessors;
}
+ @Override
public XMLSecEvent processHeaderEvent() throws XMLStreamException, XMLSecurityException {
return inputProcessors.get(this.curPos++).processNextHeaderEvent(this);
}
+ @Override
public XMLSecEvent processEvent() throws XMLStreamException, XMLSecurityException {
return inputProcessors.get(this.curPos++).processNextEvent(this);
}
+ @Override
public void doFinal() throws XMLStreamException, XMLSecurityException {
inputProcessors.get(this.curPos++).doFinal(this);
}
+ @Override
public InputProcessorChain createSubChain(InputProcessor inputProcessor) throws XMLStreamException, XMLSecurityException {
InputProcessorChainImpl inputProcessorChain;
try {
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/OutputProcessorChainImpl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/OutputProcessorChainImpl.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/OutputProcessorChainImpl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/OutputProcessorChainImpl.java Thu Oct 18 12:17:41 2012
@@ -69,18 +69,22 @@ public class OutputProcessorChainImpl im
this.outputProcessors = outputProcessors;
}
+ @Override
public void reset() {
this.curPos = startPos;
}
+ @Override
public SecurityContext getSecurityContext() {
return this.securityContext;
}
+ @Override
public DocumentContext getDocumentContext() {
return this.documentContext;
}
+ @Override
public void addProcessor(OutputProcessor newOutputProcessor) {
int startPhaseIdx = 0;
int endPhaseIdx = outputProcessors.size();
@@ -169,6 +173,7 @@ public class OutputProcessorChainImpl im
}
}
+ @Override
public void removeProcessor(OutputProcessor outputProcessor) {
if (isDebugEnabled) {
log.debug("Removing processor " + outputProcessor.getClass().getName() + " from output chain");
@@ -179,6 +184,7 @@ public class OutputProcessorChainImpl im
this.outputProcessors.remove(outputProcessor);
}
+ @Override
public List<OutputProcessor> getProcessors() {
return this.outputProcessors;
}
@@ -187,6 +193,7 @@ public class OutputProcessorChainImpl im
this.parentXmlSecStartElement = xmlSecStartElement;
}
+ @Override
public void processEvent(XMLSecEvent xmlSecEvent) throws XMLStreamException, XMLSecurityException {
boolean reparent = false;
if (this.curPos == this.startPos) {
@@ -213,14 +220,17 @@ public class OutputProcessorChainImpl im
}
}
+ @Override
public void doFinal() throws XMLStreamException, XMLSecurityException {
outputProcessors.get(this.curPos++).doFinal(this);
}
+ @Override
public OutputProcessorChain createSubChain(OutputProcessor outputProcessor) throws XMLStreamException, XMLSecurityException {
return createSubChain(outputProcessor, null);
}
+ @Override
public OutputProcessorChain createSubChain(OutputProcessor outputProcessor, XMLSecStartElement parentXMLSecStartElement) throws XMLStreamException, XMLSecurityException {
//we don't clone the processor-list to get updates in the sublist too!
OutputProcessorChainImpl outputProcessorChain;
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/SecurityContextImpl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/SecurityContextImpl.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/SecurityContextImpl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/SecurityContextImpl.java Thu Oct 18 12:17:41 2012
@@ -44,12 +44,14 @@ public class SecurityContextImpl impleme
private final Map content = Collections.synchronizedMap(new HashMap());
private final List<SecurityEventListener> securityEventListeners = new ArrayList<SecurityEventListener>(2);
+ @Override
public void addSecurityEventListener(SecurityEventListener securityEventListener) {
if (securityEventListener != null) {
this.securityEventListeners.add(securityEventListener);
}
}
+ @Override
public synchronized void registerSecurityEvent(SecurityEvent securityEvent) throws XMLSecurityException {
forwardSecurityEvent(securityEvent);
}
@@ -69,21 +71,25 @@ public class SecurityContextImpl impleme
}
@SuppressWarnings("unchecked")
+ @Override
public <T> void put(String key, T value) {
content.put(key, value);
}
@SuppressWarnings("unchecked")
+ @Override
public <T> T get(String key) {
return (T) content.get(key);
}
@SuppressWarnings("unchecked")
+ @Override
public <T> T remove(String key) {
return (T) content.remove(key);
}
@SuppressWarnings("unchecked")
+ @Override
public <T extends List> void putList(Object key, T value) {
if (value == null) {
return;
@@ -97,6 +103,7 @@ public class SecurityContextImpl impleme
}
@SuppressWarnings("unchecked")
+ @Override
public <T> void putAsList(Object key, T value) {
List<T> entry = (List<T>) content.get(key);
if (entry == null) {
@@ -107,11 +114,13 @@ public class SecurityContextImpl impleme
}
@SuppressWarnings("unchecked")
+ @Override
public <T> List<T> getAsList(Object key) {
return (List<T>) content.get(key);
}
@SuppressWarnings("unchecked")
+ @Override
public <T, U> void putAsMap(Object key, T mapKey, U mapValue) {
Map<T, U> entry = (Map<T, U>) content.get(key);
if (entry == null) {
@@ -122,10 +131,12 @@ public class SecurityContextImpl impleme
}
@SuppressWarnings("unchecked")
+ @Override
public <T, U> Map<T, U> getAsMap(Object key) {
return (Map<T, U>) content.get(key);
}
+ @Override
public void registerSecurityTokenProvider(String id, SecurityTokenProvider securityTokenProvider) {
if (id == null) {
throw new IllegalArgumentException("Id must not be null");
@@ -133,6 +144,7 @@ public class SecurityContextImpl impleme
securityTokenProviders.put(id, securityTokenProvider);
}
+ @Override
public SecurityTokenProvider getSecurityTokenProvider(String id) {
return securityTokenProviders.get(id);
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityEventWriter.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityEventWriter.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityEventWriter.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityEventWriter.java Thu Oct 18 12:17:41 2012
@@ -38,6 +38,7 @@ public class XMLSecurityEventWriter impl
this.xmlStreamWriter = xmlStreamWriter;
}
+ @Override
public void add(XMLEvent event) throws XMLStreamException {
if (!(event instanceof XMLSecEvent)) {
throw new IllegalArgumentException("XMLEvent must be an instance of XMLSecEvent");
@@ -130,36 +131,44 @@ public class XMLSecurityEventWriter impl
}
}
+ @Override
public void add(XMLEventReader reader) throws XMLStreamException {
while (reader.hasNext()) {
add(reader.nextEvent());
}
}
+ @Override
public void close() throws XMLStreamException {
this.xmlStreamWriter.close();
}
+ @Override
public void flush() throws XMLStreamException {
this.xmlStreamWriter.flush();
}
+ @Override
public NamespaceContext getNamespaceContext() {
return this.xmlStreamWriter.getNamespaceContext();
}
+ @Override
public String getPrefix(String uri) throws XMLStreamException {
return this.xmlStreamWriter.getPrefix(uri);
}
+ @Override
public void setDefaultNamespace(String uri) throws XMLStreamException {
this.xmlStreamWriter.setDefaultNamespace(uri);
}
+ @Override
public void setNamespaceContext(NamespaceContext namespaceContext) throws XMLStreamException {
this.xmlStreamWriter.setNamespaceContext(namespaceContext);
}
+ @Override
public void setPrefix(String prefix, String uri) throws XMLStreamException {
this.xmlStreamWriter.setPrefix(prefix, uri);
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamReader.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamReader.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamReader.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamReader.java Thu Oct 18 12:17:41 2012
@@ -51,6 +51,7 @@ public class XMLSecurityStreamReader imp
this.skipDocumentEvents = securityProperties.isSkipDocumentEvents();
}
+ @Override
public Object getProperty(String name) throws IllegalArgumentException {
if (XMLInputFactory.IS_NAMESPACE_AWARE.equals(name)) {
return true;
@@ -58,6 +59,7 @@ public class XMLSecurityStreamReader imp
return null;
}
+ @Override
public int next() throws XMLStreamException {
int eventType;
try {
@@ -78,6 +80,7 @@ public class XMLSecurityStreamReader imp
return currentXMLSecEvent;
}
+ @Override
public void require(int type, String namespaceURI, String localName) throws XMLStreamException {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != type) {
@@ -113,6 +116,7 @@ public class XMLSecurityStreamReader imp
}
}
+ @Override
public String getElementText() throws XMLStreamException {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != START_ELEMENT) {
@@ -144,6 +148,7 @@ public class XMLSecurityStreamReader imp
return stringBuilder.toString();
}
+ @Override
public int nextTag() throws XMLStreamException {
while (true) {
int next = next();
@@ -168,10 +173,12 @@ public class XMLSecurityStreamReader imp
}
}
+ @Override
public boolean hasNext() throws XMLStreamException {
return currentXMLSecEvent == null || currentXMLSecEvent.getEventType() != END_DOCUMENT;
}
+ @Override
public void close() throws XMLStreamException {
try {
inputProcessorChain.reset();
@@ -181,6 +188,7 @@ public class XMLSecurityStreamReader imp
}
}
+ @Override
public String getNamespaceURI(String prefix) {
XMLSecEvent xmlSecEvent = getCurrentEvent();
switch (xmlSecEvent.getEventType()) {
@@ -201,23 +209,28 @@ public class XMLSecurityStreamReader imp
}
}
+ @Override
public boolean isStartElement() {
return getCurrentEvent().isStartElement();
}
+ @Override
public boolean isEndElement() {
return getCurrentEvent().isEndElement();
}
+ @Override
public boolean isCharacters() {
return getCurrentEvent().isCharacters();
}
+ @Override
public boolean isWhiteSpace() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
return xmlSecEvent.isCharacters() && xmlSecEvent.asCharacters().isWhiteSpace();
}
+ @Override
public String getAttributeValue(String namespaceURI, String localName) {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != START_ELEMENT) {
@@ -230,6 +243,7 @@ public class XMLSecurityStreamReader imp
return null;
}
+ @Override
public int getAttributeCount() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != START_ELEMENT) {
@@ -238,6 +252,7 @@ public class XMLSecurityStreamReader imp
return xmlSecEvent.asStartElement().getOnElementDeclaredAttributes().size();
}
+ @Override
public QName getAttributeName(int index) {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != START_ELEMENT) {
@@ -246,6 +261,7 @@ public class XMLSecurityStreamReader imp
return xmlSecEvent.asStartElement().getOnElementDeclaredAttributes().get(index).getName();
}
+ @Override
public String getAttributeNamespace(int index) {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != START_ELEMENT) {
@@ -254,6 +270,7 @@ public class XMLSecurityStreamReader imp
return xmlSecEvent.asStartElement().getOnElementDeclaredAttributes().get(index).getAttributeNamespace().getNamespaceURI();
}
+ @Override
public String getAttributeLocalName(int index) {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != START_ELEMENT) {
@@ -262,6 +279,7 @@ public class XMLSecurityStreamReader imp
return xmlSecEvent.asStartElement().getOnElementDeclaredAttributes().get(index).getName().getLocalPart();
}
+ @Override
public String getAttributePrefix(int index) {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != START_ELEMENT) {
@@ -270,6 +288,7 @@ public class XMLSecurityStreamReader imp
return xmlSecEvent.asStartElement().getOnElementDeclaredAttributes().get(index).getName().getPrefix();
}
+ @Override
public String getAttributeType(int index) {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != START_ELEMENT) {
@@ -278,6 +297,7 @@ public class XMLSecurityStreamReader imp
return xmlSecEvent.asStartElement().getOnElementDeclaredAttributes().get(index).getDTDType();
}
+ @Override
public String getAttributeValue(int index) {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != START_ELEMENT) {
@@ -286,6 +306,7 @@ public class XMLSecurityStreamReader imp
return xmlSecEvent.asStartElement().getOnElementDeclaredAttributes().get(index).getValue();
}
+ @Override
public boolean isAttributeSpecified(int index) {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != START_ELEMENT) {
@@ -295,6 +316,7 @@ public class XMLSecurityStreamReader imp
}
@SuppressWarnings("unchecked")
+ @Override
public int getNamespaceCount() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
switch (xmlSecEvent.getEventType()) {
@@ -314,6 +336,7 @@ public class XMLSecurityStreamReader imp
}
@SuppressWarnings("unchecked")
+ @Override
public String getNamespacePrefix(int index) {
XMLSecEvent xmlSecEvent = getCurrentEvent();
switch (xmlSecEvent.getEventType()) {
@@ -335,6 +358,7 @@ public class XMLSecurityStreamReader imp
}
}
+ @Override
public String getNamespaceURI(int index) {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != START_ELEMENT) {
@@ -343,6 +367,7 @@ public class XMLSecurityStreamReader imp
return xmlSecEvent.asStartElement().getOnElementDeclaredNamespaces().get(index).getNamespaceURI();
}
+ @Override
public NamespaceContext getNamespaceContext() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != START_ELEMENT) {
@@ -351,6 +376,7 @@ public class XMLSecurityStreamReader imp
return xmlSecEvent.asStartElement().getNamespaceContext();
}
+ @Override
public int getEventType() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent == null) {
@@ -366,6 +392,7 @@ public class XMLSecurityStreamReader imp
return xmlSecEvent.getEventType();
}
+ @Override
public String getText() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
@@ -385,6 +412,7 @@ public class XMLSecurityStreamReader imp
}
}
+ @Override
public char[] getTextCharacters() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
switch (xmlSecEvent.getEventType()) {
@@ -403,6 +431,7 @@ public class XMLSecurityStreamReader imp
}
}
+ @Override
public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException {
XMLSecEvent xmlSecEvent = getCurrentEvent();
switch (xmlSecEvent.getEventType()) {
@@ -425,10 +454,12 @@ public class XMLSecurityStreamReader imp
}
}
+ @Override
public int getTextStart() {
return 0;
}
+ @Override
public int getTextLength() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
switch (xmlSecEvent.getEventType()) {
@@ -447,43 +478,52 @@ public class XMLSecurityStreamReader imp
}
}
+ @Override
public String getEncoding() {
return inputProcessorChain.getDocumentContext().getEncoding();
}
- final private static int MASK_GET_TEXT =
+ private static final int MASK_GET_TEXT =
(1 << CHARACTERS) | (1 << CDATA) | (1 << SPACE)
| (1 << COMMENT) | (1 << DTD) | (1 << ENTITY_REFERENCE);
+ @Override
public boolean hasText() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
return (((1 << xmlSecEvent.getEventType()) & MASK_GET_TEXT) != 0);
}
+ @Override
public Location getLocation() {
return new Location() {
+ @Override
public int getLineNumber() {
return -1;
}
+ @Override
public int getColumnNumber() {
return -1;
}
+ @Override
public int getCharacterOffset() {
return -1;
}
+ @Override
public String getPublicId() {
return null;
}
+ @Override
public String getSystemId() {
return null;
}
};
}
+ @Override
public QName getName() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
switch (xmlSecEvent.getEventType()) {
@@ -496,6 +536,7 @@ public class XMLSecurityStreamReader imp
}
}
+ @Override
public String getLocalName() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
switch (xmlSecEvent.getEventType()) {
@@ -508,11 +549,13 @@ public class XMLSecurityStreamReader imp
}
}
+ @Override
public boolean hasName() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
return xmlSecEvent.getEventType() == START_ELEMENT || xmlSecEvent.getEventType() == END_ELEMENT;
}
+ @Override
public String getNamespaceURI() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
switch (xmlSecEvent.getEventType()) {
@@ -525,6 +568,7 @@ public class XMLSecurityStreamReader imp
}
}
+ @Override
public String getPrefix() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
switch (xmlSecEvent.getEventType()) {
@@ -537,22 +581,27 @@ public class XMLSecurityStreamReader imp
}
}
+ @Override
public String getVersion() {
return null;
}
+ @Override
public boolean isStandalone() {
return false;
}
+ @Override
public boolean standaloneSet() {
return false;
}
+ @Override
public String getCharacterEncodingScheme() {
return null;
}
+ @Override
public String getPITarget() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != PROCESSING_INSTRUCTION) {
@@ -561,6 +610,7 @@ public class XMLSecurityStreamReader imp
return ((ProcessingInstruction) xmlSecEvent).getTarget();
}
+ @Override
public String getPIData() {
XMLSecEvent xmlSecEvent = getCurrentEvent();
if (xmlSecEvent.getEventType() != PROCESSING_INSTRUCTION) {
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamWriter.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamWriter.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamWriter.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/XMLSecurityStreamWriter.java Thu Oct 18 12:17:41 2012
@@ -164,6 +164,7 @@ public class XMLSecurityStreamWriter imp
nsStack.push(Collections.<String, XMLSecNamespace>emptyMap());
}
+ @Override
public void writeStartElement(String localName) throws XMLStreamException {
outputOpenStartElement();
QName qName = new QName(localName);
@@ -171,6 +172,7 @@ public class XMLSecurityStreamWriter imp
openStartElement = qName;
}
+ @Override
public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException {
outputOpenStartElement();
String prefix = getNamespaceContext().getPrefix(namespaceURI);
@@ -184,6 +186,7 @@ public class XMLSecurityStreamWriter imp
openStartElement = qName;
}
+ @Override
public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
outputOpenStartElement();
QName qName = new QName(namespaceURI, localName, prefix);
@@ -191,21 +194,25 @@ public class XMLSecurityStreamWriter imp
openStartElement = qName;
}
+ @Override
public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException {
writeStartElement(namespaceURI, localName);
haveToWriteEndElement = true;
}
+ @Override
public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
writeStartElement(prefix, localName, namespaceURI);
haveToWriteEndElement = true;
}
+ @Override
public void writeEmptyElement(String localName) throws XMLStreamException {
writeStartElement(localName);
haveToWriteEndElement = true;
}
+ @Override
public void writeEndElement() throws XMLStreamException {
outputOpenStartElement();
QName element = startElementStack.pop();
@@ -214,6 +221,7 @@ public class XMLSecurityStreamWriter imp
}
+ @Override
public void writeEndDocument() throws XMLStreamException {
if (!endDocumentWritten) {
outputOpenStartElement();
@@ -227,6 +235,7 @@ public class XMLSecurityStreamWriter imp
}
}
+ @Override
public void close() throws XMLStreamException {
try {
writeEndDocument();
@@ -237,25 +246,31 @@ public class XMLSecurityStreamWriter imp
}
}
+ @Override
public void flush() throws XMLStreamException {
}
+ @Override
public void writeAttribute(String localName, String value) throws XMLStreamException {
currentAttributes.add(XMLSecEventFactory.createXMLSecAttribute(new QName(localName), value));
}
+ @Override
public void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException {
currentAttributes.add(XMLSecEventFactory.createXMLSecAttribute(new QName(namespaceURI, localName, prefix), value));
}
+ @Override
public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException {
currentAttributes.add(XMLSecEventFactory.createXMLSecAttribute(new QName(namespaceURI, localName, getNamespaceContext().getPrefix(namespaceURI)), value));
}
+ @Override
public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException {
putNamespaceOntoStack(prefix, XMLSecEventFactory.createXMLSecNamespace(prefix, namespaceURI));
}
+ @Override
public void writeDefaultNamespace(String namespaceURI) throws XMLStreamException {
//workaround for sun's stax parser:
if (this.openStartElement != null && this.openStartElement.getPrefix().equals("")) {
@@ -265,31 +280,37 @@ public class XMLSecurityStreamWriter imp
}
+ @Override
public void writeComment(String data) throws XMLStreamException {
outputOpenStartElement();
chainProcessEvent(XMLSecEventFactory.createXMLSecComment(data));
}
+ @Override
public void writeProcessingInstruction(String target) throws XMLStreamException {
outputOpenStartElement();
chainProcessEvent(XMLSecEventFactory.createXMLSecProcessingInstruction(target, ""));
}
+ @Override
public void writeProcessingInstruction(String target, String data) throws XMLStreamException {
outputOpenStartElement();
chainProcessEvent(XMLSecEventFactory.createXMLSecProcessingInstruction(target, data));
}
+ @Override
public void writeCData(String data) throws XMLStreamException {
outputOpenStartElement();
chainProcessEvent(XMLSecEventFactory.createXMLSecCData(data));
}
+ @Override
public void writeDTD(String dtd) throws XMLStreamException {
outputOpenStartElement();
chainProcessEvent(XMLSecEventFactory.createXMLSecDTD(dtd));
}
+ @Override
public void writeEntityRef(final String name) throws XMLStreamException {
outputOpenStartElement();
chainProcessEvent(
@@ -300,32 +321,39 @@ public class XMLSecurityStreamWriter imp
);
}
+ @Override
public void writeStartDocument() throws XMLStreamException {
chainProcessEvent(XMLSecEventFactory.createXmlSecStartDocument(null, null, null, null));
}
+ @Override
public void writeStartDocument(String version) throws XMLStreamException {
chainProcessEvent(XMLSecEventFactory.createXmlSecStartDocument(null, null, null, version));
}
+ @Override
public void writeStartDocument(String encoding, String version) throws XMLStreamException {
chainProcessEvent(XMLSecEventFactory.createXmlSecStartDocument(null, encoding, null, version));
}
+ @Override
public void writeCharacters(String text) throws XMLStreamException {
outputOpenStartElement();
chainProcessEvent(XMLSecEventFactory.createXmlSecCharacters(text));
}
+ @Override
public void writeCharacters(char[] text, int start, int len) throws XMLStreamException {
outputOpenStartElement();
chainProcessEvent(XMLSecEventFactory.createXmlSecCharacters(text, start, len));
}
+ @Override
public String getPrefix(String uri) throws XMLStreamException {
return defaultNamespaceContext.getPrefix(uri);
}
+ @Override
public void setPrefix(String prefix, String uri) throws XMLStreamException {
putNamespaceOntoStack(prefix, XMLSecEventFactory.createXMLSecNamespace(prefix, uri));
if (openStartElement != null && openStartElement.getNamespaceURI().equals(uri)) {
@@ -333,10 +361,12 @@ public class XMLSecurityStreamWriter imp
}
}
+ @Override
public void setDefaultNamespace(String uri) throws XMLStreamException {
putNamespaceOntoStack("", XMLSecEventFactory.createXMLSecNamespace("", uri));
}
+ @Override
public void setNamespaceContext(NamespaceContext context) throws XMLStreamException {
if (context == null) {
throw new NullPointerException("context must not be null");
@@ -344,10 +374,12 @@ public class XMLSecurityStreamWriter imp
this.namespaceContext = context;
}
+ @Override
public NamespaceContext getNamespaceContext() {
return defaultNamespaceContext;
}
+ @Override
public Object getProperty(String name) throws IllegalArgumentException {
throw new IllegalArgumentException("Properties not supported");
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/HMACSignatureAlgorithm.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/HMACSignatureAlgorithm.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/HMACSignatureAlgorithm.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/HMACSignatureAlgorithm.java Thu Oct 18 12:17:41 2012
@@ -41,18 +41,22 @@ public class HMACSignatureAlgorithm impl
}
}
+ @Override
public void engineUpdate(byte[] input) throws XMLSecurityException {
mac.update(input);
}
+ @Override
public void engineUpdate(byte input) throws XMLSecurityException {
mac.update(input);
}
+ @Override
public void engineUpdate(byte[] buf, int offset, int len) throws XMLSecurityException {
mac.update(buf, offset, len);
}
+ @Override
public void engineInitSign(Key signingKey) throws XMLSecurityException {
try {
mac.init(signingKey);
@@ -61,6 +65,7 @@ public class HMACSignatureAlgorithm impl
}
}
+ @Override
public void engineInitSign(Key signingKey, SecureRandom secureRandom) throws XMLSecurityException {
try {
mac.init(signingKey);
@@ -69,6 +74,7 @@ public class HMACSignatureAlgorithm impl
}
}
+ @Override
public void engineInitSign(Key signingKey, AlgorithmParameterSpec algorithmParameterSpec) throws XMLSecurityException {
try {
mac.init(signingKey, algorithmParameterSpec);
@@ -79,10 +85,12 @@ public class HMACSignatureAlgorithm impl
}
}
+ @Override
public byte[] engineSign() throws XMLSecurityException {
return mac.doFinal();
}
+ @Override
public void engineInitVerify(Key verificationKey) throws XMLSecurityException {
try {
mac.init(verificationKey);
@@ -91,11 +99,13 @@ public class HMACSignatureAlgorithm impl
}
}
+ @Override
public boolean engineVerify(byte[] signature) throws XMLSecurityException {
byte[] completeResult = mac.doFinal();
return MessageDigest.isEqual(completeResult, signature);
}
+ @Override
public void engineSetParameter(AlgorithmParameterSpec params) throws XMLSecurityException {
}
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/PKISignatureAlgorithm.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/PKISignatureAlgorithm.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/PKISignatureAlgorithm.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/algorithms/PKISignatureAlgorithm.java Thu Oct 18 12:17:41 2012
@@ -43,6 +43,7 @@ public class PKISignatureAlgorithm imple
}
}
+ @Override
public void engineUpdate(byte[] input) throws XMLSecurityException {
try {
signature.update(input);
@@ -51,6 +52,7 @@ public class PKISignatureAlgorithm imple
}
}
+ @Override
public void engineUpdate(byte input) throws XMLSecurityException {
try {
signature.update(input);
@@ -59,6 +61,7 @@ public class PKISignatureAlgorithm imple
}
}
+ @Override
public void engineUpdate(byte[] buf, int offset, int len) throws XMLSecurityException {
try {
signature.update(buf, offset, len);
@@ -67,6 +70,7 @@ public class PKISignatureAlgorithm imple
}
}
+ @Override
public void engineInitSign(Key signingKey) throws XMLSecurityException {
try {
signature.initSign((PrivateKey) signingKey);
@@ -75,6 +79,7 @@ public class PKISignatureAlgorithm imple
}
}
+ @Override
public void engineInitSign(Key signingKey, SecureRandom secureRandom) throws XMLSecurityException {
try {
signature.initSign((PrivateKey) signingKey, secureRandom);
@@ -83,6 +88,7 @@ public class PKISignatureAlgorithm imple
}
}
+ @Override
public void engineInitSign(Key signingKey, AlgorithmParameterSpec algorithmParameterSpec) throws XMLSecurityException {
try {
signature.initSign((PrivateKey) signingKey);
@@ -91,6 +97,7 @@ public class PKISignatureAlgorithm imple
}
}
+ @Override
public byte[] engineSign() throws XMLSecurityException {
try {
byte[] jcebytes = signature.sign();
@@ -107,6 +114,7 @@ public class PKISignatureAlgorithm imple
}
}
+ @Override
public void engineInitVerify(Key verificationKey) throws XMLSecurityException {
try {
signature.initVerify((PublicKey) verificationKey);
@@ -115,6 +123,7 @@ public class PKISignatureAlgorithm imple
}
}
+ @Override
public boolean engineVerify(byte[] signature) throws XMLSecurityException {
try {
byte[] jcebytes = signature;
@@ -131,6 +140,7 @@ public class PKISignatureAlgorithm imple
}
}
+ @Override
public void engineSetParameter(AlgorithmParameterSpec params) throws XMLSecurityException {
try {
signature.setParameter(params);
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractDecryptInputProcessor.java Thu Oct 18 12:17:41 2012
@@ -668,6 +668,7 @@ public abstract class AbstractDecryptInp
private volatile Throwable thrownException;
+ @Override
public void uncaughtException(Thread t, Throwable e) {
this.thrownException = e;
}
@@ -724,6 +725,7 @@ public abstract class AbstractDecryptInp
}
}
+ @Override
public void run() {
try {
@@ -769,7 +771,7 @@ public abstract class AbstractDecryptInp
//we have to close the pipe when an exception occurs. Otherwise we can run into a deadlock when an exception occurs
//before we have written any byte to the pipe.
this.pipedOutputStream.close();
- } catch (IOException e1) {
+ } catch (IOException e1) { //NOPMD
//ignore since we will throw the original exception below
}
throw new UncheckedXMLSecurityException(e);
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLEncryptedKeyInputHandler.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLEncryptedKeyInputHandler.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLEncryptedKeyInputHandler.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLEncryptedKeyInputHandler.java Thu Oct 18 12:17:41 2012
@@ -78,13 +78,14 @@ public class XMLEncryptedKeyInputHandler
encryptedKeyType.setId(IDGenerator.generateID(null));
}
- final SecurityContext securityContext = (SecurityContext) inputProcessorChain.getSecurityContext();
+ final SecurityContext securityContext = inputProcessorChain.getSecurityContext();
final SecurityTokenProvider securityTokenProvider = new SecurityTokenProvider() {
private AbstractInboundSecurityToken securityToken = null;
@SuppressWarnings("unchecked")
+ @Override
public SecurityToken getSecurityToken() throws XMLSecurityException {
if (this.securityToken != null) {
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLSignatureInputHandler.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLSignatureInputHandler.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLSignatureInputHandler.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/XMLSignatureInputHandler.java Thu Oct 18 12:17:41 2012
@@ -105,7 +105,8 @@ public class XMLSignatureInputHandler ex
XMLSecurityProperties securityProperties) throws XMLSecurityException {
super(signatureType, securityContext, securityProperties);
}
-
+
+ @Override
protected SecurityToken retrieveSecurityToken(KeyInfoType keyInfoType,
XMLSecurityProperties securityProperties,
SecurityContext securityContext) throws XMLSecurityException {
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureEndingOutputProcessor.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureEndingOutputProcessor.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureEndingOutputProcessor.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/output/AbstractSignatureEndingOutputProcessor.java Thu Oct 18 12:17:41 2012
@@ -91,6 +91,7 @@ public abstract class AbstractSignatureE
</ds:Signature>
*/
+ @Override
public void processHeaderEvent(OutputProcessorChain outputProcessorChain) throws XMLStreamException, XMLSecurityException {
OutputProcessorChain subOutputProcessorChain = outputProcessorChain.createSubChain(this);
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/securityToken/AbstractInboundSecurityToken.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/securityToken/AbstractInboundSecurityToken.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/securityToken/AbstractInboundSecurityToken.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/securityToken/AbstractInboundSecurityToken.java Thu Oct 18 12:17:41 2012
@@ -79,6 +79,7 @@ public abstract class AbstractInboundSec
return keyIdentifierType;
}
+ @Override
public String getId() {
return this.id;
}
@@ -219,10 +220,12 @@ public abstract class AbstractInboundSec
this.x509Certificates = x509Certificates;
}
+ @Override
public X509Certificate[] getX509Certificates() throws XMLSecurityException {
return x509Certificates;
}
+ @Override
public void verify() throws XMLSecurityException {
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecAttributeImpl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecAttributeImpl.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecAttributeImpl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecAttributeImpl.java Thu Oct 18 12:17:41 2012
@@ -41,6 +41,7 @@ public class XMLSecAttributeImpl extends
this.value = value;
}
+ @Override
public int compareTo(XMLSecAttribute o) {
//An element's attribute nodes are sorted lexicographically with namespace URI as the primary
//key and local name as the secondary key (an empty namespace URI is lexicographically least).
@@ -78,18 +79,22 @@ public class XMLSecAttributeImpl extends
return this.attributeNamespace;
}
+ @Override
public QName getName() {
return name;
}
+ @Override
public String getValue() {
return value;
}
+ @Override
public String getDTDType() {
return "CDATA";
}
+ @Override
public boolean isSpecified() {
return true;
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecCharactersImpl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecCharactersImpl.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecCharactersImpl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecCharactersImpl.java Thu Oct 18 12:17:41 2012
@@ -59,6 +59,7 @@ public class XMLSecCharactersImpl extend
return data;
}
+ @Override
public char[] getText() {
if (text == null) {
text = data.toCharArray();
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java Thu Oct 18 12:17:41 2012
@@ -73,6 +73,7 @@ public class XMLSecNamespaceImpl extends
}
}
+ @Override
public int compareTo(XMLSecNamespace o) {
//An element's namespace nodes are sorted lexicographically by local name
//(the default namespace node, if one exists, has no local name and is therefore lexicographically least).
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecStartElementImpl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecStartElementImpl.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecStartElementImpl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecStartElementImpl.java Thu Oct 18 12:17:41 2012
@@ -101,15 +101,18 @@ public class XMLSecStartElementImpl exte
this.attributes.add(xmlSecAttribute);
}
+ @Override
public int getDocumentLevel() {
return super.getDocumentLevel() + 1;
}
+ @Override
public void getElementPath(List<QName> list) {
super.getElementPath(list);
list.add(this.getName());
}
+ @Override
public XMLSecStartElement getStartElementAtLevel(int level) {
int thisLevel = getDocumentLevel();
if (thisLevel < level) {
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/ConcreteLSInput.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/ConcreteLSInput.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/ConcreteLSInput.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/ConcreteLSInput.java Thu Oct 18 12:17:41 2012
@@ -38,66 +38,82 @@ public class ConcreteLSInput implements
private String encoding;
private boolean certifiedText;
+ @Override
public Reader getCharacterStream() {
return this.reader;
}
+ @Override
public void setCharacterStream(Reader characterStream) {
this.reader = characterStream;
}
+ @Override
public InputStream getByteStream() {
return this.inputStream;
}
+ @Override
public void setByteStream(InputStream byteStream) {
this.inputStream = byteStream;
}
+ @Override
public String getStringData() {
return this.stringData;
}
+ @Override
public void setStringData(String stringData) {
this.stringData = stringData;
}
+ @Override
public String getSystemId() {
return this.systemId;
}
+ @Override
public void setSystemId(String systemId) {
this.systemId = systemId;
}
+ @Override
public String getPublicId() {
return this.publicId;
}
+ @Override
public void setPublicId(String publicId) {
this.publicId = publicId;
}
+ @Override
public String getBaseURI() {
return this.baseURI;
}
+ @Override
public void setBaseURI(String baseURI) {
this.baseURI = baseURI;
}
+ @Override
public String getEncoding() {
return this.encoding;
}
+ @Override
public void setEncoding(String encoding) {
this.encoding = encoding;
}
+ @Override
public boolean getCertifiedText() {
return this.certifiedText;
}
+ @Override
public void setCertifiedText(boolean certifiedText) {
this.certifiedText = certifiedText;
}
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/DigestOutputStream.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/DigestOutputStream.java?rev=1399606&r1=1399605&r2=1399606&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/DigestOutputStream.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/util/DigestOutputStream.java Thu Oct 18 12:17:41 2012
@@ -45,10 +45,12 @@ public class DigestOutputStream extends
}
}
+ @Override
public void write(byte[] arg0) {
write(arg0, 0, arg0.length);
}
+ @Override
public void write(int arg0) {
messageDigest.update((byte) arg0);
if (isDebugEnabled) {
@@ -56,6 +58,7 @@ public class DigestOutputStream extends
}
}
+ @Override
public void write(byte[] arg0, int arg1, int arg2) {
messageDigest.update(arg0, arg1, arg2);
if (isDebugEnabled) {