INT-3262 JDK8 Javadoc Commit
Increase receive timeout for `Jsr223TransformerTests#testInt3162ScriptExecutorThreadSafety`. JIRA: https://jira.springsource.org/browse/INT-3262 JIRA: https://jira.springsource.org/browse/INT-3263
This commit is contained in:
committed by
Artem Bilan
parent
66efb34342
commit
c45b708341
@@ -45,6 +45,7 @@ public class AggregatedXmlMessageValidationException extends RuntimeException {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The exception iterator.
|
||||
* @deprecated in favor of #getExceptions
|
||||
*/
|
||||
@Deprecated
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,20 +21,21 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.messaging.Message;
|
||||
import org.w3c.dom.DOMException;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import org.springframework.integration.router.AbstractMappingMessageRouter;
|
||||
import org.springframework.integration.xml.DefaultXmlPayloadConverter;
|
||||
import org.springframework.integration.xml.XmlPayloadConverter;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.xml.xpath.NodeMapper;
|
||||
import org.springframework.xml.xpath.XPathExpression;
|
||||
import org.springframework.xml.xpath.XPathExpressionFactory;
|
||||
import org.w3c.dom.DOMException;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
/**
|
||||
* Message Router that uses {@link XPathExpression} evaluation to determine channel names.
|
||||
*
|
||||
*
|
||||
* @author Jonas Partner
|
||||
* @author Oleg Zhurakousky
|
||||
*/
|
||||
@@ -45,13 +46,13 @@ public class XPathRouter extends AbstractMappingMessageRouter {
|
||||
private final XPathExpression xPathExpression;
|
||||
|
||||
private volatile XmlPayloadConverter converter = new DefaultXmlPayloadConverter();
|
||||
|
||||
|
||||
private volatile boolean evaluateAsString = false;
|
||||
|
||||
/**
|
||||
* Create a router that uses an XPath expression. The expression may
|
||||
* contain zero or more namespace prefixes.
|
||||
*
|
||||
*
|
||||
* @param expression the XPath expression as a String
|
||||
* @param namespaces map of namespaces with prefixes as the map keys
|
||||
*/
|
||||
@@ -63,7 +64,7 @@ public class XPathRouter extends AbstractMappingMessageRouter {
|
||||
/**
|
||||
* Create a router uses an XPath expression with one namespace. For example,
|
||||
* expression='/ns1:one/@type' prefix='ns1' namespace='www.example.org'
|
||||
*
|
||||
*
|
||||
* @param expression the XPath expression as a String
|
||||
* @param prefix namespace prefix
|
||||
* @param namespace namespace uri
|
||||
@@ -78,7 +79,7 @@ public class XPathRouter extends AbstractMappingMessageRouter {
|
||||
/**
|
||||
* Create a router that uses an XPath expression with no namespaces.
|
||||
* For example '/one/@type'
|
||||
*
|
||||
*
|
||||
* @param expression the XPath expression as a String
|
||||
*/
|
||||
public XPathRouter(String expression) {
|
||||
@@ -88,7 +89,7 @@ public class XPathRouter extends AbstractMappingMessageRouter {
|
||||
|
||||
/**
|
||||
* Create a router that uses the provided XPath expression.
|
||||
*
|
||||
*
|
||||
* @param expression the XPath expression
|
||||
*/
|
||||
public XPathRouter(XPathExpression expression) {
|
||||
@@ -102,12 +103,15 @@ public class XPathRouter extends AbstractMappingMessageRouter {
|
||||
|
||||
/**
|
||||
* Specify the Converter to use when converting payloads prior to XPath evaluation.
|
||||
*
|
||||
* @param converter The payload converter.
|
||||
*/
|
||||
public void setConverter(XmlPayloadConverter converter) {
|
||||
Assert.notNull(converter, "converter must not be null");
|
||||
this.converter = converter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getComponentType() {
|
||||
return "xml:xpath-router";
|
||||
}
|
||||
@@ -126,6 +130,7 @@ public class XPathRouter extends AbstractMappingMessageRouter {
|
||||
|
||||
private static class TextContentNodeMapper implements NodeMapper<Object> {
|
||||
|
||||
@Override
|
||||
public Object mapNode(Node node, int nodeNum) throws DOMException {
|
||||
return node.getTextContent();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,7 +27,7 @@ import org.springframework.xml.xpath.XPathExpressionFactory;
|
||||
|
||||
/**
|
||||
* Base class for XPath {@link MessageSelector} implementations.
|
||||
*
|
||||
*
|
||||
* @author Jonas Partner
|
||||
*/
|
||||
public abstract class AbstractXPathMessageSelector implements MessageSelector {
|
||||
@@ -73,6 +73,8 @@ public abstract class AbstractXPathMessageSelector implements MessageSelector {
|
||||
|
||||
/**
|
||||
* Specify the converter used to convert payloads prior to XPath testing.
|
||||
*
|
||||
* @param converter The payload converter.
|
||||
*/
|
||||
public void setConverter(XmlPayloadConverter converter) {
|
||||
this.converter = converter;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,14 +21,14 @@ import java.util.Map;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.integration.core.MessageSelector;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.xml.xpath.XPathExpression;
|
||||
|
||||
/**
|
||||
* XPath {@link MessageSelector} that tests if a provided value supports
|
||||
* payloads of type {@link Document} or {@link String}.
|
||||
*
|
||||
*
|
||||
* @author Jonas Partner
|
||||
*/
|
||||
public class StringValueTestXPathMessageSelector extends AbstractXPathMessageSelector {
|
||||
@@ -40,7 +40,7 @@ public class StringValueTestXPathMessageSelector extends AbstractXPathMessageSel
|
||||
|
||||
/**
|
||||
* Create a selector which tests for the given value and supports multiple namespaces.
|
||||
*
|
||||
*
|
||||
* @param expression XPath expression as a String
|
||||
* @param namespaces Map of namespaces where the keys are namespace prefixes
|
||||
* @param valueToTestFor value to test for
|
||||
@@ -52,7 +52,7 @@ public class StringValueTestXPathMessageSelector extends AbstractXPathMessageSel
|
||||
|
||||
/**
|
||||
* Creates a single namespace Xpath selector.
|
||||
*
|
||||
*
|
||||
* @param expression XPath expression as a String
|
||||
* @param prefix namespace prefix
|
||||
* @param namespace namespace URI
|
||||
@@ -65,7 +65,7 @@ public class StringValueTestXPathMessageSelector extends AbstractXPathMessageSel
|
||||
|
||||
/**
|
||||
* Creates a non-namespaced testing selector.
|
||||
*
|
||||
*
|
||||
* @param expression XPath expression as a String
|
||||
* @param valueToTestFor value to test for
|
||||
*/
|
||||
@@ -76,7 +76,7 @@ public class StringValueTestXPathMessageSelector extends AbstractXPathMessageSel
|
||||
|
||||
/**
|
||||
* Creates a selector with the provided {@link XPathExpression}.
|
||||
*
|
||||
*
|
||||
* @param expression XPath expression
|
||||
* @param valueToTestFor value to test for
|
||||
*/
|
||||
@@ -89,8 +89,8 @@ public class StringValueTestXPathMessageSelector extends AbstractXPathMessageSel
|
||||
/**
|
||||
* Specify whether comparison of value returned by {@link XPathExpression}
|
||||
* to test value should be case sensitive. Default is 'true'.
|
||||
*
|
||||
* @param caseSensitive
|
||||
*
|
||||
* @param caseSensitive true if the test should be case sensitive.
|
||||
*/
|
||||
public void setCaseSensitive(boolean caseSensitive) {
|
||||
this.caseSensitive = caseSensitive;
|
||||
@@ -100,6 +100,7 @@ public class StringValueTestXPathMessageSelector extends AbstractXPathMessageSel
|
||||
* Evaluate the payload and return true if the value returned by the
|
||||
* {@link XPathExpression} is equal to the <code>valueToTestFor</code>.
|
||||
*/
|
||||
@Override
|
||||
public boolean accept(Message<?> message) {
|
||||
Node nodeToTest = getConverter().convertToNode(message.getPayload());
|
||||
String xPathResult = getXPathExpresion().evaluateAsString(nodeToTest);
|
||||
|
||||
@@ -24,13 +24,13 @@ import org.apache.commons.logging.LogFactory;
|
||||
import org.xml.sax.SAXParseException;
|
||||
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.messaging.MessageHandlingException;
|
||||
import org.springframework.integration.MessageRejectedException;
|
||||
import org.springframework.integration.core.MessageSelector;
|
||||
import org.springframework.integration.xml.AggregatedXmlMessageValidationException;
|
||||
import org.springframework.integration.xml.DefaultXmlPayloadConverter;
|
||||
import org.springframework.integration.xml.XmlPayloadConverter;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHandlingException;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -64,6 +64,9 @@ public class XmlValidatingMessageSelector implements MessageSelector {
|
||||
* type are {@link XmlValidatorFactory#SCHEMA_W3C_XML} or {@link XmlValidatorFactory#SCHEMA_RELAX_NG}.
|
||||
* If no 'schemaType' is provided it will default to {@link XmlValidatorFactory#SCHEMA_W3C_XML};
|
||||
*
|
||||
* @param schema The schema.
|
||||
* @param schemaType The schema type.
|
||||
*
|
||||
* @throws IOException if the XmlValidatorFactory fails to create a validator
|
||||
*/
|
||||
public XmlValidatingMessageSelector(Resource schema, String schemaType) throws IOException {
|
||||
@@ -81,6 +84,8 @@ public class XmlValidatingMessageSelector implements MessageSelector {
|
||||
|
||||
/**
|
||||
* Specify the Converter to use when converting payloads prior to validation.
|
||||
*
|
||||
* @param converter The payload converter.
|
||||
*/
|
||||
public void setConverter(XmlPayloadConverter converter) {
|
||||
Assert.notNull(converter, "'converter' must not be null");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,13 +21,16 @@ import javax.xml.transform.Source;
|
||||
/**
|
||||
* Factory to create a {@link Source} possibly taking into account
|
||||
* the provided message payload instance.
|
||||
*
|
||||
*
|
||||
* @author Jonas Partner
|
||||
*/
|
||||
public interface SourceFactory {
|
||||
|
||||
/**
|
||||
* Create appropriate {@link Source} instance for {@code payload}
|
||||
*
|
||||
* @param payload The payload.
|
||||
* @return The source.
|
||||
*/
|
||||
Source createSource(Object payload);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,17 +21,17 @@ import java.io.IOException;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.transform.Result;
|
||||
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.integration.transformer.AbstractTransformer;
|
||||
import org.springframework.integration.xml.result.DomResultFactory;
|
||||
import org.springframework.integration.xml.result.ResultFactory;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.oxm.Marshaller;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* An implementation of {@link AbstractTransformer} that delegates to an OXM {@link Marshaller}.
|
||||
*
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Jonas Partner
|
||||
*/
|
||||
@@ -67,6 +67,8 @@ public class MarshallingTransformer extends AbstractTransformer {
|
||||
* Specify whether the source Message's payload should be extracted prior
|
||||
* to marshalling. This value is set to "true" by default. To send the
|
||||
* Message itself as input to the Marshaller instead, set this to "false".
|
||||
*
|
||||
* @param extractPayload true if the payload should be extracted.
|
||||
*/
|
||||
public void setExtractPayload(boolean extractPayload) {
|
||||
this.extractPayload = extractPayload;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,11 +25,11 @@ import javax.xml.transform.stream.StreamSource;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.integration.transformer.AbstractPayloadTransformer;
|
||||
import org.springframework.integration.transformer.Transformer;
|
||||
import org.springframework.integration.xml.source.DomSourceFactory;
|
||||
import org.springframework.integration.xml.source.SourceFactory;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.oxm.Unmarshaller;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.xml.transform.StringSource;
|
||||
@@ -45,7 +45,7 @@ import org.springframework.xml.transform.StringSource;
|
||||
* The Unmarshaller may return a Message, but if the return value is not
|
||||
* already a Message instance, a new Message will be created with that
|
||||
* return value as its payload.
|
||||
*
|
||||
*
|
||||
* @author Jonas Partner
|
||||
*/
|
||||
public class UnmarshallingTransformer extends AbstractPayloadTransformer<Object, Object> {
|
||||
@@ -64,6 +64,8 @@ public class UnmarshallingTransformer extends AbstractPayloadTransformer<Object,
|
||||
|
||||
/**
|
||||
* Provide the SourceFactory to be used. Must not be null.
|
||||
*
|
||||
* @param sourceFactory The source factory.
|
||||
*/
|
||||
public void setSourceFactory(SourceFactory sourceFactory) {
|
||||
Assert.notNull(sourceFactory, "sourceFactory must not be null");
|
||||
@@ -72,6 +74,8 @@ public class UnmarshallingTransformer extends AbstractPayloadTransformer<Object,
|
||||
|
||||
/**
|
||||
* If true always delegate to the {@link SourceFactory}.
|
||||
*
|
||||
* @param alwaysUseSourceFactory true to always use the source factory.
|
||||
*/
|
||||
public void setAlwaysUseSourceFactory(boolean alwaysUseSourceFactory) {
|
||||
this.alwaysUseSourceFactory = alwaysUseSourceFactory;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,12 +20,12 @@ import java.util.Map;
|
||||
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.integration.transformer.HeaderEnricher;
|
||||
import org.springframework.integration.transformer.support.HeaderValueMessageProcessor;
|
||||
import org.springframework.integration.xml.DefaultXmlPayloadConverter;
|
||||
import org.springframework.integration.xml.XmlPayloadConverter;
|
||||
import org.springframework.integration.xml.xpath.XPathEvaluationType;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.xml.xpath.XPathExpression;
|
||||
import org.springframework.xml.xpath.XPathExpressionFactory;
|
||||
@@ -44,6 +44,8 @@ public class XPathHeaderEnricher extends HeaderEnricher {
|
||||
/**
|
||||
* Create an instance of XPathHeaderEnricher using a map with header names as keys
|
||||
* and XPathExpressionValueHolders to evaluate the values.
|
||||
*
|
||||
* @param expressionMap The expression map.
|
||||
*/
|
||||
public XPathHeaderEnricher(Map<String, XPathExpressionEvaluatingHeaderValueMessageProcessor> expressionMap) {
|
||||
super(expressionMap);
|
||||
@@ -79,10 +81,12 @@ public class XPathHeaderEnricher extends HeaderEnricher {
|
||||
this.overwrite = overwrite;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean isOverwrite() {
|
||||
return this.overwrite;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object processMessage(Message<?> message) {
|
||||
Node node = converter.convertToNode(message.getPayload());
|
||||
Object result = this.evaluationType.evaluateXPath(this.expression, node);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,11 +18,11 @@ package org.springframework.integration.xml.transformer;
|
||||
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.integration.transformer.AbstractTransformer;
|
||||
import org.springframework.integration.xml.DefaultXmlPayloadConverter;
|
||||
import org.springframework.integration.xml.XmlPayloadConverter;
|
||||
import org.springframework.integration.xml.xpath.XPathEvaluationType;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.xml.xpath.NodeMapper;
|
||||
import org.springframework.xml.xpath.XPathExpression;
|
||||
@@ -38,7 +38,7 @@ import org.springframework.xml.xpath.XPathExpressionFactory;
|
||||
* {@link #setEvaluationType(XPathEvaluationType)} or the presence of a {@link NodeMapper},
|
||||
* which takes precedence. If no {@link NodeMapper} or evaluation type is configured explicitly,
|
||||
* the default evaluation type is {@link XPathEvaluationType#STRING_RESULT}.
|
||||
*
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @since 2.0
|
||||
*/
|
||||
@@ -55,15 +55,19 @@ public class XPathTransformer extends AbstractTransformer {
|
||||
|
||||
/**
|
||||
* Create an {@link XPathTransformer} that will create an XPath expression from the given String
|
||||
* to be evaluated against converted inbound Message payloads.
|
||||
* to be evaluated against converted inbound Message payloads.
|
||||
*
|
||||
* @param expression The expression.
|
||||
*/
|
||||
public XPathTransformer(String expression) {
|
||||
this.xpathExpression = XPathExpressionFactory.createXPathExpression(expression);
|
||||
this.xpathExpression = XPathExpressionFactory.createXPathExpression(expression);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an {@link XPathTransformer} that will evaluate the given {@link XPathExpression}
|
||||
* against converted inbound Message payloads.
|
||||
*
|
||||
* @param expression The expression.
|
||||
*/
|
||||
public XPathTransformer(XPathExpression expression) {
|
||||
Assert.notNull(expression, "expression must not be null");
|
||||
@@ -73,6 +77,8 @@ public class XPathTransformer extends AbstractTransformer {
|
||||
|
||||
/**
|
||||
* Specify the expected {@link XPathEvaluationType}. The default is {@link XPathEvaluationType#STRING_RESULT}.
|
||||
*
|
||||
* @param evaluationType The evaluation type.
|
||||
*/
|
||||
public void setEvaluationType(XPathEvaluationType evaluationType) {
|
||||
Assert.notNull(evaluationType, "evaluationType must not be null.");
|
||||
@@ -83,6 +89,8 @@ public class XPathTransformer extends AbstractTransformer {
|
||||
* Set a {@link NodeMapper} to use for generating the result object. By default the NodeMapper is null,
|
||||
* but if explicitly set, type determination is the responsibility of the NodeMapper, taking precedence
|
||||
* over any configured evaluationType.
|
||||
*
|
||||
* @param nodeMapper The node mapper.
|
||||
*/
|
||||
public void setNodeMapper(NodeMapper<?> nodeMapper) {
|
||||
this.nodeMapper = nodeMapper;
|
||||
@@ -90,6 +98,8 @@ public class XPathTransformer extends AbstractTransformer {
|
||||
|
||||
/**
|
||||
* Specify the {@link XmlPayloadConverter} to use when converting a Message payload prior to XPath evaluation.
|
||||
*
|
||||
* @param converter The payload converter.
|
||||
*/
|
||||
public void setConverter(XmlPayloadConverter converter) {
|
||||
Assert.notNull(converter, "converter must not be null");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -141,6 +141,8 @@ public class XsltPayloadTransformer extends AbstractTransformer implements BeanC
|
||||
|
||||
/**
|
||||
* Sets the SourceFactory.
|
||||
*
|
||||
* @param sourceFactory The source factory.
|
||||
*/
|
||||
public void setSourceFactory(SourceFactory sourceFactory) {
|
||||
Assert.notNull(sourceFactory, "SourceFactory must not be null");
|
||||
@@ -148,7 +150,9 @@ public class XsltPayloadTransformer extends AbstractTransformer implements BeanC
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the ResultFactory
|
||||
* Sets the ResultFactory.
|
||||
*
|
||||
* @param resultFactory The result factory.
|
||||
*/
|
||||
public void setResultFactory(ResultFactory resultFactory) {
|
||||
Assert.notNull(sourceFactory, "ResultFactory must not be null");
|
||||
@@ -158,6 +162,8 @@ public class XsltPayloadTransformer extends AbstractTransformer implements BeanC
|
||||
|
||||
/**
|
||||
* Specify whether to always use source factory even for directly supported payload types.
|
||||
*
|
||||
* @param alwaysUseSourceFactory true to always use the source factory.
|
||||
*/
|
||||
public void setAlwaysUseSourceFactory(boolean alwaysUseSourceFactory) {
|
||||
this.alwaysUseSourceFactory = alwaysUseSourceFactory;
|
||||
@@ -165,6 +171,8 @@ public class XsltPayloadTransformer extends AbstractTransformer implements BeanC
|
||||
|
||||
/**
|
||||
* Specify whether to always use result factory even for directly supported payload types
|
||||
*
|
||||
* @param alwaysUseResultFactory true to always use the result factory.
|
||||
*/
|
||||
public void setAlwaysUseResultFactory(boolean alwaysUseResultFactory) {
|
||||
this.alwaysUseResultFactory = alwaysUseResultFactory;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013 the original author or authors.
|
||||
* Copyright 2013-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,6 +30,7 @@ import org.w3c.dom.Node;
|
||||
|
||||
import org.springframework.integration.xml.DefaultXmlPayloadConverter;
|
||||
import org.springframework.integration.xml.XmlPayloadConverter;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.xml.xpath.NodeMapper;
|
||||
import org.springframework.xml.xpath.XPathException;
|
||||
@@ -73,6 +74,7 @@ public final class XPathUtils {
|
||||
* @param resultArg an optional parameter to represent the result type of the xpath evaluation.
|
||||
* Only one argument is allowed, which can be an instance of {@link org.springframework.xml.xpath.NodeMapper} or
|
||||
* one of these String constants: "string", "boolean", "number", "node" or "node_list".
|
||||
* @param <T> The required return type.
|
||||
* @return the result of the xpath expression evaluation.
|
||||
* @throws IllegalArgumentException - if the provided arguments aren't appropriate types or values;
|
||||
* @throws MessagingException - if the provided object can't be converted to a {@link Node};
|
||||
|
||||
Reference in New Issue
Block a user