Some docs clean up for ZK & XML modules
This commit is contained in:
@@ -20,8 +20,11 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The validation exception which aggregate all the XML validation errors.
|
||||
*
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
@@ -31,7 +34,7 @@ public class AggregatedXmlMessageValidationException extends RuntimeException {
|
||||
|
||||
|
||||
public AggregatedXmlMessageValidationException(List<Throwable> exceptions) {
|
||||
this.exceptions = (exceptions != null) ? exceptions : Collections.<Throwable>emptyList();
|
||||
this.exceptions = (exceptions != null) ? exceptions : Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,6 +37,8 @@ import org.springframework.xml.validation.XmlValidator;
|
||||
import org.springframework.xml.validation.XmlValidatorFactory;
|
||||
|
||||
/**
|
||||
* The XML validation-specific {@link MessageSelector}.
|
||||
*
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Gary Russell
|
||||
* @author Liujiong
|
||||
@@ -74,7 +76,7 @@ public class XmlValidatingMessageSelector implements MessageSelector {
|
||||
|
||||
|
||||
/**
|
||||
* Creates a selector with a default {@link XmlValidator}. The validator will be initialized with
|
||||
* Create a selector with a default {@link XmlValidator}. The validator will be initialized with
|
||||
* the provided 'schema' location {@link Resource} and 'schemaType'. The valid options for schema
|
||||
* 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};
|
||||
@@ -133,8 +135,10 @@ public class XmlValidatingMessageSelector implements MessageSelector {
|
||||
new AggregatedXmlMessageValidationException(Arrays.asList(validationExceptions)));
|
||||
}
|
||||
else {
|
||||
LOGGER.info(new AggregatedXmlMessageValidationException(Arrays.asList(validationExceptions)),
|
||||
exceptionMessage);
|
||||
if (LOGGER.isInfoEnabled()) {
|
||||
LOGGER.info(new AggregatedXmlMessageValidationException(Arrays.asList(validationExceptions)),
|
||||
exceptionMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
return validationSuccess;
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* super class for XmlTransformer
|
||||
* Super class for XML transformers.
|
||||
*
|
||||
* @author Jonas Partner
|
||||
* @author Mark Fisher
|
||||
@@ -73,7 +73,8 @@ public abstract class AbstractXmlTransformer extends AbstractTransformer {
|
||||
@Override
|
||||
protected void onInit() {
|
||||
super.onInit();
|
||||
ResultFactory generatedResultFactory = configureResultFactory(this.resultType, this.resultFactoryName, this.getBeanFactory());
|
||||
ResultFactory generatedResultFactory =
|
||||
configureResultFactory(this.resultType, this.resultFactoryName, getBeanFactory());
|
||||
if (generatedResultFactory != null) {
|
||||
this.resultFactory = generatedResultFactory;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.springframework.util.Assert;
|
||||
* @author Mark Fisher
|
||||
* @author Jonas Partner
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
*/
|
||||
public class MarshallingTransformer extends AbstractXmlTransformer {
|
||||
|
||||
@@ -44,13 +45,13 @@ public class MarshallingTransformer extends AbstractXmlTransformer {
|
||||
private volatile boolean extractPayload = true;
|
||||
|
||||
|
||||
public MarshallingTransformer(Marshaller marshaller, ResultTransformer resultTransformer) throws ParserConfigurationException {
|
||||
public MarshallingTransformer(Marshaller marshaller, ResultTransformer resultTransformer) {
|
||||
Assert.notNull(marshaller, "a marshaller is required");
|
||||
this.marshaller = marshaller;
|
||||
this.resultTransformer = resultTransformer;
|
||||
}
|
||||
|
||||
public MarshallingTransformer(Marshaller marshaller) throws ParserConfigurationException {
|
||||
public MarshallingTransformer(Marshaller marshaller) {
|
||||
this(marshaller, null);
|
||||
}
|
||||
|
||||
@@ -59,7 +60,6 @@ public class MarshallingTransformer extends AbstractXmlTransformer {
|
||||
* 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) {
|
||||
@@ -75,8 +75,8 @@ public class MarshallingTransformer extends AbstractXmlTransformer {
|
||||
@Override
|
||||
public Object doTransform(Message<?> message) {
|
||||
Object source = (this.extractPayload) ? message.getPayload() : message;
|
||||
Object transformedPayload = null;
|
||||
Result result = this.getResultFactory().createResult(source);
|
||||
Object transformedPayload;
|
||||
Result result = getResultFactory().createResult(source);
|
||||
if (result == null) {
|
||||
throw new MessagingException(
|
||||
"Unable to marshal payload, ResultFactory returned null.");
|
||||
|
||||
@@ -35,6 +35,8 @@ import org.springframework.xml.xpath.XPathExpression;
|
||||
import org.springframework.xml.xpath.XPathExpressionFactory;
|
||||
|
||||
/**
|
||||
* The xPath-specific {@link HeaderValueMessageProcessor}
|
||||
*
|
||||
* @author Jonas Partner
|
||||
* @author Mark Fisher
|
||||
* @author Artem Bilan
|
||||
|
||||
@@ -23,6 +23,9 @@ import org.springframework.xml.xpath.XPathExpression;
|
||||
/**
|
||||
* Enumeration of different types of XPath evaluation used to indicate the type
|
||||
* of evaluation that should be carried out using a provided XPath expression.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Jonas Partner
|
||||
*/
|
||||
public enum XPathEvaluationType {
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Provides classes related to configuration.
|
||||
*/
|
||||
package org.springframework.integration.zookeeper.config;
|
||||
@@ -122,7 +122,6 @@ public class ZookeeperLockRegistry implements ExpirableLockRegistry, DisposableB
|
||||
* used internally, an external executor may be required in some environments, for
|
||||
* example those that require the use of a {@code WorkManagerTaskExecutor}.
|
||||
* @param mutexTaskExecutor the executor.
|
||||
*
|
||||
* @since 4.2.10
|
||||
*/
|
||||
public void setMutexTaskExecutor(AsyncTaskExecutor mutexTaskExecutor) {
|
||||
|
||||
@@ -17,7 +17,11 @@
|
||||
package org.springframework.integration.zookeeper.metadata;
|
||||
|
||||
/**
|
||||
* A {@code ZookeeperMetadataStore}-specific exception.
|
||||
*
|
||||
* @author Marius Bogoevici
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 4.2
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
|
||||
Reference in New Issue
Block a user