diff --git a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsInboundChannelAdapterParser.java b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsInboundChannelAdapterParser.java deleted file mode 100644 index 441c645722..0000000000 --- a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsInboundChannelAdapterParser.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2002-2010 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. - */ - -package org.springframework.integration.ftp.config; - - -/** - * Parser for the FTPS inbound-channel-adapter - * - * @author Josh Long - * @author Oleg Zhurakousky - * @since 2.0 - */ -public class FtpsInboundChannelAdapterParser extends AbstractFtpInboundChannelAdapterParser { - - @Override - protected String getClassName() { - return "org.springframework.integration.ftp.config.FtpsInboundSynchronizingMessageSourceFactoryBean"; - } -} diff --git a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsInboundSynchronizingMessageSourceFactoryBean.java b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsInboundSynchronizingMessageSourceFactoryBean.java deleted file mode 100644 index e85a7ec57a..0000000000 --- a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsInboundSynchronizingMessageSourceFactoryBean.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright 2002-2010 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. - */ - -package org.springframework.integration.ftp.config; - -import javax.net.ssl.KeyManager; -import javax.net.ssl.TrustManager; - -import org.apache.commons.net.ftp.FTPClient; - -import org.springframework.integration.ftp.client.AbstractFtpClientFactory; -import org.springframework.integration.ftp.client.DefaultFtpsClientFactory; -import org.springframework.util.StringUtils; - -/** - * Factory to make building the namespace easier. - * - * @author Josh Long - * @author Oleg Zhurakousky - * @since 2.0 - */ -class FtpsInboundSynchronizingMessageSourceFactoryBean extends FtpInboundSynchronizingMessageSourceFactoryBean { - - /** - * Sets whether the connection is implicit. Local testing reveals this to be a good choice. - */ - protected volatile Boolean implicit = Boolean.FALSE; - - /** - * "TLS" or "SSL" - */ - protected volatile String protocol; - - /** - * "P" - */ - protected volatile String prot; - - private KeyManager keyManager; - - private TrustManager trustManager; - - protected volatile String authValue; - - private Boolean sessionCreation; - - private Boolean useClientMode; - - private Boolean needClientAuth; - - private Boolean wantsClientAuth; - - private String[] cipherSuites; - - - public FtpsInboundSynchronizingMessageSourceFactoryBean() { - this.defaultFtpInboundFolderName = "ftpsInbound"; - //this.clientMode = FTPClient.PASSIVE_LOCAL_DATA_CONNECTION_MODE; - } - - - public void setKeyManager(KeyManager keyManager) { - this.keyManager = keyManager; - } - - public void setTrustManager(TrustManager trustManager) { - this.trustManager = trustManager; - } - - public void setImplicit(Boolean implicit) { - this.implicit = implicit; - } - - public void setProtocol(String protocol) { - this.protocol = protocol; - } - - public void setProt(String prot) { - this.prot = prot; - } - - public void setAuthValue(String authValue) { - this.authValue = authValue; - } - - public void setSessionCreation(Boolean sessionCreation) { - this.sessionCreation = sessionCreation; - } - - public void setUseClientMode(Boolean useClientMode) { - this.useClientMode = useClientMode; - } - - public void setNeedClientAuth(Boolean needClientAuth) { - this.needClientAuth = needClientAuth; - } - - public void setWantsClientAuth(Boolean wantsClientAuth) { - this.wantsClientAuth = wantsClientAuth; - } - - public void setCipherSuites(String[] cipherSuites) { - this.cipherSuites = cipherSuites; - } - - protected AbstractFtpClientFactory> initializeFactory(AbstractFtpClientFactory> factory) throws Exception { - //super.initializeFactory(factory); - DefaultFtpsClientFactory ftpsFactory = (DefaultFtpsClientFactory) factory; - ftpsFactory.setCipherSuites(this.cipherSuites); - ftpsFactory.setAuthValue(this.authValue); - ftpsFactory.setTrustManager(this.trustManager); - ftpsFactory.setKeyManager(this.keyManager); - ftpsFactory.setNeedClientAuth(this.needClientAuth); - ftpsFactory.setWantsClientAuth(this.wantsClientAuth); - ftpsFactory.setSessionCreation(this.sessionCreation); - ftpsFactory.setUseClientMode(this.useClientMode); - if (StringUtils.hasText(this.prot)) { - ftpsFactory.setProt(this.prot); - } - if (StringUtils.hasText(this.protocol)) { - ftpsFactory.setProtocol(this.protocol); - } - if (this.implicit != null) { - ftpsFactory.setImplicit(this.implicit); - } - return factory; - } - - protected AbstractFtpClientFactory> createClientFactory(){ - return new DefaultFtpsClientFactory(); - } - -} diff --git a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsNamespaceHandler.java b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsNamespaceHandler.java deleted file mode 100644 index a124a4b2ad..0000000000 --- a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsNamespaceHandler.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2002-2010 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. - */ - -package org.springframework.integration.ftp.config; - -/** - * Provides namespace support for using FTP. - *
- * This is *heavily* influenced by the good work done by Iwein before. - * - * @author Josh Long - */ -public class FtpsNamespaceHandler extends FtpNamespaceHandler { - - @Override - public void init() { - this.registerBeanDefinitionParser("inbound-channel-adapter", new FtpsInboundChannelAdapterParser()); - this.registerBeanDefinitionParser("outbound-channel-adapter", new FtpsOutboundChannelAdapterParser()); - } - -} diff --git a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsOutboundChannelAdapterParser.java b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsOutboundChannelAdapterParser.java deleted file mode 100644 index c8445668a3..0000000000 --- a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsOutboundChannelAdapterParser.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2002-2010 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. - */ - -package org.springframework.integration.ftp.config; - -/** - * Parser for the FTPS outbound-channel-adapter - * - * @author Josh Long - * @author Oleg Zhurakousky - * @since 2.0 - */ -public class FtpsOutboundChannelAdapterParser extends AbstractFtpOutboundChannelAdapterParser { - - @Override - protected String getClassName() { - return "org.springframework.integration.ftp.config.FtpsSendingMessageHandlerFactoryBean"; - } - -} diff --git a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsSendingMessageHandlerFactoryBean.java b/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsSendingMessageHandlerFactoryBean.java deleted file mode 100644 index b87b0f1e7e..0000000000 --- a/spring-integration-ftp/src/main/java/org/springframework/integration/ftp/config/FtpsSendingMessageHandlerFactoryBean.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright 2002-2010 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. - */ - -package org.springframework.integration.ftp.config; - -import javax.net.ssl.KeyManager; -import javax.net.ssl.TrustManager; - -import org.springframework.integration.ftp.client.AbstractFtpClientFactory; -import org.springframework.integration.ftp.client.DefaultFtpsClientFactory; -import org.springframework.util.StringUtils; - -/** - * Sends files to a remote FTPS file system. Based heavily on {@link org.springframework.integration.ftp.outbound.FtpSendingMessageHandler} - * - * @author Josh Long - * @author Iwein Fuld - * @author Oleg Zhurakousky - * @since 2.0 - */ -class FtpsSendingMessageHandlerFactoryBean extends FtpSendingMessageHandlerFactoryBean { - - /** - * Sets whether the connection is implicit. Default is FALSE. - */ - protected volatile Boolean implicit = Boolean.FALSE; - - /** - * "TLS" or "SSL" - */ - protected volatile String protocol; - - /** - * "P" - */ - protected volatile String prot; - - private volatile KeyManager keyManager; - - private volatile TrustManager trustManager; - - protected volatile String authValue; - - private volatile Boolean sessionCreation; - - private volatile Boolean useClientMode; - - private volatile Boolean needClientAuth; - - private volatile Boolean wantsClientAuth; - - private volatile String[] cipherSuites; - - public void setImplicit(Boolean implicit) { - this.implicit = implicit; - } - - public void setProtocol(String protocol) { - this.protocol = protocol; - } - - public void setProt(String prot) { - this.prot = prot; - } - - public void setKeyManager(KeyManager keyManager) { - this.keyManager = keyManager; - } - - public void setTrustManager(TrustManager trustManager) { - this.trustManager = trustManager; - } - - public void setAuthValue(String authValue) { - this.authValue = authValue; - } - - public void setSessionCreation(Boolean sessionCreation) { - this.sessionCreation = sessionCreation; - } - - public void setUseClientMode(Boolean useClientMode) { - this.useClientMode = useClientMode; - } - - public void setNeedClientAuth(Boolean needClientAuth) { - this.needClientAuth = needClientAuth; - } - - public void setWantsClientAuth(Boolean wantsClientAuth) { - this.wantsClientAuth = wantsClientAuth; - } - - public void setCipherSuites(String[] cipherSuites) { - this.cipherSuites = cipherSuites; - } - - protected AbstractFtpClientFactory> initializeClientFactory(AbstractFtpClientFactory> factory) { - //super.initializeClientFactory(factory); - DefaultFtpsClientFactory ftpsFactory = (DefaultFtpsClientFactory) factory; - - ftpsFactory.setCipherSuites(this.cipherSuites); - ftpsFactory.setAuthValue(this.authValue); - ftpsFactory.setTrustManager(this.trustManager); - ftpsFactory.setKeyManager(this.keyManager); - ftpsFactory.setNeedClientAuth(this.needClientAuth); - ftpsFactory.setWantsClientAuth(this.wantsClientAuth); - ftpsFactory.setSessionCreation(this.sessionCreation); - ftpsFactory.setUseClientMode(this.useClientMode); - if (StringUtils.hasText(this.prot)) { - ftpsFactory.setProt(this.prot); - } - if (StringUtils.hasText(this.protocol)) { - ftpsFactory.setProtocol(this.protocol); - } - if (this.implicit != null) { - ftpsFactory.setImplicit(this.implicit); - } - return ftpsFactory; - } - - protected AbstractFtpClientFactory> createClientFactory(){ - return new DefaultFtpsClientFactory(); - } -} diff --git a/spring-integration-ftp/src/main/resources/META-INF/spring.handlers b/spring-integration-ftp/src/main/resources/META-INF/spring.handlers index 7d2711fc92..db0a408e2a 100644 --- a/spring-integration-ftp/src/main/resources/META-INF/spring.handlers +++ b/spring-integration-ftp/src/main/resources/META-INF/spring.handlers @@ -1,3 +1 @@ http\://www.springframework.org/schema/integration/ftp=org.springframework.integration.ftp.config.FtpNamespaceHandler -http\://www.springframework.org/schema/integration/ftps=org.springframework.integration.ftp.config.FtpsNamespaceHandler - diff --git a/spring-integration-ftp/src/main/resources/META-INF/spring.schemas b/spring-integration-ftp/src/main/resources/META-INF/spring.schemas index 5103c6c85f..6442125fe9 100644 --- a/spring-integration-ftp/src/main/resources/META-INF/spring.schemas +++ b/spring-integration-ftp/src/main/resources/META-INF/spring.schemas @@ -1,4 +1,2 @@ http\://www.springframework.org/schema/integration/ftp/spring-integration-ftp-2.0.xsd=org/springframework/integration/ftp/config/spring-integration-ftp-2.0.xsd http\://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd=org/springframework/integration/ftp/config/spring-integration-ftp-2.0.xsd -http\://www.springframework.org/schema/integration/ftp/spring-integration-ftps-2.0.xsd=org/springframework/integration/ftp/config/spring-integration-ftps-2.0.xsd -http\://www.springframework.org/schema/integration/ftp/spring-integration-ftps.xsd=org/springframework/integration/ftp/config/spring-integration-ftps-2.0.xsd diff --git a/spring-integration-ftp/src/main/resources/org/springframework/integration/ftp/config/spring-integration-ftps-2.0.xsd b/spring-integration-ftp/src/main/resources/org/springframework/integration/ftp/config/spring-integration-ftps-2.0.xsd deleted file mode 100644 index e3281738ef..0000000000 --- a/spring-integration-ftp/src/main/resources/org/springframework/integration/ftp/config/spring-integration-ftps-2.0.xsd +++ /dev/null @@ -1,75 +0,0 @@ - -