Sonar Fixes - Javadoc-only imports

This commit is contained in:
Gary Russell
2019-01-02 12:26:22 -05:00
committed by Artem Bilan
parent a39881fd0d
commit e8df546b04
184 changed files with 820 additions and 805 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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,25 +18,25 @@ package org.springframework.integration.xml.selector;
import java.util.Map;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.springframework.integration.core.MessageSelector;
import org.springframework.messaging.Message;
import org.springframework.xml.xpath.XPathExpression;
/**
* Boolean XPath testing {@link MessageSelector}. Requires an XPathExpression
* Boolean XPath testing {@link org.springframework.integration.core.MessageSelector}.
* Requires an XPathExpression
* which can be evaluated using {@link XPathExpression#evaluateAsBoolean(Node)}.
* Supports payloads of type {@link Document} or {@link String}.
* Supports payloads of type {@link org.w3c.dom.Document} or {@link String}.
*
* @author Jonas Partner
* @author Gary Russell
*/
public class BooleanTestXPathMessageSelector extends AbstractXPathMessageSelector {
/**
* Create a boolean testing XPath {@link MessageSelector} supporting
* multiple namespaces.
* Create a boolean testing XPath {@link org.springframework.integration.core.MessageSelector}
* supporting multiple namespaces.
*
* @param expression XPath expression as a String
* @param namespaces Map of namespaces where the keys are namespace prefixes
@@ -46,7 +46,9 @@ public class BooleanTestXPathMessageSelector extends AbstractXPathMessageSelecto
}
/**
* Create a boolean testing XPath {@link MessageSelector} supporting a single namespace.
* Create a boolean testing XPath
* {@link org.springframework.integration.core.MessageSelector} supporting a single
* namespace.
*
* @param expression XPath expression as a String
* @param prefix namespace prefix
@@ -57,7 +59,9 @@ public class BooleanTestXPathMessageSelector extends AbstractXPathMessageSelecto
}
/**
* Create a boolean testing XPath {@link MessageSelector} with no namespace support.
* Create a boolean testing XPath
* {@link org.springframework.integration.core.MessageSelector} with no namespace
* support.
*
* @param expression XPath expression as a String
*/
@@ -66,8 +70,9 @@ public class BooleanTestXPathMessageSelector extends AbstractXPathMessageSelecto
}
/**
* Create a boolean testing XPath {@link MessageSelector} using the
* provided {@link XPathExpression}.
* Create a boolean testing XPath
* {@link org.springframework.integration.core.MessageSelector} using the provided
* {@link XPathExpression}.
*
* @param expression XPath expression
*/
@@ -79,6 +84,7 @@ public class BooleanTestXPathMessageSelector extends AbstractXPathMessageSelecto
/**
* Return true if the {@link XPathExpression} evaluates to <code>true</code>
*/
@Override
public boolean accept(Message<?> message) {
Node node = getConverter().convertToNode(message.getPayload());
return getXPathExpresion().evaluateAsBoolean(node);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 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,17 +20,17 @@ import java.util.Map;
import org.w3c.dom.Node;
import org.springframework.integration.core.MessageSelector;
import org.springframework.messaging.Message;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.xml.xpath.XPathExpression;
/**
* XPath {@link MessageSelector} that tests if a provided String value
* matches a given Regular Expression.
* XPath {@link org.springframework.integration.core.MessageSelector} that tests if a
* provided String value matches a given Regular Expression.
*
* @author Mark Fisher
* @author Gary Russell
* @since 2.1
*/
public class RegexTestXPathMessageSelector extends AbstractXPathMessageSelector {
@@ -95,6 +95,7 @@ public class RegexTestXPathMessageSelector extends AbstractXPathMessageSelector
* Evaluate the payload and return true if the value returned by the
* {@link XPathExpression} matches the <code>regex</code>.
*/
@Override
public boolean accept(Message<?> message) {
Node nodeToTest = getConverter().convertToNode(message.getPayload());
String xPathResult = getXPathExpresion().evaluateAsString(nodeToTest);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2018 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,18 +18,18 @@ package org.springframework.integration.xml.selector;
import java.util.Map;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
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}.
* XPath {@link org.springframework.integration.core.MessageSelector} that tests if a
* provided value supports payloads of type {@link org.w3c.dom.Document} or
* {@link String}.
*
* @author Jonas Partner
* @author Gary Russell
*/
public class StringValueTestXPathMessageSelector extends AbstractXPathMessageSelector {

View File

@@ -16,7 +16,6 @@
package org.springframework.integration.xml.splitter;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -57,7 +56,7 @@ import org.springframework.xml.xpath.XPathExpressionFactory;
/**
* Message Splitter that uses an {@link XPathExpression} to split a
* {@link Document}, {@link File} or {@link String} payload into a {@link NodeList}.
* {@link Document}, {@link java.io.File} or {@link String} payload into a {@link NodeList}.
* The return value will be either Strings or {@link Node}s depending on the
* received payload type. Additionally, node types will be converted to
* Documents if the 'createDocuments' property is set to <code>true</code>.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2018 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,19 @@ import java.io.IOException;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Result;
import org.springframework.integration.transformer.AbstractTransformer;
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}.
* An implementation of
* {@link org.springframework.integration.transformer.AbstractTransformer} that delegates
* to an OXM {@link Marshaller}.
*
* @author Mark Fisher
* @author Jonas Partner
* @author Gary Russell
*/
public class MarshallingTransformer extends AbstractXmlTransformer {

View File

@@ -27,7 +27,6 @@ import javax.xml.transform.stream.StreamSource;
import org.w3c.dom.Document;
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;
@@ -37,7 +36,8 @@ import org.springframework.util.ClassUtils;
import org.springframework.xml.transform.StringSource;
/**
* An implementation of {@link Transformer} that delegates to an OXM
* An implementation of {@link org.springframework.integration.transformer.Transformer}
* that delegates to an OXM
* {@link Unmarshaller}. Expects the payload to be of type {@link Document},
* {@link String}, {@link File}, {@link Source} or to have an instance of
* {@link SourceFactory} that can convert to a {@link Source}. If
@@ -53,6 +53,7 @@ import org.springframework.xml.transform.StringSource;
*
* @author Jonas Partner
* @author Artem Bilan
* @author Gary Russell
*/
public class UnmarshallingTransformer extends AbstractPayloadTransformer<Object, Object> {

View File

@@ -39,7 +39,6 @@ import org.springframework.core.io.Resource;
import org.springframework.expression.Expression;
import org.springframework.expression.spel.support.StandardEvaluationContext;
import org.springframework.integration.expression.ExpressionUtils;
import org.springframework.integration.xml.result.DomResultFactory;
import org.springframework.integration.xml.result.ResultFactory;
import org.springframework.integration.xml.source.DomSourceFactory;
import org.springframework.integration.xml.source.SourceFactory;
@@ -62,7 +61,8 @@ import org.springframework.xml.transform.StringSource;
* {@link Document} payload in results in {@link Document} payload out
* <p>
* {@link Source} payload in results in {@link Result} payload out, type will be
* determined by the {@link ResultFactory}, {@link DomResultFactory} by default.
* determined by the {@link ResultFactory},
* {@link org.springframework.integration.xml.result.DomResultFactory} by default.
* If an instance of {@link ResultTransformer} is registered this will be used
* to convert the result.
* <p>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2014 the original author or authors.
* Copyright 2013-2018 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,7 +30,6 @@ 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;
@@ -41,6 +40,7 @@ import org.springframework.xml.xpath.XPathExpressionFactory;
* Utility class for 'xpath' support.
*
* @author Artem Bilan
* @author Gary Russell
* @since 3.0
*/
public final class XPathUtils {
@@ -77,7 +77,7 @@ public final class XPathUtils {
* @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};
* @throws org.springframework.messaging.MessagingException - if the provided object can't be converted to a {@link Node};
* @throws XPathException - if the xpath expression can't be evaluated.
*/
@SuppressWarnings({"unchecked"})