Checkstyle changes
* Upgrade to Checkstyle 9.0 * apply some JavaDocs rules * Fix JavaDocs rules violations * Some other minor clean up in the affected classes
This commit is contained in:
@@ -27,7 +27,7 @@ import org.springframework.integration.config.xml.IntegrationNamespaceUtils;
|
||||
import org.springframework.integration.mongodb.inbound.MongoDbMessageSource;
|
||||
|
||||
/**
|
||||
* Parser for MongoDb store inbound adapters
|
||||
* Parser for MongoDb store inbound adapters.
|
||||
*
|
||||
* @author Amol Nayak
|
||||
* @author Oleg Zhurakousky
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007-2019 the original author or authors.
|
||||
* Copyright 2007-2021 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.
|
||||
@@ -24,9 +24,10 @@ import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.integration.config.xml.AbstractOutboundChannelAdapterParser;
|
||||
import org.springframework.integration.mongodb.outbound.MongoDbStoringMessageHandler;
|
||||
/**
|
||||
* Parser for Mongodb store outbound adapters
|
||||
* Parser for Mongodb store outbound adapters.
|
||||
*
|
||||
* @author Oleg Zhurakousky
|
||||
*
|
||||
* @since 2.2
|
||||
*/
|
||||
public class MongoDbOutboundChannelAdapterParser extends AbstractOutboundChannelAdapterParser {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2020 the original author or authors.
|
||||
* Copyright 2016-2021 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.integration.mongodb.outbound.MongoDbOutboundGateway;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Parser for MongoDb outbound gateways
|
||||
* Parser for MongoDb outbound gateways.
|
||||
*
|
||||
* @author Xavier Padro
|
||||
* @author Artem Bilan
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2021 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,7 +25,7 @@ import org.springframework.integration.config.xml.IntegrationNamespaceUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Utility class used by mongo parsers
|
||||
* Utility class used by mongo parsers.
|
||||
*
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Gary Russell
|
||||
@@ -40,7 +40,7 @@ final class MongoParserUtils {
|
||||
|
||||
/**
|
||||
* Will parse and validate
|
||||
* 'mongodb-template', 'mongodb-factory', 'collection-name', 'collection-name-expression' and 'mongo-converter'
|
||||
* 'mongodb-template', 'mongodb-factory', 'collection-name', 'collection-name-expression' and 'mongo-converter'.
|
||||
* @param element the element to parse
|
||||
* @param parserContext the context for parsing
|
||||
* @param builder the bean definition builder
|
||||
|
||||
@@ -30,6 +30,9 @@ import org.springframework.integration.mongodb.inbound.AbstractMongoDbMessageSou
|
||||
/**
|
||||
* A {@link MessageSourceSpec} extension for common MongoDB sources options.
|
||||
*
|
||||
* @param <S> target spec type.
|
||||
* @param <H> target message source type.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 5.5
|
||||
@@ -39,7 +42,7 @@ public class AbstractMongoDbMessageSourceSpec<S extends AbstractMongoDbMessageSo
|
||||
extends MessageSourceSpec<S, H> {
|
||||
|
||||
/**
|
||||
* Allow you to set the type of the entityClass that will be passed to the the MongoDB query method.
|
||||
* Allow you to set the type of the entityClass that will be passed to the MongoDB query method.
|
||||
* Default is {@link com.mongodb.DBObject}.
|
||||
* @param entityClass The entity class.
|
||||
* @return the spec
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.integration.expression.ValueExpression;
|
||||
import org.springframework.integration.mongodb.inbound.MongoDbChangeStreamMessageProducer;
|
||||
|
||||
/**
|
||||
* Factory class for building MongoDb components
|
||||
* Factory class for building MongoDb components.
|
||||
*
|
||||
* @author Xavier Padro
|
||||
* @author Artem Bilan
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2020 the original author or authors.
|
||||
* Copyright 2016-2021 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,7 @@ import org.springframework.integration.mongodb.outbound.MongoDbOutboundGateway;
|
||||
import org.springframework.messaging.Message;
|
||||
|
||||
/**
|
||||
* A {@link MessageHandlerSpec} extension for the MongoDb Outbound endpoint {@link MongoDbOutboundGateway}
|
||||
* A {@link MessageHandlerSpec} extension for the MongoDb Outbound endpoint {@link MongoDbOutboundGateway}.
|
||||
*
|
||||
* @author Xavier Padro
|
||||
* @author Artem Bilan
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2020 the original author or authors.
|
||||
* Copyright 2015-2021 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.
|
||||
@@ -68,7 +68,7 @@ public class MongoDbMetadataStore implements ConcurrentMetadataStore {
|
||||
|
||||
/**
|
||||
* Configure the MongoDbMetadataStore by provided {@link MongoDatabaseFactory} and
|
||||
* collection name
|
||||
* collection name.
|
||||
* @param factory the mongodb factory
|
||||
* @param collectionName the collection name where it persists the data
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2018-2019 the original author or authors.
|
||||
* Copyright 2018-2021 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.
|
||||
@@ -34,6 +34,8 @@ import com.mongodb.client.MongoCollection;
|
||||
* but with {@code Message<?> requestMessage} context during {@code handleMessage()}
|
||||
* process in the {@link MongoDbOutboundGateway}.
|
||||
*
|
||||
* @param <T> the expected item type.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 5.0.11
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2020 the original author or authors.
|
||||
* Copyright 2016-2021 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.
|
||||
@@ -37,7 +37,7 @@ import org.springframework.messaging.Message;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Makes outbound operations to query a MongoDb database using a {@link MongoOperations}
|
||||
* Makes outbound operations to query a MongoDb database using a {@link MongoOperations}.
|
||||
*
|
||||
* @author Xavier Padro
|
||||
* @author Artem Bilan
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2007-2020 the original author or authors.
|
||||
* Copyright 2007-2021 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.
|
||||
@@ -35,51 +35,48 @@ import org.springframework.util.Assert;
|
||||
* @author Amol Nayak
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 2.2
|
||||
*
|
||||
*/
|
||||
public class MongoDbStoringMessageHandler extends AbstractMessageHandler {
|
||||
|
||||
private volatile MongoOperations mongoTemplate;
|
||||
private final MongoDatabaseFactory mongoDbFactory;
|
||||
|
||||
private volatile MongoDatabaseFactory mongoDbFactory;
|
||||
private MongoOperations mongoTemplate;
|
||||
|
||||
private volatile MongoConverter mongoConverter;
|
||||
private MongoConverter mongoConverter;
|
||||
|
||||
private volatile StandardEvaluationContext evaluationContext;
|
||||
private StandardEvaluationContext evaluationContext;
|
||||
|
||||
private volatile Expression collectionNameExpression = new LiteralExpression("data");
|
||||
private Expression collectionNameExpression = new LiteralExpression("data");
|
||||
|
||||
private volatile boolean initialized = false;
|
||||
|
||||
/**
|
||||
* Will construct this instance using provided {@link MongoDatabaseFactory}
|
||||
*
|
||||
* Will construct this instance using provided {@link MongoDatabaseFactory}.
|
||||
* @param mongoDbFactory The mongodb factory.
|
||||
*/
|
||||
public MongoDbStoringMessageHandler(MongoDatabaseFactory mongoDbFactory) {
|
||||
Assert.notNull(mongoDbFactory, "'mongoDbFactory' must not be null");
|
||||
|
||||
this.mongoDbFactory = mongoDbFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will construct this instance using fully created and initialized instance of
|
||||
* provided {@link MongoOperations}
|
||||
*
|
||||
* provided {@link MongoOperations}.
|
||||
* @param mongoTemplate The MongoOperations implementation.
|
||||
*/
|
||||
public MongoDbStoringMessageHandler(MongoOperations mongoTemplate) {
|
||||
Assert.notNull(mongoTemplate, "'mongoTemplate' must not be null");
|
||||
|
||||
this.mongoTemplate = mongoTemplate;
|
||||
this.mongoDbFactory = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows you to provide custom {@link MongoConverter} used to assist in serialization
|
||||
* Allow providing custom {@link MongoConverter} used to assist in serialization
|
||||
* of data written to MongoDb. Only allowed if this instance was constructed with a
|
||||
* {@link MongoDatabaseFactory}.
|
||||
*
|
||||
* @param mongoConverter The mongo converter.
|
||||
*/
|
||||
public void setMongoConverter(MongoConverter mongoConverter) {
|
||||
@@ -89,9 +86,8 @@ public class MongoDbStoringMessageHandler extends AbstractMessageHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the SpEL {@link Expression} that should resolve to a collection name
|
||||
* Set the SpEL {@link Expression} that should resolve to a collection name
|
||||
* used by {@link MongoOperations} to store data
|
||||
*
|
||||
* @param collectionNameExpression The collection name expression.
|
||||
*/
|
||||
public void setCollectionNameExpression(Expression collectionNameExpression) {
|
||||
@@ -124,4 +120,5 @@ public class MongoDbStoringMessageHandler extends AbstractMessageHandler {
|
||||
|
||||
this.mongoTemplate.save(payload, collectionName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2019-2020 the original author or authors.
|
||||
* Copyright 2019-2021 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.
|
||||
@@ -55,7 +55,7 @@ public class ReactiveMongoDbStoringMessageHandler extends AbstractReactiveMessag
|
||||
private volatile boolean initialized = false;
|
||||
|
||||
/**
|
||||
* Construct this instance using a provided {@link ReactiveMongoDatabaseFactory}
|
||||
* Construct this instance using a provided {@link ReactiveMongoDatabaseFactory}.
|
||||
* @param mongoDbFactory The reactive mongoDatabase factory.
|
||||
*/
|
||||
public ReactiveMongoDbStoringMessageHandler(ReactiveMongoDatabaseFactory mongoDbFactory) {
|
||||
@@ -65,7 +65,7 @@ public class ReactiveMongoDbStoringMessageHandler extends AbstractReactiveMessag
|
||||
|
||||
/**
|
||||
* Construct this instance using a fully created and initialized instance of provided
|
||||
* {@link ReactiveMongoOperations}
|
||||
* {@link ReactiveMongoOperations}.
|
||||
* @param mongoTemplate The ReactiveMongoOperations implementation.
|
||||
*/
|
||||
public ReactiveMongoDbStoringMessageHandler(ReactiveMongoOperations mongoTemplate) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2020 the original author or authors.
|
||||
* Copyright 2016-2021 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.
|
||||
@@ -17,8 +17,8 @@
|
||||
package org.springframework.integration.mongodb.support;
|
||||
|
||||
/**
|
||||
* Pre-defined names and prefixes to be used for
|
||||
* for dealing with headers required by Mongo components
|
||||
* Pre-defined names and prefixes to be used
|
||||
* for dealing with headers required by Mongo components.
|
||||
*
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
|
||||
Reference in New Issue
Block a user