INTEXT-116: Migrate to Gradle

JIRA: https://jira.spring.io/browse/INTEXT-116

Fix all compilation and JavaDocs warnings

INTEXT-116: Addressing PR comments
This commit is contained in:
Artem Bilan
2014-11-13 21:09:34 +02:00
committed by Gary Russell
parent f2bedb8f6a
commit ef6901dde7
15 changed files with 609 additions and 73 deletions

View File

@@ -1,12 +1,12 @@
/*
* Copyright 2002-2011 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. You may obtain a copy of
* the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -25,7 +25,7 @@ import java.util.List;
/**
* Container for {@link Flow} {@link PortConfiguration} metadata
* @author David Turanski
*
*
*/
public class ChannelNamePortConfiguration implements PortConfiguration {
@@ -46,8 +46,8 @@ public class ChannelNamePortConfiguration implements PortConfiguration {
/**
* A simple configuration for a flow with one input and one output port
* @param inputChannelName
* @param outputChannelName
* @param inputChannelName the input channel name.
* @param outputChannelName the output channel name.
*/
public ChannelNamePortConfiguration(String inputChannelName, String outputChannelName) {
this.inputPortMetadata = new PortMetadata("input", inputChannelName);

View File

@@ -46,7 +46,8 @@ import org.springframework.util.StringUtils;
* @author David Turanski
*
*/
public class Flow implements InitializingBean, BeanNameAware, DestinationResolver, ApplicationContextAware {
public class Flow
implements InitializingBean, BeanNameAware, DestinationResolver<MessageChannel>, ApplicationContextAware {
private static Log logger = LogFactory.getLog(Flow.class);
@@ -216,7 +217,7 @@ public class Flow implements InitializingBean, BeanNameAware, DestinationResolve
/**
* All flow outputs defined in the {@link PortConfiguration} are bridged to
* a single PublishSubscribeChannel
* @param the publish-subscribe channel
* @param flowOutputChannel the publish-subscribe channel
*/
public void setFlowOutputChannel(SubscribableChannel flowOutputChannel) {
this.flowOutputChannel = flowOutputChannel;

View File

@@ -1,12 +1,12 @@
/*
* Copyright 2002-2011 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. You may obtain a copy of
* the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -18,28 +18,24 @@ package org.springframework.integration.flow;
import java.util.List;
/**
* A container holding a {@link Flow} configuration. A flow configuration
* A container holding a {@link Flow} configuration. A flow configuration
* may contain multiple {@link PortConfiguration}s
*
*
* @author David Turanski
*
*
*/
public class FlowConfiguration {
private final List<PortConfiguration> portConfigurations;
/**
*
* @param portConfigurations
*/
public FlowConfiguration(List<PortConfiguration> portConfigurations) {
this.portConfigurations = portConfigurations;
}
/**
* Get the configuration by input port name
* @param inputPortName
* @return
* Get the configuration by input port name.
* @param inputPortName the input port name.
* @return the configuration.
*/
public PortConfiguration getConfigurationForInputPort(String inputPortName) {
for (PortConfiguration pc : portConfigurations) {

View File

@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
* @author David Turanski
*
*/
public class FlowMessageHandlerFactoryBean extends AbstractSimpleMessageHandlerFactoryBean
public class FlowMessageHandlerFactoryBean extends AbstractSimpleMessageHandlerFactoryBean<FlowMessageHandler>
implements InitializingBean {
@SuppressWarnings("unused")
@@ -88,10 +88,6 @@ public class FlowMessageHandlerFactoryBean extends AbstractSimpleMessageHandlerF
this.timeout = timeout;
}
/**
*
* @param errorChannel
*/
public void setErrorChannel(MessageChannel errorChannel) {
this.errorChannel = errorChannel;
}

View File

@@ -1,11 +1,11 @@
/*
* Copyright 2002-2011 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. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
@@ -33,35 +33,21 @@ import org.springframework.util.ResourceUtils;
/**
* Utility functions used by the flow parsers
*
*
* @author David Turanski
*
*
*/
public class FlowUtils {
private FlowUtils() {
}
/**
* Create a bridge
*
* @param inputChannel
* @param outputChannel
*/
public static void bridgeChannels(SubscribableChannel inputChannel, MessageChannel outputChannel) {
BridgeHandler bridgeHandler = new BridgeHandler();
bridgeHandler.setOutputChannel(outputChannel);
inputChannel.subscribe(bridgeHandler);
}
/**
* Register a bean with "flow" prefix
*
* @param beanDefinition
* @param registry
* @return
*/
public static String registerBeanDefinition(BeanDefinition beanDefinition, BeanDefinitionRegistry registry) {
String beanName = BeanDefinitionReaderUtils.generateBeanName(beanDefinition, registry);
beanName = "flow." + beanName;
@@ -116,20 +102,20 @@ public class FlowUtils {
}
private static void _displayDependencies(ConfigurableListableBeanFactory beanFactory, String[] beans, int level) {
for (int i = 0; i < beans.length; i++) {
for (String bean : beans) {
System.out.println(indent(level) + beans[i]);
System.out.println(indent(level) + bean);
String[] dependencies = beanFactory.getDependenciesForBean(beans[i]);
String[] dependencies = beanFactory.getDependenciesForBean(bean);
String[] depsArray = new String[dependencies.length];
int index = 0;
for (String dependency : dependencies) {
if (!dependency.equals(beans[i])) {
if (!dependency.equals(bean)) {
depsArray[index++] = dependency;
}
else {
System.out.println(indent(level + 1) + beans[i]);
System.out.println(indent(level + 1) + bean);
}
}
if (depsArray.length > 0) {