diff --git a/spring-integration-samples/README.txt b/spring-integration-samples/README.txt deleted file mode 100644 index 20b04bba16..0000000000 --- a/spring-integration-samples/README.txt +++ /dev/null @@ -1,61 +0,0 @@ -Instructions for building the samples using Maven (http://maven.apache.org) -NOTE: this requires Maven 2.2.0 or later -------------------------------------------------------------------------------- - -1. Open a command prompt and navigate to the 'samples' directory within the -root of the project distribution: - - #> cd samples - -2. Build the samples and install them into your local Maven repository: - - #> mvn install - -You should see output similar to the following: -. . . . -[INFO] ------------------------------------------------------------------------ -[INFO] Reactor Summary: -[INFO] ------------------------------------------------------------------------ -[INFO] Spring Integration Samples ............................ SUCCESS [2.765s] -[INFO] Spring Integration Cafe Sample ........................ SUCCESS [19.351s] -[INFO] Spring Integration Error Handling Sample .............. SUCCESS [1.149s] -[INFO] Spring Integration File Copy Sample ................... SUCCESS [0.829s] -[INFO] Spring Integration Hello World Sample ................. SUCCESS [0.838s] -[INFO] Spring Integration JMS Sample ......................... SUCCESS [0.853s] -[INFO] Spring Integration Odd-Even Sample .................... SUCCESS [1.026s] -[INFO] Spring Integration Quote Sample ....................... SUCCESS [0.753s] -[INFO] Spring Integration WS Inbound Gateway Sample .......... SUCCESS [5.017s] -[INFO] Spring Integration WS Outbound Gateway Sample ......... SUCCESS [1.135s] -[INFO] Spring Integration XML Sample ......................... SUCCESS [0.823s] -[INFO] ------------------------------------------------------------------------ -[INFO] ------------------------------------------------------------------------ -[INFO] BUILD SUCCESSFUL -[INFO] ------------------------------------------------------------------------ -[INFO] Total time: 35 seconds -. . . . - -Once you see BUILD SUCCESSFUL, you are ready to start working with the samples. - -You can do so in one of two ways: - -1. If your Java IDE is integrated with Maven (e.g., SpringSource Tool Suite or -Eclipse with a Maven plug-in is highly recommended), then you can import the -projects into a workspace as Maven projects and start using them by following -the documentation in the javadoc of the various *Demo.java files. - -For example: - File -> Import -> General -> Existing Projects into Workspace - Browse to the 'samples' directory or a specific project's sub-directory - -2. If you prefer to configure the projects on your own and simply need the -right JARs on the class path, you can build the samples using a pre-configured -Maven profile which will copy all project dependencies (JARs) in the 'lib' -directory of each project: - - #> mvn install -P classpath - -Open any project and you will see the 'lib' directory with all of the JARs -required to run the demos. Now you can configure your IDE to point to those -directories. - -Happy integration :-) diff --git a/spring-integration-samples/async-gateway/.classpath b/spring-integration-samples/async-gateway/.classpath deleted file mode 100644 index e3c5b1bf15..0000000000 --- a/spring-integration-samples/async-gateway/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/spring-integration-samples/async-gateway/.project b/spring-integration-samples/async-gateway/.project deleted file mode 100644 index 3897200b11..0000000000 --- a/spring-integration-samples/async-gateway/.project +++ /dev/null @@ -1,29 +0,0 @@ - - - async-gateway - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - - org.springframework.ide.eclipse.core.springnature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/spring-integration-samples/async-gateway/.settings/org.maven.ide.eclipse.prefs b/spring-integration-samples/async-gateway/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 28947cd0d9..0000000000 --- a/spring-integration-samples/async-gateway/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Fri Sep 03 11:06:43 EDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/spring-integration-samples/async-gateway/.settings/org.springframework.ide.eclipse.core.prefs b/spring-integration-samples/async-gateway/.settings/org.springframework.ide.eclipse.core.prefs deleted file mode 100644 index ed4b87950f..0000000000 --- a/spring-integration-samples/async-gateway/.settings/org.springframework.ide.eclipse.core.prefs +++ /dev/null @@ -1,68 +0,0 @@ -#Fri Sep 03 10:29:08 EDT 2010 -eclipse.preferences.version=1 -org.springframework.ide.eclipse.core.builders.enable.aopreferencemodelbuilder=true -org.springframework.ide.eclipse.core.builders.enable.beanmetadatabuilder=true -org.springframework.ide.eclipse.core.builders.enable.osgibundleupdater=false -org.springframework.ide.eclipse.core.enable.project.preferences=true -org.springframework.ide.eclipse.core.validator.enable.com.springsource.server.ide.manifest.core.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.enable.com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.enable.com.springsource.sts.server.quickfix.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.core.springvalidator=false -org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.applicationSymbolicNameRule-com.springsource.server.ide.manifest.core.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.applicationVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleActivationPolicyRule-com.springsource.server.ide.manifest.core.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleActivatorRule-com.springsource.server.ide.manifest.core.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleManifestVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleSymbolicNameRule-com.springsource.server.ide.manifest.core.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.exportPackageRule-com.springsource.server.ide.manifest.core.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.importRule-com.springsource.server.ide.manifest.core.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.parsingProblemsRule-com.springsource.server.ide.manifest.core.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.requireBundleRule-com.springsource.server.ide.manifest.core.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.AvoidDriverManagerDataSource-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.ImportElementsAtTopRulee-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.ParentBeanSpecifiesAbstractClassRule-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.RefElementRule-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.TooManyBeansInFileRule-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.UnnecessaryValueElementRule-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.UseBeanInheritance-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.legacyxmlusage.jndiobjectfactory-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.importBundleVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.importLibraryVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.importPackageVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.requireBundleVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.autowire.autowire-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanAlias-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanClass-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanConstructorArgument-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinition-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinitionHolder-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanFactory-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanInitDestroyMethod-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanReference-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.methodOverride-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.parsingProblems-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.requiredProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.toolAnnotation-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.core.springClasspath-org.springframework.ide.eclipse.core.springvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.action-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.actionstate-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attribute-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attributemapper-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.beanaction-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationaction-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationresult-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.exceptionhandler-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.import-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.inputattribute-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.mapping-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.outputattribute-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.set-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.state-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.subflowstate-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.transition-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.variable-org.springframework.ide.eclipse.webflow.core.validator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.webflowstate-org.springframework.ide.eclipse.webflow.core.validator=false diff --git a/spring-integration-samples/async-gateway/pom.xml b/spring-integration-samples/async-gateway/pom.xml deleted file mode 100644 index 755fae8819..0000000000 --- a/spring-integration-samples/async-gateway/pom.xml +++ /dev/null @@ -1,19 +0,0 @@ - - 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - - async-gateway - Gateway Demo - jar - - - org.springframework.integration - spring-integration-core - 2.0.0.BUILD-SNAPSHOT - - - diff --git a/spring-integration-samples/async-gateway/readme.txt b/spring-integration-samples/async-gateway/readme.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/spring-integration-samples/async-gateway/src/main/java/org/springframework/integration/samples/gateway/futures/DemoClient.java b/spring-integration-samples/async-gateway/src/main/java/org/springframework/integration/samples/gateway/futures/DemoClient.java deleted file mode 100644 index 6ea6001ab9..0000000000 --- a/spring-integration-samples/async-gateway/src/main/java/org/springframework/integration/samples/gateway/futures/DemoClient.java +++ /dev/null @@ -1,85 +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.samples.gateway.futures; - -import java.util.HashMap; -import java.util.Map; -import java.util.Random; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; - -import org.springframework.context.ApplicationContext; -import org.springframework.context.support.FileSystemXmlApplicationContext; - -/** - * @author Oleg Zhurakousky - * - */ -public class DemoClient { - - private static ExecutorService executor = Executors.newFixedThreadPool(100); - private static int timeout = 20; - /** - * @param args - */ - public static void main(String[] args) { - ApplicationContext ac = new FileSystemXmlApplicationContext("src/main/resources/META-INF/spring/integration/*.xml"); - MathServiceGateway mathService = ac.getBean("mathService", MathServiceGateway.class); - Map> results = new HashMap>(); - Random random = new Random(); - for (int i = 0; i < 100; i++) { - int number = random.nextInt(200); - Future result = mathService.multiplyByTwo(number); - results.put(number, result); - } - for (final Map.Entry> resultEntry : results.entrySet()) { - executor.execute(new Runnable() { - public void run() { - int[] result = processFuture(resultEntry); - - if (result[1] == -1){ - System.out.println("Multiplying " + result[0] + " should be easy. You should be able to multiply any number < 100 by 2 in your head"); - } else if (result[1] == -2){ - System.out.println("Multiplication of " + result[0] + " by 2 is can not be accomplished in " + timeout + " seconds"); - } else { - System.out.println("Result of multiplication of " + result[0] + " by 2 is " + result[1]); - } - } - }); - } - } - - public static int[] processFuture(Map.Entry> resultEntry){ - int originalNumber = resultEntry.getKey(); - Future result = resultEntry.getValue(); - try { - int finalResult = result.get(timeout, TimeUnit.SECONDS); - return new int[]{originalNumber, finalResult}; - } catch (ExecutionException e) { - return new int[]{originalNumber, -1}; - } catch (TimeoutException tex){ - return new int[]{originalNumber, -2}; - } catch (Exception ex){ - System.out.println(); - // ignore - } - return null; - } -} diff --git a/spring-integration-samples/async-gateway/src/main/java/org/springframework/integration/samples/gateway/futures/ExceptionMapper.java b/spring-integration-samples/async-gateway/src/main/java/org/springframework/integration/samples/gateway/futures/ExceptionMapper.java deleted file mode 100644 index e0b22234d8..0000000000 --- a/spring-integration-samples/async-gateway/src/main/java/org/springframework/integration/samples/gateway/futures/ExceptionMapper.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.samples.gateway.futures; - -import org.springframework.integration.Message; -import org.springframework.integration.MessageHandlingException; -import org.springframework.integration.mapping.InboundMessageMapper; - -/** - * @author Oleg Zhurakousky - * - */ -public class ExceptionMapper implements InboundMessageMapper{ - - @Override - public Message toMessage(MessageHandlingException messageHandlingException) - throws Exception { - return messageHandlingException.getFailedMessage(); - } - -} diff --git a/spring-integration-samples/async-gateway/src/main/java/org/springframework/integration/samples/gateway/futures/MathService.java b/spring-integration-samples/async-gateway/src/main/java/org/springframework/integration/samples/gateway/futures/MathService.java deleted file mode 100644 index d5aecc3431..0000000000 --- a/spring-integration-samples/async-gateway/src/main/java/org/springframework/integration/samples/gateway/futures/MathService.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.samples.gateway.futures; - -import java.util.Random; - -/** - * @author Oleg Zhurakousky - * - */ -public class MathService { - private final Random random = new Random(); - - public int multiplyByTwo(int i) throws Exception{ - long sleep = random.nextInt(10) * 1000; - Thread.sleep(sleep); - //System.out.println("Multiplied " + i); - return i*2; - } -} diff --git a/spring-integration-samples/async-gateway/src/main/java/org/springframework/integration/samples/gateway/futures/MathServiceGateway.java b/spring-integration-samples/async-gateway/src/main/java/org/springframework/integration/samples/gateway/futures/MathServiceGateway.java deleted file mode 100644 index 9d659a9e61..0000000000 --- a/spring-integration-samples/async-gateway/src/main/java/org/springframework/integration/samples/gateway/futures/MathServiceGateway.java +++ /dev/null @@ -1,27 +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.samples.gateway.futures; - -import java.util.concurrent.Future; - -/** - * @author Oleg Zhurakousky - * - */ -public interface MathServiceGateway { - - Future multiplyByTwo(int i); -} diff --git a/spring-integration-samples/async-gateway/src/main/resources/META-INF/spring/integration/math-service-config.xml b/spring-integration-samples/async-gateway/src/main/resources/META-INF/spring/integration/math-service-config.xml deleted file mode 100644 index 1299060f65..0000000000 --- a/spring-integration-samples/async-gateway/src/main/resources/META-INF/spring/integration/math-service-config.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/cafe/.classpath b/spring-integration-samples/cafe/.classpath deleted file mode 100644 index 70a3874ccc..0000000000 --- a/spring-integration-samples/cafe/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/spring-integration-samples/cafe/.project b/spring-integration-samples/cafe/.project deleted file mode 100644 index 06332d4f2d..0000000000 --- a/spring-integration-samples/cafe/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - cafe - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.maven.ide.eclipse.maven2Nature - org.eclipse.jdt.core.javanature - - diff --git a/spring-integration-samples/cafe/.settings/org.eclipse.jdt.core.prefs b/spring-integration-samples/cafe/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index fa96d4c90e..0000000000 --- a/spring-integration-samples/cafe/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,6 +0,0 @@ -#Wed Feb 24 19:23:36 PST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/spring-integration-samples/cafe/README.txt b/spring-integration-samples/cafe/README.txt deleted file mode 100644 index e9a4b04375..0000000000 --- a/spring-integration-samples/cafe/README.txt +++ /dev/null @@ -1,36 +0,0 @@ -Instructions for running the CafeDemo sample -------------------------------------------------------------------------------- -1. See README.txt in the parent directory. - -2. To run this sample as a standalone application simply execute the CafeDemo - class in the org.springframework.integration.samples.cafe.xml package. - -3. This sample is also configured to be a valid OSGi bundle. This means you can - deploy the generated JAR into an OSGi environment providing that the Spring - Integration bundles as well as other prerequisites (e.g., Spring Framework) - were installed. For example: To deploy it on SpringSource dm Server simply - drop the cafe-[version].jar file, located in the 'target' directory, to the - 'pickup' directory of the dm Server instance. You should see output similar - to the following in the trace file: - -. . . . . . . . . . . . . - System.out I ----------------------- -[2010-07-11 01:43:04.614] task-scheduler-3 System.out I Order #1 -[2010-07-11 01:43:04.614] task-scheduler-3 System.out I Iced MOCHA, 3 shots. -[2010-07-11 01:43:04.614] task-scheduler-3 System.out I Hot LATTE, 2 shots. -[2010-07-11 01:43:04.614] task-scheduler-3 System.out I ----------------------- -[2010-07-11 01:43:04.618] task-scheduler-2 System.out I task-scheduler-2 prepared cold drink #5 for order #5: iced 3 shot MOCHA -[2010-07-11 01:43:05.618] task-scheduler-2 System.out I task-scheduler-2 prepared cold drink #6 for order #6: iced 3 shot MOCHA -[2010-07-11 01:43:06.618] task-scheduler-2 System.out I task-scheduler-2 prepared cold drink #7 for order #7: iced 3 shot MOCHA -[2010-07-11 01:43:07.619] task-scheduler-2 System.out I task-scheduler-2 prepared cold drink #8 for order #8: iced 3 shot MOCHA -[2010-07-11 01:43:08.619] task-scheduler-2 System.out I task-scheduler-2 prepared cold drink #9 for order #9: iced 3 shot MOCHA -[2010-07-11 01:43:09.614] task-scheduler-3 System.out I task-scheduler-3 prepared hot drink #2 for order #2: hot 2 shot LATTE -[2010-07-11 01:43:09.615] task-scheduler-3 System.out I ----------------------- -[2010-07-11 01:43:09.615] task-scheduler-3 System.out I Order #2 -[2010-07-11 01:43:09.615] task-scheduler-3 System.out I Iced MOCHA, 3 shots. -[2010-07-11 01:43:09.615] task-scheduler-3 System.out I Hot LATTE, 2 shots. -[2010-07-11 01:43:09.615] task-scheduler-3 System.out I ----------------------- -[2010-07-11 01:43:09.620] task-scheduler-2 System.out I task-scheduler-2 prepared cold -. . . . . . . . . . . . . - -Happy integration :-) \ No newline at end of file diff --git a/spring-integration-samples/cafe/pom.xml b/spring-integration-samples/cafe/pom.xml deleted file mode 100644 index a5be6afa77..0000000000 --- a/spring-integration-samples/cafe/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - - cafe - Spring Integration Cafe Sample - - - - org.eclipse.osgi - org.eclipse.osgi - 3.4.2.R34x_v20080826-1230 - - - org.springframework.integration - spring-integration-core - - - org.springframework.integration - spring-integration-stream - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - target/classes/META-INF/MANIFEST.MF - - - - - - - ${basedir}/src/main/java - - **/*.xml - - - - false - ${basedir}/src/main/resources - - META-INF/spring/*.xml - - - - true - ${basedir}/src/main/resources - - META-INF/MANIFEST.MF - - - - - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - - repository.springsource.external - SpringSource EBR - http://repository.springsource.com/maven/bundles/external - - - diff --git a/spring-integration-samples/cafe/src/main/java/log4j.xml b/spring-integration-samples/cafe/src/main/java/log4j.xml deleted file mode 100644 index a01d5446a0..0000000000 --- a/spring-integration-samples/cafe/src/main/java/log4j.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/Cafe.java b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/Cafe.java deleted file mode 100644 index 66363ca854..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/Cafe.java +++ /dev/null @@ -1,36 +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.samples.cafe; - -import org.springframework.integration.annotation.Gateway; - -/** - * The entry point for Cafe Demo. The demo's main() method invokes the - * 'placeOrder' method on a generated MessagingGateway proxy. - * The gateway then passes the {@link Order} as the payload of a - * {@link org.springframework.integration.Message} to the - * configured requestChannel. The channel ('orders') is - * defined in the 'cafeDemo.xml' file. - * - * @author Mark Fisher - */ -public interface Cafe { - - @Gateway(requestChannel="orders") - void placeOrder(Order order); - -} diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/Delivery.java b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/Delivery.java deleted file mode 100644 index a59fbd430c..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/Delivery.java +++ /dev/null @@ -1,61 +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.samples.cafe; - -import java.util.List; - -/** - * @author Marius Bogoevici - */ -public class Delivery { - - private static final String SEPARATOR = "-----------------------"; - - - private List deliveredDrinks; - - private int orderNumber; - - - public Delivery(List deliveredDrinks) { - assert(deliveredDrinks.size() > 0); - this.deliveredDrinks = deliveredDrinks; - this.orderNumber = deliveredDrinks.get(0).getOrderNumber(); - } - - - public int getOrderNumber() { - return orderNumber; - } - - public List getDeliveredDrinks() { - return deliveredDrinks; - } - - @Override - public String toString() { - StringBuffer buffer = new StringBuffer(SEPARATOR + "\n"); - buffer.append("Order #" + getOrderNumber() + "\n"); - for (Drink drink : getDeliveredDrinks()) { - buffer.append(drink); - buffer.append("\n"); - } - buffer.append(SEPARATOR + "\n"); - return buffer.toString(); - } - -} diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/Drink.java b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/Drink.java deleted file mode 100644 index 504a86586c..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/Drink.java +++ /dev/null @@ -1,50 +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.samples.cafe; - -/** - * @author Marius Bogoevici - */ -public class Drink { - - private boolean iced; - - private int shots; - - private DrinkType drinkType; - - private int orderNumber; - - - public Drink(int orderNumber, DrinkType drinkType, boolean hot, int shots) { - this.orderNumber = orderNumber; - this.drinkType = drinkType; - this.iced = hot; - this.shots = shots; - } - - - public int getOrderNumber() { - return orderNumber; - } - - @Override - public String toString() { - return (iced?"Iced":"Hot") + " " + drinkType.toString() + ", " + shots + " shots."; - } - -} diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/DrinkType.java b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/DrinkType.java deleted file mode 100644 index 7e438db424..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/DrinkType.java +++ /dev/null @@ -1,29 +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.samples.cafe; - -/** - * @author Mark Fisher - */ -public enum DrinkType { - - ESPRESSO, - LATTE, - CAPPUCCINO, - MOCHA - -} diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/Order.java b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/Order.java deleted file mode 100644 index 883d9708d4..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/Order.java +++ /dev/null @@ -1,48 +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.samples.cafe; - -import java.util.ArrayList; -import java.util.List; - -/** - * @author Mark Fisher - * @author Marius Bogoevici - */ -public class Order { - - private List orderItems = new ArrayList(); - - private int number; - - public Order(int number) { - this.number = number; - } - - public void addItem(DrinkType drinkType, int shots, boolean iced) { - this.orderItems.add(new OrderItem(this, drinkType, shots, iced)); - } - - public int getNumber() { - return number; - } - - public List getItems() { - return this.orderItems; - } - -} diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/OrderItem.java b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/OrderItem.java deleted file mode 100644 index 0215ff4cc9..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/OrderItem.java +++ /dev/null @@ -1,62 +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.samples.cafe; - -/** - * @author Mark Fisher - * @author Marius Bogoevici - */ -public class OrderItem { - - private DrinkType type; - - private int shots = 1; - - private boolean iced = false; - - private final Order order; - - - public OrderItem(Order order, DrinkType type, int shots, boolean iced) { - this.order = order; - this.type = type; - this.shots = shots; - this.iced = iced; - } - - - public Order getOrder() { - return this.order; - } - - public boolean isIced() { - return this.iced; - } - - public int getShots() { - return shots; - } - - public DrinkType getDrinkType() { - return this.type; - } - - public String toString() { - return ((this.iced) ? "iced " : "hot ") + this.shots + " shot " + this.type; - } - -} diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/Barista.java b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/Barista.java deleted file mode 100644 index 6d72a93c02..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/Barista.java +++ /dev/null @@ -1,80 +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.samples.cafe.annotation; - -import java.util.concurrent.atomic.AtomicInteger; - -import org.springframework.integration.annotation.ServiceActivator; -import org.springframework.integration.samples.cafe.Drink; -import org.springframework.integration.samples.cafe.OrderItem; -import org.springframework.stereotype.Component; - -/** - * @author Mark Fisher - * @author Marius Bogoevici - */ -@Component -public class Barista { - - private long hotDrinkDelay = 5000; - - private long coldDrinkDelay = 1000; - - private AtomicInteger hotDrinkCounter = new AtomicInteger(); - - private AtomicInteger coldDrinkCounter = new AtomicInteger(); - - - public void setHotDrinkDelay(long hotDrinkDelay) { - this.hotDrinkDelay = hotDrinkDelay; - } - - public void setColdDrinkDelay(long coldDrinkDelay) { - this.coldDrinkDelay = coldDrinkDelay; - } - - @ServiceActivator(inputChannel="hotDrinkBarista", outputChannel="preparedDrinks") - public Drink prepareHotDrink(OrderItem orderItem) { - try { - Thread.sleep(this.hotDrinkDelay); - System.out.println(Thread.currentThread().getName() - + " prepared hot drink #" + hotDrinkCounter.incrementAndGet() + " for order #" - + orderItem.getOrder().getNumber() + ": " + orderItem); - return new Drink(orderItem.getOrder().getNumber(), orderItem.getDrinkType(), orderItem.isIced(), - orderItem.getShots()); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - return null; - } - } - - @ServiceActivator(inputChannel="coldDrinkBarista", outputChannel="preparedDrinks") - public Drink prepareColdDrink(OrderItem orderItem) { - try { - Thread.sleep(this.coldDrinkDelay); - System.out.println(Thread.currentThread().getName() - + " prepared cold drink #" + coldDrinkCounter.incrementAndGet() + " for order #" - + orderItem.getOrder().getNumber() + ": " + orderItem); - return new Drink(orderItem.getOrder().getNumber(), orderItem.getDrinkType(), orderItem.isIced(), - orderItem.getShots()); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - return null; - } - } - -} diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/CafeDemo.java b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/CafeDemo.java deleted file mode 100644 index 64ade4dbc9..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/CafeDemo.java +++ /dev/null @@ -1,55 +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.samples.cafe.annotation; - -import org.springframework.context.support.AbstractApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.context.support.FileSystemXmlApplicationContext; -import org.springframework.integration.samples.cafe.Cafe; -import org.springframework.integration.samples.cafe.DrinkType; -import org.springframework.integration.samples.cafe.Order; - -/** - * Provides the 'main' method for running the Cafe Demo application. When an - * order is placed, the Cafe will send that order to the "orders" channel. - * The channels are defined within the configuration file ("cafeDemo.xml"), - * and the relevant components are configured with annotations (such as the - * OrderSplitter, DrinkRouter, and Barista classes). - * - * @author Mark Fisher - * @author Marius Bogoevici - */ -public class CafeDemo { - - public static void main(String[] args) { - AbstractApplicationContext context = null; - if(args.length > 0) { - context = new FileSystemXmlApplicationContext(args); - } - else { - context = new ClassPathXmlApplicationContext("cafeDemo.xml", CafeDemo.class); - } - Cafe cafe = (Cafe) context.getBean("cafe"); - for (int i = 1; i <= 100; i++) { - Order order = new Order(i); - order.addItem(DrinkType.LATTE, 2, false); - order.addItem(DrinkType.MOCHA, 3, true); - cafe.placeOrder(order); - } - } - -} diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/DrinkRouter.java b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/DrinkRouter.java deleted file mode 100644 index 0dc31ff517..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/DrinkRouter.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.samples.cafe.annotation; - -import org.springframework.integration.annotation.MessageEndpoint; -import org.springframework.integration.annotation.Router; -import org.springframework.integration.samples.cafe.OrderItem; - -/** - * @author Mark Fisher - */ -@MessageEndpoint -public class DrinkRouter { - - @Router(inputChannel="drinks") - public String resolveOrderItemChannel(OrderItem orderItem) { - return (orderItem.isIced()) ? "coldDrinks" : "hotDrinks"; - } - -} diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/OrderSplitter.java b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/OrderSplitter.java deleted file mode 100644 index a2a6d75682..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/OrderSplitter.java +++ /dev/null @@ -1,37 +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.samples.cafe.annotation; - -import java.util.List; - -import org.springframework.integration.annotation.MessageEndpoint; -import org.springframework.integration.annotation.Splitter; -import org.springframework.integration.samples.cafe.Order; -import org.springframework.integration.samples.cafe.OrderItem; - -/** - * @author Mark Fisher - */ -@MessageEndpoint -public class OrderSplitter { - - @Splitter(inputChannel="orders", outputChannel="drinks") - public List split(Order order) { - return order.getItems(); - } - -} diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/Waiter.java b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/Waiter.java deleted file mode 100644 index d6c0b3f583..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/Waiter.java +++ /dev/null @@ -1,43 +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.samples.cafe.annotation; - -import java.util.List; - -import org.springframework.integration.annotation.Aggregator; -import org.springframework.integration.annotation.CorrelationStrategy; -import org.springframework.integration.annotation.MessageEndpoint; -import org.springframework.integration.samples.cafe.Delivery; -import org.springframework.integration.samples.cafe.Drink; - -/** - * @author Marius Bogoevici - */ -@MessageEndpoint -public class Waiter { - - @Aggregator(inputChannel = "preparedDrinks", outputChannel = "deliveries") - public Delivery prepareDelivery(List drinks) { - return new Delivery(drinks); - } - - @CorrelationStrategy - public int correlateByOrderNumber(Drink drink) { - return drink.getOrderNumber(); - } - -} diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/cafeDemo.xml b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/cafeDemo.xml deleted file mode 100644 index 103bd5d435..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/annotation/cafeDemo.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/xml/Barista.java b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/xml/Barista.java deleted file mode 100644 index a1222e8768..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/xml/Barista.java +++ /dev/null @@ -1,75 +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.samples.cafe.xml; - -import java.util.concurrent.atomic.AtomicInteger; - -import org.springframework.integration.samples.cafe.Drink; -import org.springframework.integration.samples.cafe.OrderItem; - -/** - * @author Mark Fisher - * @author Marius Bogoevici - */ -public class Barista { - - private long hotDrinkDelay = 5000; - - private long coldDrinkDelay = 1000; - - private AtomicInteger hotDrinkCounter = new AtomicInteger(); - - private AtomicInteger coldDrinkCounter = new AtomicInteger(); - - - public void setHotDrinkDelay(long hotDrinkDelay) { - this.hotDrinkDelay = hotDrinkDelay; - } - - public void setColdDrinkDelay(long coldDrinkDelay) { - this.coldDrinkDelay = coldDrinkDelay; - } - - public Drink prepareHotDrink(OrderItem orderItem) { - try { - Thread.sleep(this.hotDrinkDelay); - System.out.println(Thread.currentThread().getName() - + " prepared hot drink #" + hotDrinkCounter.incrementAndGet() + " for order #" - + orderItem.getOrder().getNumber() + ": " + orderItem); - return new Drink(orderItem.getOrder().getNumber(), orderItem.getDrinkType(), orderItem.isIced(), - orderItem.getShots()); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - return null; - } - } - - public Drink prepareColdDrink(OrderItem orderItem) { - try { - Thread.sleep(this.coldDrinkDelay); - System.out.println(Thread.currentThread().getName() - + " prepared cold drink #" + coldDrinkCounter.incrementAndGet() + " for order #" - + orderItem.getOrder().getNumber() + ": " + orderItem); - return new Drink(orderItem.getOrder().getNumber(), orderItem.getDrinkType(), orderItem.isIced(), - orderItem.getShots()); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - return null; - } - } - -} diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/xml/CafeDemo.java b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/xml/CafeDemo.java deleted file mode 100644 index 7f00f33cd5..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/xml/CafeDemo.java +++ /dev/null @@ -1,59 +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.samples.cafe.xml; - -import org.springframework.context.ApplicationContext; -import org.springframework.context.support.AbstractApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.samples.cafe.Cafe; -import org.springframework.integration.samples.cafe.DrinkType; -import org.springframework.integration.samples.cafe.Order; - -/** - * Provides the 'main' method for running the Cafe Demo application. When an - * order is placed, the Cafe will send that order to the "orders" channel. - * The relevant components are defined within the configuration file - * ("cafeDemo.xml"). - *

- * If deploying in SpringSource dmServer, the relevant ApplicationContext - * configuration is in the META-INF/spring directory instead. - * - * @author Mark Fisher - * @author Marius Bogoevici - * @author Oleg Zhurakousky - */ -public class CafeDemo { - - public static void main(String[] args) { - CafeDemo demo = new CafeDemo(); - AbstractApplicationContext context = new ClassPathXmlApplicationContext("cafeDemo.xml", CafeDemo.class); - demo.performDemo(context, 100); - context.close(); - } - - - public void performDemo(ApplicationContext applicationContext, int iterations) { - Cafe cafe = (Cafe) applicationContext.getBean("cafe"); - for (int i = 1; i <= iterations; i++) { - Order order = new Order(i); - order.addItem(DrinkType.LATTE, 2, false); - order.addItem(DrinkType.MOCHA, 3, true); - cafe.placeOrder(order); - } - } - -} diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/xml/Waiter.java b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/xml/Waiter.java deleted file mode 100644 index e9de2d5af8..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/xml/Waiter.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.samples.cafe.xml; - -import java.util.List; - -import org.springframework.integration.samples.cafe.Delivery; -import org.springframework.integration.samples.cafe.Drink; - -/** - * @author Marius Bogoevici - */ -public class Waiter { - - public Delivery prepareDelivery(List drinks) { - return new Delivery(drinks); - } - -} diff --git a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/xml/cafeDemo.xml b/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/xml/cafeDemo.xml deleted file mode 100644 index 8c6600183c..0000000000 --- a/spring-integration-samples/cafe/src/main/java/org/springframework/integration/samples/cafe/xml/cafeDemo.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/cafe/src/main/resources/META-INF/MANIFEST.MF b/spring-integration-samples/cafe/src/main/resources/META-INF/MANIFEST.MF deleted file mode 100644 index 3444bdfaf4..0000000000 --- a/spring-integration-samples/cafe/src/main/resources/META-INF/MANIFEST.MF +++ /dev/null @@ -1,11 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Version: ${project.version} -Bundle-Name: org.springframework.integration.samples.cafe -Bundle-ManifestVersion: 2 -Bundle-SymbolicName: org.springframework.integration.samples.cafe -Bundle-Activator: org.springframework.integration.samples.osgi.cafe.CafeBundleActivator -Import-Package: org.osgi.framework;version="[1.4.0, 1.4.0]" -Import-Library: org.aspectj;version="[1.6.2.RELEASE, 1.7.0)", - org.springframework.spring;version="[3.0.0, 3.1.0)" -Import-Bundle: org.springframework.integration;version="[2.0.0, 2.1.0)", - org.springframework.integration.stream;version="[2.0.0, 2.1.0)" diff --git a/spring-integration-samples/cafe/src/main/resources/META-INF/spring/cafe-osgi.xml b/spring-integration-samples/cafe/src/main/resources/META-INF/spring/cafe-osgi.xml deleted file mode 100644 index fa2e904413..0000000000 --- a/spring-integration-samples/cafe/src/main/resources/META-INF/spring/cafe-osgi.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/errorhandling/.classpath b/spring-integration-samples/errorhandling/.classpath deleted file mode 100644 index 24166ba51f..0000000000 --- a/spring-integration-samples/errorhandling/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/spring-integration-samples/errorhandling/.project b/spring-integration-samples/errorhandling/.project deleted file mode 100644 index d9402a70ad..0000000000 --- a/spring-integration-samples/errorhandling/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - errorhandling - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/spring-integration-samples/errorhandling/pom.xml b/spring-integration-samples/errorhandling/pom.xml deleted file mode 100644 index 889b9c52fe..0000000000 --- a/spring-integration-samples/errorhandling/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - - errorhandling - Spring Integration Error Handling Sample - - - org.springframework.integration - spring-integration-core - - - org.springframework.integration - spring-integration-stream - - - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - diff --git a/spring-integration-samples/errorhandling/src/main/java/log4j.xml b/spring-integration-samples/errorhandling/src/main/java/log4j.xml deleted file mode 100644 index a01d5446a0..0000000000 --- a/spring-integration-samples/errorhandling/src/main/java/log4j.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/ErrorUnwrapper.java b/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/ErrorUnwrapper.java deleted file mode 100644 index b2fe72ab65..0000000000 --- a/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/ErrorUnwrapper.java +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2002-2008 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.samples.errorhandling; - -import org.springframework.integration.Message; -import org.springframework.integration.MessagingException; -import org.springframework.integration.annotation.MessageEndpoint; -import org.springframework.integration.annotation.Transformer; -import org.springframework.integration.message.ErrorMessage; - -/** - * @author Iwein Fuld - */ -@MessageEndpoint -public class ErrorUnwrapper { - - @Transformer - public Message transform(ErrorMessage errorMessage) { - return ((MessagingException) errorMessage.getPayload()).getFailedMessage(); - } - -} diff --git a/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/Invitation.java b/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/Invitation.java deleted file mode 100644 index e9e3dbf028..0000000000 --- a/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/Invitation.java +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2002-2008 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.samples.errorhandling; - -/** - * @author Iwein Fuld - */ -public class Invitation { - - private final int number; - - public Invitation(int number) { - this.number = number; - } - - @Override - public String toString() { - return "Invitation number " + number; - } - -} diff --git a/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyDemo.java b/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyDemo.java deleted file mode 100644 index 7f77fb4e77..0000000000 --- a/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyDemo.java +++ /dev/null @@ -1,46 +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.samples.errorhandling; - -import java.io.IOException; - -import org.springframework.context.support.ClassPathXmlApplicationContext; - -/** - * Demonstrates the handling of Exceptions in an asynchronous messaging - * environment. View the 'errorHandlingDemo.xml' configuration file within - * this same package. Notice the use of a <header-enricher/> element - * within a <chain/> that establishes an 'error-channel' reference - * prior to passing the message to a <service-activator/>. - * - * @author Iwein Fuld - */ -public class PartyDemo { - - public static void main(String[] args) { - new ClassPathXmlApplicationContext("errorHandlingDemo.xml", PartyDemo.class); - System.out.println("### Hit ENTER to stop ###"); - try { - System.in.read(); - } - catch (IOException e) { - throw new RuntimeException(e); - } - System.exit(0); - } - -} diff --git a/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyGuest.java b/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyGuest.java deleted file mode 100644 index 54ab6aa0e4..0000000000 --- a/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyGuest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2002-2008 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.samples.errorhandling; - -import org.springframework.integration.annotation.MessageEndpoint; - -/** - * This guest receives invitations, but returns them to sender with a wrong - * address exception message. - * - * @author Iwein Fuld - */ -@MessageEndpoint -public class PartyGuest { - - public void onInvitation(Invitation invitation) { - System.out.println("Guest is throwing exception"); - throw new RuntimeException("Wrong address"); - } - -} diff --git a/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyHost.java b/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyHost.java deleted file mode 100644 index 2d18e8ef60..0000000000 --- a/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyHost.java +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2002-2008 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.samples.errorhandling; - -import java.util.concurrent.atomic.AtomicInteger; - -import org.springframework.integration.annotation.MessageEndpoint; - -/** - * Sends invitations to PartyGuests and likes to be notified of - * delivery failures of course. - * - * @author Iwein Fuld - */ -@MessageEndpoint -public class PartyHost { - - private final AtomicInteger counter = new AtomicInteger(0); - - public Invitation nextInvitation() { - return new Invitation(counter.incrementAndGet()); - } - - public void onInvitationFailed(Invitation inv) { - System.out.println("Host received failure notification for: " + inv); - } - -} diff --git a/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/errorHandlingDemo.xml b/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/errorHandlingDemo.xml deleted file mode 100644 index 7485ab44aa..0000000000 --- a/spring-integration-samples/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/errorHandlingDemo.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/filecopy/.classpath b/spring-integration-samples/filecopy/.classpath deleted file mode 100644 index 24166ba51f..0000000000 --- a/spring-integration-samples/filecopy/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/spring-integration-samples/filecopy/.project b/spring-integration-samples/filecopy/.project deleted file mode 100644 index c2900bec4d..0000000000 --- a/spring-integration-samples/filecopy/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - filecopy - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.maven.ide.eclipse.maven2Nature - org.eclipse.jdt.core.javanature - - diff --git a/spring-integration-samples/filecopy/pom.xml b/spring-integration-samples/filecopy/pom.xml deleted file mode 100644 index 85a20dff48..0000000000 --- a/spring-integration-samples/filecopy/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - - filecopy - Spring Integration File Copy Sample - - - org.springframework.integration - spring-integration-file - - - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - diff --git a/spring-integration-samples/filecopy/src/main/java/log4j.xml b/spring-integration-samples/filecopy/src/main/java/log4j.xml deleted file mode 100644 index c02b7b0de7..0000000000 --- a/spring-integration-samples/filecopy/src/main/java/log4j.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/BinaryFileCopyDemo.java b/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/BinaryFileCopyDemo.java deleted file mode 100644 index 21b1c9b892..0000000000 --- a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/BinaryFileCopyDemo.java +++ /dev/null @@ -1,37 +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.samples.filecopy; - -import org.springframework.context.ApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -/** - * Demonstrating the file copy scenario using binary file source and target. - * See the 'fileCopyDemo-binary.xml' configuration file for details. Notice - * that the transformer is configured to delete the source File after it - * extracts the content as a byte array. - * - * @author Marius Bogoevici - */ -public class BinaryFileCopyDemo { - - public static void main(String[] args) { - ApplicationContext context = new ClassPathXmlApplicationContext("fileCopyDemo-binary.xml", BinaryFileCopyDemo.class); - FileCopyDemoCommon.displayDirectories(context); - } - -} diff --git a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/FileBasedFileCopyDemo.java b/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/FileBasedFileCopyDemo.java deleted file mode 100644 index 6820938cc1..0000000000 --- a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/FileBasedFileCopyDemo.java +++ /dev/null @@ -1,35 +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.samples.filecopy; - -import org.springframework.context.ApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -/** - * Demonstrating the file copy scenario using file-based source and target. - * See the 'fileCopyDemo-file.xml' configuration file for details. - * - * @author Marius Bogoevici - */ -public class FileBasedFileCopyDemo { - - public static void main(String[] args) { - ApplicationContext context = new ClassPathXmlApplicationContext("fileCopyDemo-file.xml", FileBasedFileCopyDemo.class); - FileCopyDemoCommon.displayDirectories(context); - } - -} diff --git a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/FileCopyDemoCommon.java b/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/FileCopyDemoCommon.java deleted file mode 100644 index 72fb0187c1..0000000000 --- a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/FileCopyDemoCommon.java +++ /dev/null @@ -1,42 +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.samples.filecopy; - -import java.io.File; - -import org.springframework.beans.DirectFieldAccessor; -import org.springframework.context.ApplicationContext; -import org.springframework.integration.file.FileReadingMessageSource; -import org.springframework.integration.file.FileWritingMessageHandler; - -/** - * Displays the names of the input and output directories. - * - * @author Marius Bogoevici - * @author Mark Fisher - */ -public class FileCopyDemoCommon { - - public static void displayDirectories(ApplicationContext context) { - File inDir = (File) new DirectFieldAccessor(context.getBean(FileReadingMessageSource.class)).getPropertyValue("directory"); - File outDir = (File) new DirectFieldAccessor(context.getBean(FileWritingMessageHandler.class)).getPropertyValue("destinationDirectory"); - System.out.println("Input directory is: " + inDir.getAbsolutePath()); - System.out.println("Output directory is: " + outDir.getAbsolutePath()); - System.out.println("==================================================="); - } - -} diff --git a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/Handler.java b/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/Handler.java deleted file mode 100644 index 8fb30246cc..0000000000 --- a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/Handler.java +++ /dev/null @@ -1,44 +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.samples.filecopy; - -import java.io.File; - -/** - * A class providing several handling methods for different types of payloads. - * - * @author Mark Fisher - * @author Marius Bogoevici - */ -public class Handler { - - public String handleString(String input) { - System.out.println("Copying text: " + input); - return input.toUpperCase(); - } - - public File handleFile(File input) { - System.out.println("Copying file: " + input.getAbsolutePath()); - return input; - } - - public byte[] handleBytes(byte[] input) { - System.out.println("Copying " + input.length + " bytes ..."); - return new String(input).toUpperCase().getBytes(); - } - -} diff --git a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/TextFileCopyDemo.java b/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/TextFileCopyDemo.java deleted file mode 100644 index 67d09dec7a..0000000000 --- a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/TextFileCopyDemo.java +++ /dev/null @@ -1,37 +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.samples.filecopy; - -import org.springframework.context.ApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; - -/** - * Demonstrating the file copy scenario using text-based source and target. - * See the 'fileCopyDemo-text.xml' configuration file for details. - * - * @author Mark Fisher - * @author Marius Bogoevici - */ -public class TextFileCopyDemo { - - public static void main(String[] args) { - ApplicationContext context = new ClassPathXmlApplicationContext("fileCopyDemo-text.xml", TextFileCopyDemo.class); - FileCopyDemoCommon.displayDirectories(context); - } - -} - diff --git a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/fileCopyDemo-binary.xml b/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/fileCopyDemo-binary.xml deleted file mode 100644 index 0a931d2977..0000000000 --- a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/fileCopyDemo-binary.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/fileCopyDemo-file.xml b/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/fileCopyDemo-file.xml deleted file mode 100644 index e38e27abc5..0000000000 --- a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/fileCopyDemo-file.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/fileCopyDemo-text.xml b/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/fileCopyDemo-text.xml deleted file mode 100644 index ac5302c04b..0000000000 --- a/spring-integration-samples/filecopy/src/main/java/org/springframework/integration/samples/filecopy/fileCopyDemo-text.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/helloworld/.classpath b/spring-integration-samples/helloworld/.classpath deleted file mode 100644 index 16f01e2ee7..0000000000 --- a/spring-integration-samples/helloworld/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/spring-integration-samples/helloworld/.project b/spring-integration-samples/helloworld/.project deleted file mode 100644 index dea589e1ba..0000000000 --- a/spring-integration-samples/helloworld/.project +++ /dev/null @@ -1,35 +0,0 @@ - - - helloworld - - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.springframework.ide.eclipse.core.springnature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - org.eclipse.wst.common.project.facet.core.nature - - diff --git a/spring-integration-samples/helloworld/README.txt b/spring-integration-samples/helloworld/README.txt deleted file mode 100644 index f46df4fa66..0000000000 --- a/spring-integration-samples/helloworld/README.txt +++ /dev/null @@ -1,9 +0,0 @@ -Instructions for running the HelloWorldDemo sample -------------------------------------------------------------------------------- -1. See README.txt in the parent directory. - -2. To run this sample as a standalone application simply execute the - HelloWorldDemo class that is located within the - org.springframework.integration.samples.helloworld package. - -Happy integration :-) diff --git a/spring-integration-samples/helloworld/pom.xml b/spring-integration-samples/helloworld/pom.xml deleted file mode 100644 index 8ee01e01a1..0000000000 --- a/spring-integration-samples/helloworld/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - - helloworld - Spring Integration Hello World Sample - - - - ${basedir}/src/main/java - - **/*.xml - - - - false - ${basedir}/src/main/resources - - META-INF/spring/*.xml - - - - - - - org.springframework.integration - spring-integration-core - - - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - diff --git a/spring-integration-samples/helloworld/src/main/java/log4j.xml b/spring-integration-samples/helloworld/src/main/java/log4j.xml deleted file mode 100644 index 3865c97d90..0000000000 --- a/spring-integration-samples/helloworld/src/main/java/log4j.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloService.java b/spring-integration-samples/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloService.java deleted file mode 100644 index a8f76a8c03..0000000000 --- a/spring-integration-samples/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloService.java +++ /dev/null @@ -1,30 +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.samples.helloworld; - -/** - * Simple POJO to be referenced from a Service Activator. - * - * @author Mark Fisher - */ -public class HelloService { - - public String sayHello(String name) { - return "Hello " + name; - } - -} diff --git a/spring-integration-samples/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloWorldDemo.java b/spring-integration-samples/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloWorldDemo.java deleted file mode 100644 index f234da4710..0000000000 --- a/spring-integration-samples/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloWorldDemo.java +++ /dev/null @@ -1,49 +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.samples.helloworld; - -import org.springframework.context.support.AbstractApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.core.PollableChannel; -import org.springframework.integration.message.GenericMessage; - -/** - * Demonstrates a basic Message Endpoint that simply prepends a greeting - * ("Hello ") to an inbound String payload from a Message. This is a very - * low-level example, using Message Channels directly for both input and - * output. Notice that the output channel has a queue sub-element. It is - * therefore a PollableChannel and its consumers must invoke receive() as - * demonstrated below. - *

- * View the configuration of the channels and the endpoint (a <service-activator/> - * element) in 'helloWorldDemo.xml' within this same package. - * - * @author Mark Fisher - * @author Oleg Zhurakousky - */ -public class HelloWorldDemo { - - public static void main(String[] args) { - AbstractApplicationContext context = new ClassPathXmlApplicationContext("helloWorldDemo.xml", HelloWorldDemo.class); - MessageChannel inputChannel = context.getBean("inputChannel", MessageChannel.class); - PollableChannel outputChannel = context.getBean("outputChannel", PollableChannel.class); - inputChannel.send(new GenericMessage("World")); - System.out.println("==> HelloWorldDemo: " + outputChannel.receive(0).getPayload()); - } - -} diff --git a/spring-integration-samples/helloworld/src/main/java/org/springframework/integration/samples/helloworld/helloWorldDemo.xml b/spring-integration-samples/helloworld/src/main/java/org/springframework/integration/samples/helloworld/helloWorldDemo.xml deleted file mode 100644 index 0c355f2607..0000000000 --- a/spring-integration-samples/helloworld/src/main/java/org/springframework/integration/samples/helloworld/helloWorldDemo.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - diff --git a/spring-integration-samples/jms/.classpath b/spring-integration-samples/jms/.classpath deleted file mode 100644 index 24166ba51f..0000000000 --- a/spring-integration-samples/jms/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/spring-integration-samples/jms/.project b/spring-integration-samples/jms/.project deleted file mode 100644 index f21c4696a1..0000000000 --- a/spring-integration-samples/jms/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - jms - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/spring-integration-samples/jms/README.txt b/spring-integration-samples/jms/README.txt deleted file mode 100644 index 4a60dcf3c7..0000000000 --- a/spring-integration-samples/jms/README.txt +++ /dev/null @@ -1,9 +0,0 @@ -Instructions for running the HelloWorldDemo sample -------------------------------------------------------------------------------- -1. See README.txt in the parent directory. - -This demo consists of two samples, ChannelAdapterDemo and GatewayDemo. -PLease see the corresponding javadocs for more details on each sample. - - -Happy integration :-) diff --git a/spring-integration-samples/jms/pom.xml b/spring-integration-samples/jms/pom.xml deleted file mode 100644 index 790df4b475..0000000000 --- a/spring-integration-samples/jms/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - - jms - Spring Integration JMS Sample - - - org.apache.activemq - activemq-core - 5.2.0 - - - org.springframework.integration - spring-integration-jms - - - org.springframework.integration - spring-integration-stream - - - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - diff --git a/spring-integration-samples/jms/src/main/java/log4j.xml b/spring-integration-samples/jms/src/main/java/log4j.xml deleted file mode 100644 index a54abb801d..0000000000 --- a/spring-integration-samples/jms/src/main/java/log4j.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/ActiveMqTestUtils.java b/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/ActiveMqTestUtils.java deleted file mode 100644 index 02f978f24f..0000000000 --- a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/ActiveMqTestUtils.java +++ /dev/null @@ -1,46 +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.samples.jms; - -import java.io.File; - -/** - * @author Oleg Zhurakousky - * - */ -public class ActiveMqTestUtils { - - public static void prepare() { - System.out.println("####### Refreshing ActiveMq ########"); - File activeMqTempDir = new File("activemq-data"); - deleteDir(activeMqTempDir); - - } - /* - * - */ - private static void deleteDir(File directory){ - if (directory.exists()){ - String[] children = directory.list(); - if (children != null){ - for (int i=0; i < children.length; i++) { - deleteDir(new File(directory, children[i])); - } - } - } - directory.delete(); - } -} diff --git a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java b/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java deleted file mode 100644 index 589f90f4d1..0000000000 --- a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java +++ /dev/null @@ -1,44 +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.samples.jms; - -import org.springframework.context.support.ClassPathXmlApplicationContext; - -/** - * A simple bootstrap main() method for starting a pair of JMS Channel - * Adapters. Text entered in the console will go through an outbound - * JMS Channel Adapter from which it is sent to a JMS Destination. - * An inbound JMS Channel Adapter is listening to that same JMS - * Destination and will echo the result in the console. - *

- * See the configuration in the three XML files that are referenced below. - * - * @author Mark Fisher - */ -public class ChannelAdapterDemo { - - private final static String[] configFiles = { - "common.xml", "inboundChannelAdapter.xml", "outboundChannelAdapter.xml" - }; - - - public static void main(String[] args) { - ActiveMqTestUtils.prepare(); - new ClassPathXmlApplicationContext(configFiles, ChannelAdapterDemo.class); - } - -} diff --git a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/DemoBean.java b/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/DemoBean.java deleted file mode 100644 index b19127a7af..0000000000 --- a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/DemoBean.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.samples.jms; - -import org.springframework.integration.annotation.MessageEndpoint; -import org.springframework.integration.annotation.ServiceActivator; - -/** - * @author Mark Fisher - */ -@MessageEndpoint -public class DemoBean { - - @ServiceActivator - public String upperCase(String input) { - return input.toUpperCase(); - } - -} diff --git a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/GatewayDemo.java b/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/GatewayDemo.java deleted file mode 100644 index 35a6022eaf..0000000000 --- a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/GatewayDemo.java +++ /dev/null @@ -1,47 +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.samples.jms; - -import org.springframework.context.support.ClassPathXmlApplicationContext; - -/** - * A simple bootstrap main() method for starting a pair of JMS Gateways. - * Text entered in the console will go through an outbound JMS Gateway from - * which it is sent to a JMS Destination. An inbound JMS Gateway is listening - * to that same JMS Destination and will send the text to another Spring - * Integration channel where it is handled by a service that simply converts - * the text to upper case. The upper-case result is then sent in a response - * message over JMS so that the outbound Gateway receives it as the reply to - * its original request. At that point, the text is logged to the console. - *

- * See the configuration in the three XML files that are referenced below. - * - * @author Mark Fisher - */ -public class GatewayDemo { - - private final static String[] configFiles = { - "common.xml", "inboundGateway.xml", "outboundGateway.xml" - }; - - - public static void main(String[] args) { - ActiveMqTestUtils.prepare(); - new ClassPathXmlApplicationContext(configFiles, GatewayDemo.class); - } - -} diff --git a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/common.xml b/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/common.xml deleted file mode 100644 index 0d9c717f25..0000000000 --- a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/common.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/inboundChannelAdapter.xml b/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/inboundChannelAdapter.xml deleted file mode 100644 index 898441c00c..0000000000 --- a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/inboundChannelAdapter.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - diff --git a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/inboundGateway.xml b/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/inboundGateway.xml deleted file mode 100644 index 5fa49455b4..0000000000 --- a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/inboundGateway.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - diff --git a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/outboundChannelAdapter.xml b/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/outboundChannelAdapter.xml deleted file mode 100644 index 33d5b920c9..0000000000 --- a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/outboundChannelAdapter.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - diff --git a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/outboundGateway.xml b/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/outboundGateway.xml deleted file mode 100644 index 3f282ad62d..0000000000 --- a/spring-integration-samples/jms/src/main/java/org/springframework/integration/samples/jms/outboundGateway.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - diff --git a/spring-integration-samples/jmx/.classpath b/spring-integration-samples/jmx/.classpath deleted file mode 100644 index 16f01e2ee7..0000000000 --- a/spring-integration-samples/jmx/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/spring-integration-samples/jmx/.project b/spring-integration-samples/jmx/.project deleted file mode 100644 index 2b917559c3..0000000000 --- a/spring-integration-samples/jmx/.project +++ /dev/null @@ -1,29 +0,0 @@ - - - jmx - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.springframework.ide.eclipse.core.springnature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/spring-integration-samples/jmx/pom.xml b/spring-integration-samples/jmx/pom.xml deleted file mode 100644 index 31f4e1713e..0000000000 --- a/spring-integration-samples/jmx/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - - jmx - Spring Integration JMX Sample - - - org.springframework.integration - spring-integration-jmx - - - org.springframework.integration - spring-integration-stream - - - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - diff --git a/spring-integration-samples/jmx/src/main/java/log4j.xml b/spring-integration-samples/jmx/src/main/java/log4j.xml deleted file mode 100644 index a01d5446a0..0000000000 --- a/spring-integration-samples/jmx/src/main/java/log4j.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/jmx/src/main/java/org/springframework/integration/samples/jmx/JmxAdapterDemo-context.xml b/spring-integration-samples/jmx/src/main/java/org/springframework/integration/samples/jmx/JmxAdapterDemo-context.xml deleted file mode 100644 index e3aceb8a70..0000000000 --- a/spring-integration-samples/jmx/src/main/java/org/springframework/integration/samples/jmx/JmxAdapterDemo-context.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/jmx/src/main/java/org/springframework/integration/samples/jmx/JmxAdapterDemo.java b/spring-integration-samples/jmx/src/main/java/org/springframework/integration/samples/jmx/JmxAdapterDemo.java deleted file mode 100644 index 74ad3ff4ba..0000000000 --- a/spring-integration-samples/jmx/src/main/java/org/springframework/integration/samples/jmx/JmxAdapterDemo.java +++ /dev/null @@ -1,32 +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.samples.jmx; - -import org.springframework.context.support.ClassPathXmlApplicationContext; - -/** - * @author Mark Fisher - * @since 2.0 - */ -public class JmxAdapterDemo { - - public static void main(String[] args) { - new ClassPathXmlApplicationContext( - "JmxAdapterDemo-context.xml", JmxAdapterDemo.class); - } - -} diff --git a/spring-integration-samples/jmx/src/main/java/org/springframework/integration/samples/jmx/StopWatch.java b/spring-integration-samples/jmx/src/main/java/org/springframework/integration/samples/jmx/StopWatch.java deleted file mode 100644 index a431a579ac..0000000000 --- a/spring-integration-samples/jmx/src/main/java/org/springframework/integration/samples/jmx/StopWatch.java +++ /dev/null @@ -1,72 +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.samples.jmx; - -import java.util.concurrent.Future; -import java.util.concurrent.atomic.AtomicInteger; - -import org.springframework.beans.factory.InitializingBean; -import org.springframework.jmx.export.annotation.ManagedAttribute; -import org.springframework.jmx.export.annotation.ManagedOperation; -import org.springframework.jmx.export.annotation.ManagedResource; -import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; -import org.springframework.stereotype.Component; - -/** - * @author Mark Fisher - * @since 2.0 - */ -@Component -@ManagedResource -public class StopWatch implements InitializingBean { - - private final ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler(); - - private volatile Future future; - - private final AtomicInteger seconds = new AtomicInteger(); - - @ManagedAttribute - public int getSeconds() { - return this.seconds.get(); - } - - public void afterPropertiesSet() { - this.start(); - } - - @ManagedOperation - public void start() { - this.scheduler.initialize(); - this.future = this.scheduler.scheduleAtFixedRate(new Runnable() { - public void run() { - seconds.incrementAndGet(); - } - }, 1000); - } - - @ManagedOperation - public void stop() { - this.future.cancel(true); - } - - @ManagedOperation - public void reset() { - this.seconds.set(0); - } - -} diff --git a/spring-integration-samples/loan-broker/.classpath b/spring-integration-samples/loan-broker/.classpath deleted file mode 100644 index f42fb64cfa..0000000000 --- a/spring-integration-samples/loan-broker/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/spring-integration-samples/loan-broker/.project b/spring-integration-samples/loan-broker/.project deleted file mode 100644 index 7b2c933859..0000000000 --- a/spring-integration-samples/loan-broker/.project +++ /dev/null @@ -1,29 +0,0 @@ - - - loan-broker - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.springframework.ide.eclipse.core.springnature - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/spring-integration-samples/loan-broker/README.txt b/spring-integration-samples/loan-broker/README.txt deleted file mode 100644 index 5ea330f0ea..0000000000 --- a/spring-integration-samples/loan-broker/README.txt +++ /dev/null @@ -1,45 +0,0 @@ -The Loan Broker sample is distributed as a valid Eclipse/Maven project, so you can run it in two ways. - -Maven (command line): -1. Execute 'mvn install' - You should see output that looks similar to this: - . . . . . - INFO : org.springframework.integration.loanbroker.demo.LoanBrokerDemo - - ********* Best Quote: - ====== Loan Quote ===== - Lender: StubBank-11 - Loan amount: $270,279 - Quotation Date: Fri Mar 12 02:19:35 EST 2010 - Expiration Date: Tue Mar 16 02:19:35 EDT 2010 - Term: 17 years - Rate: 5.9092593% - ======================= - . . . . . - -Eclipse/STS (with m2eclipse plug-in) -1. Import project into Eclipse/STS. If the m2eclipse plugin is installed, the dependencies will be downloaded automatically. -2. Run the 'org.springframework.integration.loanbroker.demo.LoanBrokerDemo' class located in 'src/test/java'. - - -Loan Shark Extension -==================== - -This extension to the loan broker sample shows how to exchange messages between Spring Integration -applications (and other technologies) using UDP. - -Any loan quotes over 5.2% will be sent to the loanshark application. - -Deploy the loanshark sample in a web container (e.g. mvn tomcat:run); or run the perl (udps.pl) -or groovy (udps.groovy) scripts from the command line. - -Run the LoanBrokerSharkDetectorDemo test case. - -You can see the banks that were detected as loan sharks in the loanshark web UI. - -If you use multicast (the default), messages will be received by the Roo UI war, the perl script, -and the groovy script. If not using multicast, only one of the receivers can be used. - -To change from multicast to unicast, change the udpOut adapter in shark-detector-config.xml to set -'host' to "localhost" and multicast to "false". Refer to the ReadMe in loanshark to change it -from multicast to unicast for either the Roo application or the groovy script. - diff --git a/spring-integration-samples/loan-broker/pom.xml b/spring-integration-samples/loan-broker/pom.xml deleted file mode 100644 index 3312671297..0000000000 --- a/spring-integration-samples/loan-broker/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - - loan-broker - Spring Integration Loan Broker Sample - - - commons-logging - commons-logging - - - log4j - log4j - ${log4j.version} - - - org.springframework.integration - spring-integration-ip - - - - junit - junit - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - **/*Demo.java - - - - - - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - diff --git a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/LoanBrokerGateway.java b/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/LoanBrokerGateway.java deleted file mode 100644 index 38820a0914..0000000000 --- a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/LoanBrokerGateway.java +++ /dev/null @@ -1,42 +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.samples.loanbroker; - -import java.util.List; - -import org.springframework.integration.samples.loanbroker.domain.LoanQuote; -import org.springframework.integration.samples.loanbroker.domain.LoanRequest; - -/** - * POJI Gateway that connects method invocations to the request-channel. - * This completely isolates the developer from Spring Integration API details. - * - * @author Oleg Zhurakousky - */ -public interface LoanBrokerGateway { - - /** - * Will return the best {@link LoanQuote} for the given request. - */ - public LoanQuote getBestLoanQuote(LoanRequest loanRequest); - - /** - * Will return all {@link LoanQuote}s for the given request. - */ - public List getAllLoanQuotes(LoanRequest loanRequest); - -} diff --git a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/LoanQuoteAggregator.java b/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/LoanQuoteAggregator.java deleted file mode 100644 index f1f0bed50a..0000000000 --- a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/LoanQuoteAggregator.java +++ /dev/null @@ -1,53 +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.samples.loanbroker; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.springframework.integration.Message; -import org.springframework.integration.samples.loanbroker.domain.LoanQuote; - -/** - * Aggregates {@link LoanQuote}s based on the value of the 'RESPONSE_TYPE' message header. - * When only the best quote is desired, the 'RESPONSE_TYPE' header should have a value - * of 'BEST'. In this example, that value is set by the 'gateway' when the - * {@link LoanBrokerGateway#getBestLoanQuote(org.springframework.integration.samples.loanbroker.domain.LoanRequest)} - * method is invoked by the client. - * - * @author Oleg Zhurakousky - */ -public class LoanQuoteAggregator { - - /** - * Aggregates LoanQuote Messages to return a single reply Message. - * - * @param messages Messages received from upstream lenders. - * @return the best {@link LoanQuote} if the 'RESPONSE_TYPE' header value is 'BEST' else all quotes - */ - public Object aggregateQuotes(List> messages) { - ArrayList payloads = new ArrayList(messages.size()); - for (Message message : messages) { - payloads.add(message.getPayload()); - } - Collections.sort(payloads); - String responseType = messages.get(0).getHeaders().get("RESPONSE_TYPE", String.class); - return ("BEST".equals(responseType)) ? payloads.get(0) : payloads; - } - -} diff --git a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/Address.java b/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/Address.java deleted file mode 100644 index 11f6fa6f0e..0000000000 --- a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/Address.java +++ /dev/null @@ -1,61 +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.samples.loanbroker.domain; - -/** - * @author Oleg Zhurakousky - */ -public class Address { - - private String street; - private String zip; - private String city; - private String state; - - public String getStreet() { - return street; - } - - public void setStreet(String street) { - this.street = street; - } - - public String getZip() { - return zip; - } - - public void setZip(String zip) { - this.zip = zip; - } - - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - -} diff --git a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/CreditScore.java b/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/CreditScore.java deleted file mode 100644 index a026ee8d9f..0000000000 --- a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/CreditScore.java +++ /dev/null @@ -1,43 +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.samples.loanbroker.domain; - -/** - * @author Oleg Zhurakousky - */ -public class CreditScore { - - private final int score; - private String creditHistory; - - public CreditScore(int score){ - this.score = score; - } - - public String getCreditHistory() { - return creditHistory; - } - - public void setCreditHistory(String creditHistory) { - this.creditHistory = creditHistory; - } - - public int getScore() { - return score; - } - -} diff --git a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/Customer.java b/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/Customer.java deleted file mode 100644 index 6cc11247b3..0000000000 --- a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/Customer.java +++ /dev/null @@ -1,52 +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.samples.loanbroker.domain; - -/** - * @author Oleg Zhurakousky - */ -public class Customer { - - private String firstName; - private String lastName; - private Address address; - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public Address getAddress() { - return address; - } - - public void setAddress(Address address) { - this.address = address; - } - -} diff --git a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/LoanQuote.java b/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/LoanQuote.java deleted file mode 100644 index 4c687b3afc..0000000000 --- a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/LoanQuote.java +++ /dev/null @@ -1,103 +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.samples.loanbroker.domain; - -import java.text.DecimalFormat; -import java.util.Date; - -/** - * @author Oleg Zhurakousky - */ -public class LoanQuote implements Comparable{ - - private String lender; - private Date quoteDate; - private Date expirationDate; - private double amount; - private int term; - private float rate; - - public String getLender() { - return lender; - } - - public void setLender(String lender) { - this.lender = lender; - } - - public Date getQuoteDate() { - return quoteDate; - } - - public void setQuoteDate(Date quoteDate) { - this.quoteDate = quoteDate; - } - - public Date getExpirationDate() { - return expirationDate; - } - - public void setExpirationDate(Date expirationDate) { - this.expirationDate = expirationDate; - } - - public double getAmount() { - return amount; - } - - public void setAmount(double amount) { - this.amount = amount; - } - - public int getTerm() { - return term; - } - - public void setTerm(int term) { - this.term = term; - } - - public float getRate() { - return rate; - } - - public void setRate(float rate) { - this.rate = rate; - } - - public String toString(){ - return "\n====== Loan Quote =====\n" + - "Lender: " + this.lender + "\n" + - "Loan amount: " + new DecimalFormat("$###,###.###").format(this.amount) + "\n" + - "Quote Date: " + this.quoteDate + "\n" + - "Expiration Date: " + this.expirationDate + "\n" + - "Term: " + this.term + " years" + "\n" + - "Rate: " + this.rate + "%\n" + - "=======================\n"; - } - - public int compareTo(LoanQuote other) { - if (this.rate > other.rate) { - return 1; - } - else if (this.rate < other.rate) { - return -1; - } - return 0; - } - -} diff --git a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/LoanRequest.java b/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/LoanRequest.java deleted file mode 100644 index e77667d46a..0000000000 --- a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/domain/LoanRequest.java +++ /dev/null @@ -1,43 +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.samples.loanbroker.domain; - -/** - * @author Oleg Zhurakousky - */ -public class LoanRequest { - - private Customer customer; - private float loanAmount; - - public Customer getCustomer() { - return customer; - } - - public void setCustomer(Customer customer) { - this.customer = customer; - } - - public float getLoanAmount() { - return loanAmount; - } - - public void setLoanAmount(float loanAmount) { - this.loanAmount = loanAmount; - } - -} diff --git a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/stubs/BankStub.java b/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/stubs/BankStub.java deleted file mode 100644 index 3ba62a5e8a..0000000000 --- a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/stubs/BankStub.java +++ /dev/null @@ -1,48 +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.samples.loanbroker.stubs; - -import java.util.Calendar; -import java.util.Random; - -import org.springframework.integration.samples.loanbroker.domain.LoanQuote; -import org.springframework.integration.samples.loanbroker.domain.LoanRequest; - -/** - * @author Oleg Zhurakousky - */ -public class BankStub { - - /** - * @param loanRequest the loan request - * @return a LoanQuote for the given request - */ - public LoanQuote quote(LoanRequest loanRequest) { - Calendar calendar = Calendar.getInstance(); - LoanQuote loanQuote = new LoanQuote(); - Random random = new Random(); - loanQuote.setQuoteDate(calendar.getTime()); - calendar.add(Calendar.DAY_OF_YEAR, random.nextInt(25)); - loanQuote.setExpirationDate(calendar.getTime()); - loanQuote.setRate(random.nextFloat() + 5); - loanQuote.setTerm(10 + random.nextInt(10)); - loanQuote.setAmount(250000 + random.nextInt(40000)); - loanQuote.setLender("StubBank-" + random.nextInt(30)); - return loanQuote; - } - -} diff --git a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/stubs/CreditBureauStub.java b/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/stubs/CreditBureauStub.java deleted file mode 100644 index 1a8dd015b7..0000000000 --- a/spring-integration-samples/loan-broker/src/main/java/org/springframework/integration/samples/loanbroker/stubs/CreditBureauStub.java +++ /dev/null @@ -1,44 +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.samples.loanbroker.stubs; - -import java.util.Random; - -import org.apache.log4j.Logger; - -import org.springframework.integration.samples.loanbroker.domain.CreditScore; -import org.springframework.integration.samples.loanbroker.domain.LoanRequest; - -/** - * @author Oleg Zhurakousky - */ -public class CreditBureauStub { - - private static Logger logger = Logger.getLogger(CreditBureauStub.class); - - /** - * @param loanRequest the loan request - * @return the CreditScore for the given loan request - */ - public CreditScore getCreditScore(LoanRequest loanRequest){ - Random random = new Random(); - int creditScore = 700 + random.nextInt(150); - logger.info("Credit Score: " + creditScore); - return new CreditScore(creditScore); - } - -} diff --git a/spring-integration-samples/loan-broker/src/main/resources/bank-channel-mappings-config.xml b/spring-integration-samples/loan-broker/src/main/resources/bank-channel-mappings-config.xml deleted file mode 100644 index 8269ec2f9e..0000000000 --- a/spring-integration-samples/loan-broker/src/main/resources/bank-channel-mappings-config.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - diff --git a/spring-integration-samples/loan-broker/src/main/resources/bootstrap-config/stubbed-loan-broker-multicast.xml b/spring-integration-samples/loan-broker/src/main/resources/bootstrap-config/stubbed-loan-broker-multicast.xml deleted file mode 100644 index bb8b2142da..0000000000 --- a/spring-integration-samples/loan-broker/src/main/resources/bootstrap-config/stubbed-loan-broker-multicast.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/spring-integration-samples/loan-broker/src/main/resources/bootstrap-config/stubbed-loan-broker.xml b/spring-integration-samples/loan-broker/src/main/resources/bootstrap-config/stubbed-loan-broker.xml deleted file mode 100644 index 5a0ddf442a..0000000000 --- a/spring-integration-samples/loan-broker/src/main/resources/bootstrap-config/stubbed-loan-broker.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - diff --git a/spring-integration-samples/loan-broker/src/main/resources/loan-broker-config.xml b/spring-integration-samples/loan-broker/src/main/resources/loan-broker-config.xml deleted file mode 100644 index 55055a27f0..0000000000 --- a/spring-integration-samples/loan-broker/src/main/resources/loan-broker-config.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - -

- - - - - -
- - - - - - - - - - - diff --git a/spring-integration-samples/loan-broker/src/main/resources/shark-detector-config.xml b/spring-integration-samples/loan-broker/src/main/resources/shark-detector-config.xml deleted file mode 100644 index 1edbaf8852..0000000000 --- a/spring-integration-samples/loan-broker/src/main/resources/shark-detector-config.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/loan-broker/src/main/resources/stub-services-config.xml b/spring-integration-samples/loan-broker/src/main/resources/stub-services-config.xml deleted file mode 100644 index da82045522..0000000000 --- a/spring-integration-samples/loan-broker/src/main/resources/stub-services-config.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/loan-broker/src/test/java/org/springframework/integration/samples/loanbroker/demo/LoanBrokerDemo.java b/spring-integration-samples/loan-broker/src/test/java/org/springframework/integration/samples/loanbroker/demo/LoanBrokerDemo.java deleted file mode 100644 index bf3f39181e..0000000000 --- a/spring-integration-samples/loan-broker/src/test/java/org/springframework/integration/samples/loanbroker/demo/LoanBrokerDemo.java +++ /dev/null @@ -1,57 +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.samples.loanbroker.demo; - -import java.util.List; - -import org.apache.log4j.Logger; -import org.junit.Test; - -import org.springframework.context.ApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.samples.loanbroker.LoanBrokerGateway; -import org.springframework.integration.samples.loanbroker.domain.Customer; -import org.springframework.integration.samples.loanbroker.domain.LoanQuote; -import org.springframework.integration.samples.loanbroker.domain.LoanRequest; - -/** - * @author Oleg Zhurakousky - */ -public class LoanBrokerDemo { - - private static Logger logger = Logger.getLogger(LoanBrokerDemo.class); - - public static void main(String[] args) { - new LoanBrokerDemo().runDemo(); - } - - @Test - public void runDemo() { - ApplicationContext context = new ClassPathXmlApplicationContext("bootstrap-config/stubbed-loan-broker.xml"); - LoanBrokerGateway broker = context.getBean("loanBrokerGateway", LoanBrokerGateway.class); - LoanRequest loanRequest = new LoanRequest(); - loanRequest.setCustomer(new Customer()); - LoanQuote loan = broker.getBestLoanQuote(loanRequest); - logger.info("\n********* Best Quote: " + loan); - List loanQuotes = broker.getAllLoanQuotes(loanRequest); - logger.info("\n********* All Quotes: "); - for (LoanQuote loanQuote : loanQuotes) { - logger.info(loanQuote); - } - } - -} diff --git a/spring-integration-samples/loan-broker/src/test/java/org/springframework/integration/samples/loanbroker/demo/LoanBrokerSharkDetectorDemo.java b/spring-integration-samples/loan-broker/src/test/java/org/springframework/integration/samples/loanbroker/demo/LoanBrokerSharkDetectorDemo.java deleted file mode 100644 index baaa84f696..0000000000 --- a/spring-integration-samples/loan-broker/src/test/java/org/springframework/integration/samples/loanbroker/demo/LoanBrokerSharkDetectorDemo.java +++ /dev/null @@ -1,54 +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.samples.loanbroker.demo; - -import java.util.List; - -import org.apache.log4j.Logger; -import org.junit.Test; - -import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.samples.loanbroker.LoanBrokerGateway; -import org.springframework.integration.samples.loanbroker.domain.Customer; -import org.springframework.integration.samples.loanbroker.domain.LoanQuote; -import org.springframework.integration.samples.loanbroker.domain.LoanRequest; - -/** - * @author Gary Russell - */ -public class LoanBrokerSharkDetectorDemo { - - private static Logger logger = Logger.getLogger(LoanBrokerSharkDetectorDemo.class); - - @Test - public void testUdpMulticast() { - ConfigurableApplicationContext context = - new ClassPathXmlApplicationContext("bootstrap-config/stubbed-loan-broker-multicast.xml"); - LoanBrokerGateway broker = context.getBean("loanBrokerGateway", LoanBrokerGateway.class); - LoanRequest loanRequest = new LoanRequest(); - loanRequest.setCustomer(new Customer()); - LoanQuote loan = broker.getBestLoanQuote(loanRequest); - logger.info("\n********* Best Quote: " + loan); - List loanQuotes = broker.getAllLoanQuotes(loanRequest); - logger.info("\n********* All Quotes: "); - for (LoanQuote loanQuote : loanQuotes) { - logger.info(loanQuote); - } - } - -} diff --git a/spring-integration-samples/loan-broker/src/test/resources/log4j.xml b/spring-integration-samples/loan-broker/src/test/resources/log4j.xml deleted file mode 100644 index 64f525ef1a..0000000000 --- a/spring-integration-samples/loan-broker/src/test/resources/log4j.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/loanshark/.classpath b/spring-integration-samples/loanshark/.classpath deleted file mode 100644 index 96b3a2395f..0000000000 --- a/spring-integration-samples/loanshark/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/spring-integration-samples/loanshark/.project b/spring-integration-samples/loanshark/.project deleted file mode 100644 index 5e568f1c85..0000000000 --- a/spring-integration-samples/loanshark/.project +++ /dev/null @@ -1,53 +0,0 @@ - - - loanshark - - - - - - org.eclipse.ajdt.core.ajbuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.ajdt.core.ajbuilder - - - aspectPath - org.springframework.aspects - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.maven.ide.eclipse.maven2Nature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.ajdt.ui.ajnature - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - com.springsource.sts.roo.core.nature - org.springframework.ide.eclipse.core.springnature - - diff --git a/spring-integration-samples/loanshark/.settings/org.eclipse.jdt.core.prefs b/spring-integration-samples/loanshark/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 6d90c2c344..0000000000 --- a/spring-integration-samples/loanshark/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Tue Sep 07 17:11:57 EDT 2010 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.source=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 diff --git a/spring-integration-samples/loanshark/.settings/org.eclipse.wst.common.component b/spring-integration-samples/loanshark/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 40187a0f1c..0000000000 --- a/spring-integration-samples/loanshark/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - uses - - - - - diff --git a/spring-integration-samples/loanshark/.settings/org.eclipse.wst.common.project.facet.core.xml b/spring-integration-samples/loanshark/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index bc40bcf886..0000000000 --- a/spring-integration-samples/loanshark/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/loanshark/.settings/org.springframework.ide.eclipse.beans.core.prefs b/spring-integration-samples/loanshark/.settings/org.springframework.ide.eclipse.beans.core.prefs deleted file mode 100644 index b3e45991ef..0000000000 --- a/spring-integration-samples/loanshark/.settings/org.springframework.ide.eclipse.beans.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Mon Mar 29 11:51:49 EDT 2010 -eclipse.preferences.version=1 -org.springframework.ide.eclipse.beans.core.ignoreMissingNamespaceHandler=false -org.springframework.ide.eclipse.beans.core.loadNamespaceHandlerFromClasspath=true diff --git a/spring-integration-samples/loanshark/README.txt b/spring-integration-samples/loanshark/README.txt deleted file mode 100644 index 7e4d88a94e..0000000000 --- a/spring-integration-samples/loanshark/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -See README.txt in loan-broker sample for information about this sample. - -To change the multicast code in udps.groovy to rely on unicast instead, simply -change the MulticastSocket type to DatagramSocket and remove the next 2 lines -that deal with joining the multicast group. Then, in the configuration of the -actual adapter, set: host="127.0.0.1" and multicast="false". - -For the Roo/Spring Integration application, edit the integrationContext.xml -file, on the udpIn adapter, set multicast to false and remove the -multicast-address attribute. \ No newline at end of file diff --git a/spring-integration-samples/loanshark/pom.xml b/spring-integration-samples/loanshark/pom.xml deleted file mode 100644 index 9cf95a57cb..0000000000 --- a/spring-integration-samples/loanshark/pom.xml +++ /dev/null @@ -1,509 +0,0 @@ - - - 4.0.0 - org.springframework.integration.samples - 2.0.0.BUILD-SNAPSHOT - loanshark - Spring Integration Loan Shark Sample - war - - 1.1.0.M3 - 3.0.4.RELEASE - 1.6.10.M1 - 1.6.1 - UTF-8 - - - - spring-maven-release - Spring Maven Release Repository - http://maven.springframework.org/release - - - spring-maven-milestone - Spring Maven Milestone Repository - http://maven.springframework.org/milestone - - - spring-roo-repository - Spring Roo Repository - http://spring-roo-repository.springsource.org/release - - - JBoss Repo - https://repository.jboss.org/nexus/content/repositories/releases - JBoss Repo - - - - - spring-maven-release - Spring Maven Release Repository - http://maven.springframework.org/release - - - spring-maven-milestone - Spring Maven Milestone Repository - http://maven.springframework.org/milestone - - - spring-roo-repository - Spring Roo Repository - http://spring-roo-repository.springsource.org/release - - - - - - junit - junit - 4.8.1 - test - - - log4j - log4j - 1.2.16 - - - org.slf4j - slf4j-api - ${slf4j.version} - - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - - - org.slf4j - slf4j-log4j12 - ${slf4j.version} - - - org.aspectj - aspectjrt - ${aspectj.version} - - - javax.servlet - servlet-api - 2.5 - provided - - - net.sf.flexjson - flexjson - 2.0 - - - - org.springframework.roo - org.springframework.roo.annotations - ${roo.version} - provided - - - - org.springframework - spring-core - ${spring.version} - - - commons-logging - commons-logging - - - - - org.springframework - spring-test - ${spring.version} - test - - - commons-logging - commons-logging - - - - - org.springframework - spring-context - ${spring.version} - - - org.springframework - spring-aop - ${spring.version} - - - org.springframework - spring-aspects - ${spring.version} - - - org.springframework - spring-tx - ${spring.version} - - - org.hsqldb - hsqldb - 2.0.0 - - - org.hibernate - hibernate-core - 3.5.5-Final - - - org.hibernate - hibernate-entitymanager - 3.5.5-Final - - - cglib - cglib - - - dom4j - dom4j - - - - - org.hibernate.javax.persistence - hibernate-jpa-2.0-api - 1.0.0.Final - - - org.hibernate - hibernate-validator - 4.1.0.Final - - - javax.xml.bind - jaxb-api - - - com.sun.xml.bind - jaxb-impl - - - - - javax.validation - validation-api - 1.0.0.GA - - - cglib - cglib-nodep - 2.2 - - - javax.transaction - jta - 1.1 - - - org.springframework - spring-jdbc - ${spring.version} - - - org.springframework - spring-orm - ${spring.version} - - - commons-pool - commons-pool - 1.5.4 - - - commons-logging - commons-logging - - - - - commons-dbcp - commons-dbcp - 1.3 - - - commons-logging - commons-logging - - - commons-pool - commons-pool - - - xerces - xerces - - - xerces - xercesImpl - - - xml-apis - xml-apis - - - - - org.apache.tiles - tiles-core - 2.2.1 - - - commons-logging - commons-logging - - - - - org.apache.tiles - tiles-jsp - 2.2.1 - - - org.springframework - spring-web - ${spring.version} - - - commons-logging - commons-logging - - - - - org.springframework - spring-webmvc - ${spring.version} - - - commons-logging - commons-logging - - - - - org.springframework.webflow - spring-js - 2.1.1.RELEASE - - - org.springframework - spring-beans - - - org.springframework - spring-context - - - org.springframework - spring-core - - - org.springframework - spring-context-support - - - commons-logging - commons-logging - - - - - commons-digester - commons-digester - 2.0 - - - commons-logging - commons-logging - - - - - commons-fileupload - commons-fileupload - 1.2.1 - - - commons-logging - commons-logging - - - - - javax.servlet - jstl - 1.2 - - - javax.el - el-api - 1.0 - provided - - - joda-time - joda-time - 1.6 - - - org.springframework.integration - spring-integration-ip - 2.0.0.M7 - - - - - - org.apache.maven.plugins - maven-war-plugin - 2.1-beta-1 - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.1 - - 1.6 - 1.6 - - - - org.codehaus.mojo - aspectj-maven-plugin - 1.0 - - - - org.aspectj - aspectjrt - ${aspectj.version} - - - org.aspectj - aspectjtools - ${aspectj.version} - - - - - - compile - test-compile - - - - - true - - - org.springframework - spring-aspects - - - 1.6 - 1.6 - - - - org.apache.maven.plugins - maven-resources-plugin - 2.4.2 - - UTF-8 - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.5 - - - **/*_Roo_* - - - - - org.apache.maven.plugins - maven-assembly-plugin - 2.2-beta-5 - - - jar-with-dependencies - - - - - org.apache.maven.plugins - maven-deploy-plugin - 2.5 - - - - org.apache.maven.plugins - maven-eclipse-plugin - 2.7 - - true - false - 2.0 - - - org.eclipse.ajdt.core.ajbuilder - - org.springframework.aspects - - - - org.springframework.ide.eclipse.core.springbuilder - - - - org.eclipse.ajdt.ui.ajnature - com.springsource.sts.roo.core.nature - org.springframework.ide.eclipse.core.springnature - - - - - org.apache.maven.plugins - maven-idea-plugin - 2.2 - - true - true - - - - org.codehaus.mojo - tomcat-maven-plugin - 1.0 - - - org.mortbay.jetty - jetty-maven-plugin - 7.1.2.v20100523 - - - /${project.name} - - - - - - diff --git a/spring-integration-samples/loanshark/script.roo b/spring-integration-samples/loanshark/script.roo deleted file mode 100644 index c67794dea0..0000000000 --- a/spring-integration-samples/loanshark/script.roo +++ /dev/null @@ -1,12 +0,0 @@ -project --topLevelPackage org.springframework.samples.integration.loanbroker.loanshark3 -persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY -entity --class ~.domain.LoanShark -field string --fieldName name -field number --type java.lang.Long --fieldName counter -field number --type java.lang.Double --fieldName averageRate -finder add --finderName findLoanSharksByName -controller scaffold --class ~.web.SharkController -logging setup --level DEBUG -dependency add --artifactId org.springframework.integration.ip --groupId org.springframework.integration --version 2.0.0.M5 -//change spring version in pom.xml to 3.0.0.RELEASE-A before perform eclipse -//perform eclipse diff --git a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/biz/Accumulator.java b/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/biz/Accumulator.java deleted file mode 100644 index e247371738..0000000000 --- a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/biz/Accumulator.java +++ /dev/null @@ -1,50 +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.samples.loanbroker.loanshark.biz; - -import org.springframework.dao.DataAccessException; -import org.springframework.integration.samples.loanbroker.loanshark.domain.LoanShark; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - - -/** - * @author Gary Russell - * - */ -@Service -public class Accumulator { - - @Transactional - public void accumulate(SharkQuote quote) { - LoanShark shark = null; - try { - shark = (LoanShark) LoanShark.findLoanSharksByName( - quote.getSharkName()).getSingleResult(); - } catch (DataAccessException dae) {} - if (shark == null) { - shark = new LoanShark(); - shark.setName(quote.getSharkName()); - shark.setCounter(new Long(0)); - shark.setAverageRate(0.0d); - shark.persist(); - } - Double current = shark.getCounter() * shark.getAverageRate(); - shark.setCounter(shark.getCounter().longValue() + 1); - shark.setAverageRate((current + quote.getSharkRate()) / shark.getCounter()); - } - -} diff --git a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/biz/SharkQuote.java b/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/biz/SharkQuote.java deleted file mode 100644 index 045b69ed95..0000000000 --- a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/biz/SharkQuote.java +++ /dev/null @@ -1,59 +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.samples.loanbroker.loanshark.biz; - -/** - * @author Gary Russell - * - */ -public class SharkQuote { - private String sharkName; - private Double sharkRate; - - /** - * @param sharkName - * @param sharkRate - */ - public SharkQuote(String sharkName, double sharkRate) { - super(); - this.sharkName = sharkName; - this.sharkRate = sharkRate; - } - /** - * @return the sharkName - */ - public String getSharkName() { - return sharkName; - } - /** - * @param sharkName the sharkName to set - */ - public void setSharkName(String sharkName) { - this.sharkName = sharkName; - } - /** - * @return the sharkRate - */ - public Double getSharkRate() { - return sharkRate; - } - /** - * @param sharkRate the sharkRate to set - */ - public void setSharkRate(Double sharkRate) { - this.sharkRate = sharkRate; - } -} diff --git a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/biz/SharkTransformer.java b/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/biz/SharkTransformer.java deleted file mode 100644 index b8ccf0655f..0000000000 --- a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/biz/SharkTransformer.java +++ /dev/null @@ -1,28 +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.samples.loanbroker.loanshark.biz; - -/** - * @author Gary Russell - * - */ -public class SharkTransformer { - - public SharkQuote transform(byte[] buffer) { - String[] data = new String(buffer).split(","); - return new SharkQuote(data[0], Double.parseDouble(data[1])); - } -} diff --git a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark.java b/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark.java deleted file mode 100644 index 470cffa856..0000000000 --- a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.springframework.integration.samples.loanbroker.loanshark.domain; - -import javax.persistence.Entity; -import org.springframework.roo.addon.javabean.RooJavaBean; -import org.springframework.roo.addon.tostring.RooToString; -import org.springframework.roo.addon.entity.RooEntity; - -@Entity -@RooJavaBean -@RooToString -@RooEntity(finders = { "findLoanSharksByName" }) -public class LoanShark { - - private String name; - - private Long counter; - - private Double averageRate; -} diff --git a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Configurable.aj b/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Configurable.aj deleted file mode 100644 index 779eb2a8e2..0000000000 --- a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Configurable.aj +++ /dev/null @@ -1,12 +0,0 @@ -// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO. -// You may push code into the target .java compilation unit if you wish to edit any member(s). - -package org.springframework.integration.samples.loanbroker.loanshark.domain; - -import org.springframework.beans.factory.annotation.Configurable; - -privileged aspect LoanShark_Roo_Configurable { - - declare @type: LoanShark: @Configurable; - -} diff --git a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Entity.aj b/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Entity.aj deleted file mode 100644 index 2be0c7b670..0000000000 --- a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Entity.aj +++ /dev/null @@ -1,106 +0,0 @@ -// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO. -// You may push code into the target .java compilation unit if you wish to edit any member(s). - -package org.springframework.integration.samples.loanbroker.loanshark.domain; - -import java.lang.Integer; -import java.lang.Long; -import java.lang.SuppressWarnings; -import java.util.List; -import javax.persistence.Column; -import javax.persistence.EntityManager; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.PersistenceContext; -import javax.persistence.Version; -import org.springframework.integration.samples.loanbroker.loanshark.domain.LoanShark; -import org.springframework.transaction.annotation.Transactional; - -privileged aspect LoanShark_Roo_Entity { - - @PersistenceContext - transient EntityManager LoanShark.entityManager; - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - @Column(name = "id") - private Long LoanShark.id; - - @Version - @Column(name = "version") - private Integer LoanShark.version; - - public Long LoanShark.getId() { - return this.id; - } - - public void LoanShark.setId(Long id) { - this.id = id; - } - - public Integer LoanShark.getVersion() { - return this.version; - } - - public void LoanShark.setVersion(Integer version) { - this.version = version; - } - - @Transactional - public void LoanShark.persist() { - if (this.entityManager == null) this.entityManager = entityManager(); - this.entityManager.persist(this); - } - - @Transactional - public void LoanShark.remove() { - if (this.entityManager == null) this.entityManager = entityManager(); - if (this.entityManager.contains(this)) { - this.entityManager.remove(this); - } else { - LoanShark attached = this.entityManager.find(this.getClass(), this.id); - this.entityManager.remove(attached); - } - } - - @Transactional - public void LoanShark.flush() { - if (this.entityManager == null) this.entityManager = entityManager(); - this.entityManager.flush(); - } - - @Transactional - public LoanShark LoanShark.merge() { - if (this.entityManager == null) this.entityManager = entityManager(); - LoanShark merged = this.entityManager.merge(this); - this.entityManager.flush(); - return merged; - } - - public static final EntityManager LoanShark.entityManager() { - EntityManager em = new LoanShark().entityManager; - if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - return em; - } - - public static long LoanShark.countLoanSharks() { - return ((Number) entityManager().createQuery("select count(o) from LoanShark o").getSingleResult()).longValue(); - } - - @SuppressWarnings("unchecked") - public static List LoanShark.findAllLoanSharks() { - return entityManager().createQuery("select o from LoanShark o").getResultList(); - } - - public static LoanShark LoanShark.findLoanShark(Long id) { - if (id == null) return null; - return entityManager().find(LoanShark.class, id); - } - - @SuppressWarnings("unchecked") - public static List LoanShark.findLoanSharkEntries(int firstResult, int maxResults) { - return entityManager().createQuery("select o from LoanShark o").setFirstResult(firstResult).setMaxResults(maxResults).getResultList(); - } - -} diff --git a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Finder.aj b/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Finder.aj deleted file mode 100644 index f22360c286..0000000000 --- a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Finder.aj +++ /dev/null @@ -1,20 +0,0 @@ -// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO. -// You may push code into the target .java compilation unit if you wish to edit any member(s). - -package org.springframework.integration.samples.loanbroker.loanshark.domain; - -import java.lang.String; -import javax.persistence.EntityManager; -import javax.persistence.Query; - -privileged aspect LoanShark_Roo_Finder { - - public static Query LoanShark.findLoanSharksByName(String name) { - if (name == null || name.length() == 0) throw new IllegalArgumentException("The name argument is required"); - EntityManager em = LoanShark.entityManager(); - Query q = em.createQuery("SELECT LoanShark FROM LoanShark AS loanshark WHERE loanshark.name = :name"); - q.setParameter("name", name); - return q; - } - -} diff --git a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_JavaBean.aj b/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_JavaBean.aj deleted file mode 100644 index 39c983edb2..0000000000 --- a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_JavaBean.aj +++ /dev/null @@ -1,36 +0,0 @@ -// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO. -// You may push code into the target .java compilation unit if you wish to edit any member(s). - -package org.springframework.integration.samples.loanbroker.loanshark.domain; - -import java.lang.Double; -import java.lang.Long; -import java.lang.String; - -privileged aspect LoanShark_Roo_JavaBean { - - public String LoanShark.getName() { - return this.name; - } - - public void LoanShark.setName(String name) { - this.name = name; - } - - public Long LoanShark.getCounter() { - return this.counter; - } - - public void LoanShark.setCounter(Long counter) { - this.counter = counter; - } - - public Double LoanShark.getAverageRate() { - return this.averageRate; - } - - public void LoanShark.setAverageRate(Double averageRate) { - this.averageRate = averageRate; - } - -} diff --git a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Json.aj b/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Json.aj deleted file mode 100644 index 0c9539221b..0000000000 --- a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Json.aj +++ /dev/null @@ -1,32 +0,0 @@ -// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO. -// You may push code into the target .java compilation unit if you wish to edit any member(s). - -package org.springframework.integration.samples.loanbroker.loanshark.domain; - -import flexjson.JSONDeserializer; -import flexjson.JSONSerializer; -import java.lang.String; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import org.springframework.integration.samples.loanbroker.loanshark.domain.LoanShark; - -privileged aspect LoanShark_Roo_Json { - - public String LoanShark.toJson() { - return new JSONSerializer().exclude("*.class").serialize(this); - } - - public static LoanShark LoanShark.fromJsonToLoanShark(String json) { - return new JSONDeserializer().use(null, LoanShark.class).deserialize(json); - } - - public static String LoanShark.toJsonArray(Collection collection) { - return new JSONSerializer().exclude("*.class").serialize(collection); - } - - public static Collection LoanShark.fromJsonArrayToLoanSharks(String json) { - return new JSONDeserializer>().use(null, ArrayList.class).use("values", LoanShark.class).deserialize(json); - } - -} diff --git a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_ToString.aj b/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_ToString.aj deleted file mode 100644 index 9b612b811a..0000000000 --- a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_ToString.aj +++ /dev/null @@ -1,20 +0,0 @@ -// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO. -// You may push code into the target .java compilation unit if you wish to edit any member(s). - -package org.springframework.integration.samples.loanbroker.loanshark.domain; - -import java.lang.String; - -privileged aspect LoanShark_Roo_ToString { - - public String LoanShark.toString() { - StringBuilder sb = new StringBuilder(); - sb.append("Id: ").append(getId()).append(", "); - sb.append("Version: ").append(getVersion()).append(", "); - sb.append("Name: ").append(getName()).append(", "); - sb.append("Counter: ").append(getCounter()).append(", "); - sb.append("AverageRate: ").append(getAverageRate()); - return sb.toString(); - } - -} diff --git a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/web/SharkController.java b/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/web/SharkController.java deleted file mode 100644 index 8d391916d0..0000000000 --- a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/web/SharkController.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.springframework.integration.samples.loanbroker.loanshark.web; - -import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold; -import org.springframework.integration.samples.loanbroker.loanshark.domain.LoanShark; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.stereotype.Controller; - -@RooWebScaffold(path = "loansharks", formBackingObject = LoanShark.class) -@RequestMapping("/loansharks") -@Controller -public class SharkController { -} diff --git a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/web/SharkController_Roo_Controller.aj b/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/web/SharkController_Roo_Controller.aj deleted file mode 100644 index 85a65ad11c..0000000000 --- a/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/web/SharkController_Roo_Controller.aj +++ /dev/null @@ -1,140 +0,0 @@ -// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO. -// You may push code into the target .java compilation unit if you wish to edit any member(s). - -package org.springframework.integration.samples.loanbroker.loanshark.web; - -import java.lang.Long; -import java.lang.String; -import javax.validation.Valid; -import org.springframework.core.convert.converter.Converter; -import org.springframework.core.convert.support.GenericConversionService; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.integration.samples.loanbroker.loanshark.domain.LoanShark; -import org.springframework.ui.Model; -import org.springframework.validation.BindingResult; -import org.springframework.web.bind.WebDataBinder; -import org.springframework.web.bind.annotation.InitBinder; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; - -privileged aspect SharkController_Roo_Controller { - - @RequestMapping(method = RequestMethod.POST) - public String SharkController.create(@Valid LoanShark loanShark, BindingResult result, Model model) { - if (result.hasErrors()) { - model.addAttribute("loanShark", loanShark); - return "loansharks/create"; - } - loanShark.persist(); - return "redirect:/loansharks/" + loanShark.getId(); - } - - @RequestMapping(params = "form", method = RequestMethod.GET) - public String SharkController.createForm(Model model) { - model.addAttribute("loanShark", new LoanShark()); - return "loansharks/create"; - } - - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - public String SharkController.show(@PathVariable("id") Long id, Model model) { - model.addAttribute("loanshark", LoanShark.findLoanShark(id)); - model.addAttribute("itemId", id); - return "loansharks/show"; - } - - @RequestMapping(method = RequestMethod.GET) - public String SharkController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model model) { - if (page != null || size != null) { - int sizeNo = size == null ? 10 : size.intValue(); - model.addAttribute("loansharks", LoanShark.findLoanSharkEntries(page == null ? 0 : (page.intValue() - 1) * sizeNo, sizeNo)); - float nrOfPages = (float) LoanShark.countLoanSharks() / sizeNo; - model.addAttribute("maxPages", (int) ((nrOfPages > (int) nrOfPages || nrOfPages == 0.0) ? nrOfPages + 1 : nrOfPages)); - } else { - model.addAttribute("loansharks", LoanShark.findAllLoanSharks()); - } - return "loansharks/list"; - } - - @RequestMapping(method = RequestMethod.PUT) - public String SharkController.update(@Valid LoanShark loanShark, BindingResult result, Model model) { - if (result.hasErrors()) { - model.addAttribute("loanShark", loanShark); - return "loansharks/update"; - } - loanShark.merge(); - return "redirect:/loansharks/" + loanShark.getId(); - } - - @RequestMapping(value = "/{id}", params = "form", method = RequestMethod.GET) - public String SharkController.updateForm(@PathVariable("id") Long id, Model model) { - model.addAttribute("loanShark", LoanShark.findLoanShark(id)); - return "loansharks/update"; - } - - @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) - public String SharkController.delete(@PathVariable("id") Long id, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model model) { - LoanShark.findLoanShark(id).remove(); - model.addAttribute("page", (page == null) ? "1" : page.toString()); - model.addAttribute("size", (size == null) ? "10" : size.toString()); - return "redirect:/loansharks?page=" + ((page == null) ? "1" : page.toString()) + "&size=" + ((size == null) ? "10" : size.toString()); - } - - @RequestMapping(params = { "find=ByName", "form" }, method = RequestMethod.GET) - public String SharkController.findLoanSharksByNameForm(Model model) { - return "loansharks/findLoanSharksByName"; - } - - @RequestMapping(params = "find=ByName", method = RequestMethod.GET) - public String SharkController.findLoanSharksByName(@RequestParam("name") String name, Model model) { - model.addAttribute("loansharks", LoanShark.findLoanSharksByName(name).getResultList()); - return "loansharks/list"; - } - - Converter SharkController.getLoanSharkConverter() { - return new Converter() { - public String convert(LoanShark loanShark) { - return new StringBuilder().append(loanShark.getName()).append(" ").append(loanShark.getCounter()).append(" ").append(loanShark.getAverageRate()).toString(); - } - }; - } - - @InitBinder - void SharkController.registerConverters(WebDataBinder binder) { - if (binder.getConversionService() instanceof GenericConversionService) { - GenericConversionService conversionService = (GenericConversionService) binder.getConversionService(); - conversionService.addConverter(getLoanSharkConverter()); - } - } - - @RequestMapping(value = "/{id}", method = RequestMethod.GET, headers = "Accept=application/json") - @ResponseBody - public String SharkController.showJson(@PathVariable("id") Long id) { - return LoanShark.findLoanShark(id).toJson(); - } - - @RequestMapping(method = RequestMethod.POST, headers = "Accept=application/json") - public ResponseEntity SharkController.createFromJson(@RequestBody String json) { - LoanShark.fromJsonToLoanShark(json).persist(); - return new ResponseEntity("LoanShark created", HttpStatus.CREATED); - } - - @RequestMapping(headers = "Accept=application/json") - @ResponseBody - public String SharkController.listJson() { - return LoanShark.toJsonArray(LoanShark.findAllLoanSharks()); - } - - @RequestMapping(value = "/jsonArray", method = RequestMethod.POST, headers = "Accept=application/json") - public ResponseEntity SharkController.createFromJsonArray(@RequestBody String json) { - for (LoanShark loanshark: LoanShark.fromJsonArrayToLoanSharks(json)) { - loanshark.persist(); - } - return new ResponseEntity("LoanShark created", HttpStatus.CREATED); - } - -} diff --git a/spring-integration-samples/loanshark/src/main/resources/META-INF/persistence.xml b/spring-integration-samples/loanshark/src/main/resources/META-INF/persistence.xml deleted file mode 100644 index 4eed4a170b..0000000000 --- a/spring-integration-samples/loanshark/src/main/resources/META-INF/persistence.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - org.hibernate.ejb.HibernatePersistence - - - - - - - - diff --git a/spring-integration-samples/loanshark/src/main/resources/META-INF/spring/applicationContext.xml b/spring-integration-samples/loanshark/src/main/resources/META-INF/spring/applicationContext.xml deleted file mode 100644 index df3a201d50..0000000000 --- a/spring-integration-samples/loanshark/src/main/resources/META-INF/spring/applicationContext.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/loanshark/src/main/resources/META-INF/spring/database.properties b/spring-integration-samples/loanshark/src/main/resources/META-INF/spring/database.properties deleted file mode 100644 index 7f9adf6994..0000000000 --- a/spring-integration-samples/loanshark/src/main/resources/META-INF/spring/database.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Updated at Tue Sep 07 17:11:44 EDT 2010 -#Tue Sep 07 17:11:44 EDT 2010 -database.password= -database.url=jdbc\:hsqldb\:mem\:loanshark -database.username=sa -database.driverClassName=org.hsqldb.jdbcDriver diff --git a/spring-integration-samples/loanshark/src/main/resources/META-INF/spring/integrationContext.xml b/spring-integration-samples/loanshark/src/main/resources/META-INF/spring/integrationContext.xml deleted file mode 100644 index e54e0e0a65..0000000000 --- a/spring-integration-samples/loanshark/src/main/resources/META-INF/spring/integrationContext.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - diff --git a/spring-integration-samples/loanshark/src/main/resources/log4j.properties b/spring-integration-samples/loanshark/src/main/resources/log4j.properties deleted file mode 100644 index dcbdb02715..0000000000 --- a/spring-integration-samples/loanshark/src/main/resources/log4j.properties +++ /dev/null @@ -1,12 +0,0 @@ -#Updated at Tue Sep 07 17:11:52 EDT 2010 -#Tue Sep 07 17:11:52 EDT 2010 -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.rootLogger=DEBUG, stdout -log4j.appender.R.File=application.log -log4j.appender.R.MaxFileSize=100KB -log4j.appender.R.layout=org.apache.log4j.PatternLayout -log4j.appender.R.MaxBackupIndex=1 -log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n -log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.R=org.apache.log4j.RollingFileAppender diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/classes/alt.properties b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/classes/alt.properties deleted file mode 100644 index 48df87ff70..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/classes/alt.properties +++ /dev/null @@ -1 +0,0 @@ -styleSheet=resources/styles/alt.css diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/classes/standard.properties b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/classes/standard.properties deleted file mode 100644 index d8dc0164dd..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/classes/standard.properties +++ /dev/null @@ -1 +0,0 @@ -styleSheet=resources/styles/standard.css diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/i18n/application.properties b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/i18n/application.properties deleted file mode 100644 index aadb31fbeb..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/i18n/application.properties +++ /dev/null @@ -1,14 +0,0 @@ -#Updated at Tue Sep 07 17:11:50 EDT 2010 -#Tue Sep 07 17:11:50 EDT 2010 -label_org_springframework_integration_samples_loanbroker_loanshark_domain_loanshark_averagerate=Average Rate -menu_item_loanshark_new_label=Loan Shark -menu_item_loanshark_name_label=Name -label_org_springframework_integration_samples_loanbroker_loanshark_domain_loanshark_version=Version -application_name=Loanshark -label_org_springframework_integration_samples_loanbroker_loanshark_domain_loanshark_name=Name -label_org_springframework_integration_samples_loanbroker_loanshark_domain_loanshark_plural=Loan Sharks -label_org_springframework_integration_samples_loanbroker_loanshark_domain_loanshark=Loan Shark -menu_category_loanshark_label=Loan Shark -label_org_springframework_integration_samples_loanbroker_loanshark_domain_loanshark_id=Id -menu_item_loanshark_list_label=Loan Sharks -label_org_springframework_integration_samples_loanbroker_loanshark_domain_loanshark_counter=Counter diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/i18n/messages.properties b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/i18n/messages.properties deleted file mode 100644 index 41cca5419a..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/i18n/messages.properties +++ /dev/null @@ -1,98 +0,0 @@ -#menu -global_menu_new=Create new {0} -global_menu_list=List all {0} -global_menu_find=Find by {0} -global_language_switch=Switch language to {0} -global_language=Language -global_sponsored=Sponsored by SpringSource -global_theme=Theme -global_theme_alt=alt -global_theme_standard=standard -global_generic={0} - -#welcome page -welcome_titlepane=Welcome to {0} -welcome_h3=Welcome to {0} -welcome_text=Spring Roo provides interactive, lightweight and user customizable tooling that enables rapid delivery of high performance enterprise Java applications. - -#entity labels -entity_list_all=List all {0} -entity_show=Show {0} -entity_create=Create new {0} -entity_update=Update {0} -entity_delete=Delete {0} -entity_find=Find by {0} -entity_not_found=No {0} found. -entity_not_found_single=No {0} found with this id. -entity_dependency_required=The following dependencies need to be created first: -entity_reference_not_managed=This relationship is managed from the {0} side. - -#button labels -button_home=Home -button_save=Save -button_update=Update -button_find=Find -button_cancel=Cancel -button_proceed=Proceed -button_submit=Submit -button_reset=Reset -button_end=End -button_showmessage=Show Message -button_showstacktrace=Show Stack Trace -button_showcookie=Show Cookie - -#field labels -field_simple_validation=Enter {0} {1} -field_invalid_email=Please enter a valid email -field_invalid_number=Number with \\'-\\' or \\'.\\' allowed -field_invalid_integer=Integer numbers only -field_invalid=Please enter valid {0} -field_required=required - -#list labels -list_first=First Page -list_next=Next Page -list_previous=Previous Page -list_last=Last Page -list_page=Page {0} of {1} -list_size=List results per page: - -#selenium -selenium_menu_test_suite=Test Suite - -#exception -exception_message=Exception Message -exception_stacktrace=Exception Stack Trace -exception_cookie=Cookies -exception_details=Details - -#dataAccessFailure_jspx -error_dataaccessfailure_title=Data access failure -error_dataaccessfailure_problemdescription=Sorry, a problem occurred while accessing the database. - -#resourceNotFound_jspx -error_resourcenotfound_title=Requested Resource Not Found -error_resourcenotfound_problemdescription=Sorry, we did not find the resource you were looking for. - -#uncaughtException_jspx -error_uncaughtexception_title=Internal Error -error_uncaughtexception_problemdescription=Sorry, we encountered an internal error. - -#webflow -webflow_menu_enter=Enter {0} WebFlow -webflow_state1_title=Spring WebFlow - View State One -webflow_state1_message=This is a simple example to get started with Spring Web Flow. The buttons below lead you to another view state (Proceed) or to an end state. -webflow_state2_title=Spring WebFlow - View State Two -webflow_state2_message=This is a simple example to get started with Spring Web Flow. The buttons below lead you to another view state (Proceed) or to an end state. -webflow_endstate_title=Spring WebFlow - End State -webflow_endstate_message=You have now reached the end of this flow. - -#security -security_login_title=Spring Security Login -security_login_message=You have tried to access a protected area of this application. By default you can login as "admin", with a password of "admin". -security_login_form_name=Name -security_login_form_name_message=Enter your name -security_login_form_password=Password -security_login_form_password_message=Enter your password -security_login_unsuccessful=Your login attempt was not successful, try again. Reason: -security_logout=Logout \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/layouts/default.jspx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/layouts/default.jspx deleted file mode 100644 index d68496e5f1..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/layouts/default.jspx +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - <spring:message code="welcome_h3" arguments="${app_name}" /> - - - -
- - -
- - -
-
- - diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/layouts/layouts.xml b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/layouts/layouts.xml deleted file mode 100644 index 3c9d6d4bb6..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/layouts/layouts.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/spring/webmvc-config.xml b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/spring/webmvc-config.xml deleted file mode 100644 index 63a06953a2..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/spring/webmvc-config.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - dataAccessFailure - resourceNotFound - resourceNotFound - resourceNotFound - - - - - - - - - - - - - /WEB-INF/layouts/layouts.xml - - /WEB-INF/views/**/views.xml - - - - diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/create.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/create.tagx deleted file mode 100644 index 37e006781d..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/create.tagx +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
-
-
\ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/dependency.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/dependency.tagx deleted file mode 100644 index 86011b91a0..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/dependency.tagx +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - -

- -

-
-
-
-
\ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/checkbox.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/checkbox.tagx deleted file mode 100644 index 3e7c0604e7..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/checkbox.tagx +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - ${field} - - -
- - - - - - - - - - -
-
-
-
\ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/column.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/column.tagx deleted file mode 100644 index 11e9c56c48..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/column.tagx +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/datetime.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/datetime.tagx deleted file mode 100644 index ec4adbf684..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/datetime.tagx +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${field} - - - - - - - -
- - - - - - - -
- -
-
- - - - - - - - - - - -
-
-
-
\ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/display.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/display.tagx deleted file mode 100644 index 4e4f86e43e..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/display.tagx +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - -
-
-
-
-
\ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/editor.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/editor.tagx deleted file mode 100644 index 959a5fb413..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/editor.tagx +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${field} - - - -
- - -
- - -
-
-
-
\ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/input.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/input.tagx deleted file mode 100644 index 8c24630bc1..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/input.tagx +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${field} - - -
- - - - - - - -
- -
-
- - - - - - - - - - - -
-
-
-
\ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/reference.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/reference.tagx deleted file mode 100644 index 89695122a6..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/reference.tagx +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - -
- - - - - - - - ${fn:escapeXml(add_message)} - - - - - ( - - ) - -
-
- -
-
\ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/select.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/select.tagx deleted file mode 100644 index 09122bb0df..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/select.tagx +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${field} - - -
- - - - - - - - - - - -
- -
-
-
- - - - - - - -
- -
-
-
-
- - - - - - -
- - - -
-
-
- -
-
\ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/simple.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/simple.tagx deleted file mode 100644 index 390afa45f6..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/simple.tagx +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
-
-
-
\ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/table.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/table.tagx deleted file mode 100644 index 364e94afeb..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/table.tagx +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - ${fn:escapeXml(show_label)} - - - - - - - - - ${fn:escapeXml(update_label)} - - - - - - - - - - - - - - -
- -
- -
\ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/textarea.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/textarea.tagx deleted file mode 100644 index f8f05b67db..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/fields/textarea.tagx +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${field} - - - -
- - -
- - -
-
- -
-
\ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/find.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/find.tagx deleted file mode 100644 index 8644d776c7..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/find.tagx +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
- - - -
-
-
-
-
\ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/list.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/list.tagx deleted file mode 100644 index 3202f2bc92..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/list.tagx +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/show.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/show.tagx deleted file mode 100644 index 7782c058e6..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/show.tagx +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/update.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/update.tagx deleted file mode 100644 index 1dfdf45ebd..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/form/update.tagx +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
- - - - -
-
-
-
\ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/menu/category.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/menu/category.tagx deleted file mode 100644 index f6383f5134..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/menu/category.tagx +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - -
  • -

    - -

    -
      - -
    -
  • - -
    -
    \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/menu/item.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/menu/item.tagx deleted file mode 100644 index b0c466e65c..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/menu/item.tagx +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
  • - - - - -
  • - -
    -
    \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/menu/menu.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/menu/menu.tagx deleted file mode 100644 index 9c3f2e7c89..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/menu/menu.tagx +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - -
      - -
    -
    -
    \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/language.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/language.tagx deleted file mode 100644 index aa1cd5adbc..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/language.tagx +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - ${fn:escapeXml(lang_label)} - - - - diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/load-scripts.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/load-scripts.tagx deleted file mode 100644 index a89a63292a..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/load-scripts.tagx +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/pagination.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/pagination.tagx deleted file mode 100644 index b4d394ce00..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/pagination.tagx +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${i} - - - - - - - - - - - - - - - ${first_label} - - - - - - - - - - - ${previous_label} - - - - - - - - - - - - - - ${next_label} - - - - - - - - - - - ${last_label} - - - - \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/panel.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/panel.tagx deleted file mode 100644 index e8a43fc69e..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/panel.tagx +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - ${id} - - - - ${openPane} - - - - ${title} - - - -
    - - -
    -
    -
    diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/placeholder.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/placeholder.tagx deleted file mode 100644 index 65ee2e4b76..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/placeholder.tagx +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/theme.tagx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/theme.tagx deleted file mode 100644 index fe0c628aa7..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/tags/util/theme.tagx +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - ${theme_standard} - - - - - - - - - - - - ${theme_alt} - - - \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/dataAccessFailure.jspx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/dataAccessFailure.jspx deleted file mode 100644 index e815684ea9..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/dataAccessFailure.jspx +++ /dev/null @@ -1,29 +0,0 @@ -
    - - - -

    ${fn:escapeXml(title)}

    -

    - -

    - -

    -

    - -

    - - - - - - - - -
    -
    -
    -

    -
    -
    -
    - diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/footer.jspx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/footer.jspx deleted file mode 100644 index 89af49c71a..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/footer.jspx +++ /dev/null @@ -1,36 +0,0 @@ - - diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/header.jspx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/header.jspx deleted file mode 100644 index fea8152070..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/header.jspx +++ /dev/null @@ -1,10 +0,0 @@ - \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/index-template.jspx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/index-template.jspx deleted file mode 100644 index 871bc55ca4..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/index-template.jspx +++ /dev/null @@ -1,10 +0,0 @@ -
    - - - - -

    - -

    -
    -
    \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/index.jspx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/index.jspx deleted file mode 100644 index 75ce000a4d..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/index.jspx +++ /dev/null @@ -1,13 +0,0 @@ -
    - - - - -

    - -

    -

    - -

    -
    -
    \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/create.jspx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/create.jspx deleted file mode 100644 index 6b4e04cdb9..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/create.jspx +++ /dev/null @@ -1,10 +0,0 @@ - -
    - - - - - - - -
    diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/findLoanSharksByName.jspx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/findLoanSharksByName.jspx deleted file mode 100644 index acd81fb868..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/findLoanSharksByName.jspx +++ /dev/null @@ -1,7 +0,0 @@ - -
    - - - - -
    diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/list.jspx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/list.jspx deleted file mode 100644 index c79443eae9..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/list.jspx +++ /dev/null @@ -1,11 +0,0 @@ - -
    - - - - - - - - -
    diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/show.jspx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/show.jspx deleted file mode 100644 index cbd4f019a5..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/show.jspx +++ /dev/null @@ -1,9 +0,0 @@ - -
    - - - - - - -
    diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/update.jspx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/update.jspx deleted file mode 100644 index f85da6e800..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/update.jspx +++ /dev/null @@ -1,9 +0,0 @@ - -
    - - - - - - -
    diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/views.xml b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/views.xml deleted file mode 100644 index be6b3d6165..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/loansharks/views.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/menu.jspx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/menu.jspx deleted file mode 100644 index 40a8fc0cc4..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/menu.jspx +++ /dev/null @@ -1,12 +0,0 @@ - - diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/resourceNotFound.jspx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/resourceNotFound.jspx deleted file mode 100644 index fce7f5b035..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/resourceNotFound.jspx +++ /dev/null @@ -1,28 +0,0 @@ -
    - - - -

    ${fn:escapeXml(title)}

    -

    - -

    - -

    -

    - -

    - - - - - - - - -
    -
    -
    -

    -
    -
    -
    \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/uncaughtException.jspx b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/uncaughtException.jspx deleted file mode 100644 index 2196d38864..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/uncaughtException.jspx +++ /dev/null @@ -1,28 +0,0 @@ -
    - - - -

    ${fn:escapeXml(title)}

    -

    - -

    - -

    -

    - -

    - - - - - - - - -
    -
    -
    -

    -
    -
    -
    \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/views.xml b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/views.xml deleted file mode 100644 index d12473f91e..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/views/views.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/web.xml b/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 2f7bb83395..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - loanshark - - Roo generated loanshark application - - - - - defaultHtmlEscape - true - - - - contextConfigLocation - classpath*:META-INF/spring/applicationContext*.xml - - - - Spring OpenEntityManagerInViewFilter - org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter - - - - - - CharacterEncodingFilter - org.springframework.web.filter.CharacterEncodingFilter - - encoding - UTF-8 - - - forceEncoding - true - - - - - HttpMethodFilter - org.springframework.web.filter.HiddenHttpMethodFilter - - - Spring OpenEntityManagerInViewFilter - /* - - - - CharacterEncodingFilter - /* - - - - HttpMethodFilter - /* - - - - - org.springframework.web.context.ContextLoaderListener - - - - - loanshark - org.springframework.web.servlet.DispatcherServlet - - contextConfigLocation - /WEB-INF/spring/webmvc-config.xml - - 1 - - - - loanshark - / - - - - 10 - - - - / - - - - java.lang.Exception - /uncaughtException - - - - 404 - /resourceNotFound - - diff --git a/spring-integration-samples/loanshark/src/main/webapp/images/add.png b/spring-integration-samples/loanshark/src/main/webapp/images/add.png deleted file mode 100644 index d5bfa0719b..0000000000 Binary files a/spring-integration-samples/loanshark/src/main/webapp/images/add.png and /dev/null differ diff --git a/spring-integration-samples/loanshark/src/main/webapp/images/banner-graphic.png b/spring-integration-samples/loanshark/src/main/webapp/images/banner-graphic.png deleted file mode 100644 index 7d2b78c6e3..0000000000 Binary files a/spring-integration-samples/loanshark/src/main/webapp/images/banner-graphic.png and /dev/null differ diff --git a/spring-integration-samples/loanshark/src/main/webapp/images/create.png b/spring-integration-samples/loanshark/src/main/webapp/images/create.png deleted file mode 100644 index d5bfa0719b..0000000000 Binary files a/spring-integration-samples/loanshark/src/main/webapp/images/create.png and /dev/null differ diff --git a/spring-integration-samples/loanshark/src/main/webapp/images/delete.png b/spring-integration-samples/loanshark/src/main/webapp/images/delete.png deleted file mode 100644 index 1514d51a3c..0000000000 Binary files a/spring-integration-samples/loanshark/src/main/webapp/images/delete.png and /dev/null differ diff --git a/spring-integration-samples/loanshark/src/main/webapp/images/en.png b/spring-integration-samples/loanshark/src/main/webapp/images/en.png deleted file mode 100644 index ff701e19f6..0000000000 Binary files a/spring-integration-samples/loanshark/src/main/webapp/images/en.png and /dev/null differ diff --git a/spring-integration-samples/loanshark/src/main/webapp/images/favicon.ico b/spring-integration-samples/loanshark/src/main/webapp/images/favicon.ico deleted file mode 100644 index c2f2b6ccda..0000000000 Binary files a/spring-integration-samples/loanshark/src/main/webapp/images/favicon.ico and /dev/null differ diff --git a/spring-integration-samples/loanshark/src/main/webapp/images/list.png b/spring-integration-samples/loanshark/src/main/webapp/images/list.png deleted file mode 100644 index acc30b853b..0000000000 Binary files a/spring-integration-samples/loanshark/src/main/webapp/images/list.png and /dev/null differ diff --git a/spring-integration-samples/loanshark/src/main/webapp/images/resultset_first.png b/spring-integration-samples/loanshark/src/main/webapp/images/resultset_first.png deleted file mode 100644 index b03eaf8b54..0000000000 Binary files a/spring-integration-samples/loanshark/src/main/webapp/images/resultset_first.png and /dev/null differ diff --git a/spring-integration-samples/loanshark/src/main/webapp/images/resultset_last.png b/spring-integration-samples/loanshark/src/main/webapp/images/resultset_last.png deleted file mode 100644 index 8ec8947847..0000000000 Binary files a/spring-integration-samples/loanshark/src/main/webapp/images/resultset_last.png and /dev/null differ diff --git a/spring-integration-samples/loanshark/src/main/webapp/images/resultset_next.png b/spring-integration-samples/loanshark/src/main/webapp/images/resultset_next.png deleted file mode 100644 index e252606d3e..0000000000 Binary files a/spring-integration-samples/loanshark/src/main/webapp/images/resultset_next.png and /dev/null differ diff --git a/spring-integration-samples/loanshark/src/main/webapp/images/resultset_previous.png b/spring-integration-samples/loanshark/src/main/webapp/images/resultset_previous.png deleted file mode 100644 index 18f9cc1094..0000000000 Binary files a/spring-integration-samples/loanshark/src/main/webapp/images/resultset_previous.png and /dev/null differ diff --git a/spring-integration-samples/loanshark/src/main/webapp/images/show.png b/spring-integration-samples/loanshark/src/main/webapp/images/show.png deleted file mode 100644 index 2f193889f7..0000000000 Binary files a/spring-integration-samples/loanshark/src/main/webapp/images/show.png and /dev/null differ diff --git a/spring-integration-samples/loanshark/src/main/webapp/images/springsource-logo.png b/spring-integration-samples/loanshark/src/main/webapp/images/springsource-logo.png deleted file mode 100644 index e170f8abf7..0000000000 Binary files a/spring-integration-samples/loanshark/src/main/webapp/images/springsource-logo.png and /dev/null differ diff --git a/spring-integration-samples/loanshark/src/main/webapp/images/update.png b/spring-integration-samples/loanshark/src/main/webapp/images/update.png deleted file mode 100644 index 046811ed7a..0000000000 Binary files a/spring-integration-samples/loanshark/src/main/webapp/images/update.png and /dev/null differ diff --git a/spring-integration-samples/loanshark/src/main/webapp/styles/alt.css b/spring-integration-samples/loanshark/src/main/webapp/styles/alt.css deleted file mode 100644 index 3c6c81d594..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/styles/alt.css +++ /dev/null @@ -1,362 +0,0 @@ -/* main elements */ - -body,div,td { - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #666; -} - -body { - background-color: #fff; - text-align: center; -} - -#header { - margin-bottom: 1em; -} - -#wrapper { - width:800px; - min-width: 800px; - max-width: 800px; - margin-right: auto; - margin-left: auto; - - /* fix max-width incompatibility in IE6 */ - width:expression(document.body.clientWidth > 800? "800px": "auto" ); - - overflow:hidden; - display:block; -} - -/* header and footer elements */ - -#main { - overflow:hidden; - display:box; -} - -#menu { - background: #eee; - position:relative; - float:right; - left:0px; - width:220px; - margin-left:15px; -} - -#menu ul{ - list-style: none; - margin: 0; - padding: 0; -} - -#menu ul li{ - padding: 0px; -} - - -#menu a, #menu h2 { - display: block; - margin: 0; - padding: 2px 6px; - color:#FFFFFF; -} - -#menu h2 { - color: #fff; - background: #648C1D; - text-transform: uppercase; - font-weight:bold; - font-size: 12px; -} - -#menu a { - color: #666666; - background: #efefef; - text-decoration: none; - padding: 2px 12px; -} - -#menu a:hover { - color: #648C1D; - background: #fff; -} - -#footer { - background:#fff; - border:none; - margin-top:15px; - border-top:1px solid #999999; -} - -#footer .new { - float:left; -} - -#footer a:link {color: #7db223;} - -.quicklinks { - clear:both; - padding-bottom: 15px -} -.quicklinks span { - float: right; -} - -label { - width:100px; - float:left; - margin-left: 5px; - margin-top: 0px; -} - -input { - height:20px; -} - -input, textarea, select { - border:1px solid #B3B3B3; -} - -input.image { - border: none; - height: auto; -} - -submit { - height:25px; -} - -div { - text-align: left; -} - -div .box { - display:block; - margin-left:105px; -} - -/* menu elements*/ - -a.menu, a.menu:link, a.menu:visited {display:block; width:150px; height:25px;} - -/* text styles */ - -h1,h2,h3 { - font-family: Helvetica, sans-serif; - color: #7db223; -} - -h1 { - font-size: 20px; - line-height: 26px; -} - -h2 { - font-size: 18px; - line-height: 20px; -} - -h3 { - font-size: 15px; - line-height: 21px; - color:#555; -} - -h4 { - font-size: 14px; - line-height: 20px; -} - -.errors { - color: red; - font-weight: bold; - display: block; - margin-left: 105px; -} - -a { - text-decoration: underline; - font-size: 12px; -} - -a img { - border: 0 none; - vertical-align: middle; -} - -tr:nth-child(odd) { - background-color: #FFFFFF; -} - -tr:nth-child(even) { - background-color: #EFEFEF; -} - -a:link { - color: #7db223; -} - -a:hover { - color: #456314; -} - -a:active { - color: #7db223; -} - -a:visited { - color: #7db223; -} - -li { - padding-top: 5px; - text-align: left; -} - -ul li { - margin:0 0 0.25em 0; - padding:0; -} -/* table elements */ - -table { - background: #EEEEEE; - margin: 2px 0 0 0; - border: 1px solid #BBBBBB; - border-collapse: collapse; - width: 100% -} - -table table { - margin: -5px 0; - border: 0px solid #e0e7d3; - width: 100%; -} - -table td,table th { - padding: 2px; - border: 1px solid #CCCCCC; -} - -table td form { - text-align:center; - vertical-align: middle; - margin: 0px; -} - -table th { - font-size: 0.9em; - text-align: left; - font-weight: bold; - color: #FFF; - background: #999; -} - -table thead { - font-weight: bold; - font-style: italic; - background-color: #BBBBBB; -} - -table a:link {color: #303030;} - -caption { - caption-side: top; - width: auto; - text-align: left; - font-size: 12px; - color: #848f73; - padding-bottom: 4px; -} - -fieldset { - background: #e0e7d3; - padding: 8px; - padding-bottom: 22px; - border: none; - width: 560px; -} - -fieldset label { - width: 70px; - float: left; - margin-top: 1.7em; - margin-left: 20px; -} - -fieldset textfield { - margin: 3px; - height: 20px; - background: #e0e7d3; -} - -fieldset textarea { - margin: 3px; - height: 165px; - background: #e0e7d3; -} - -fieldset input { - margin: 3px; - height: 20px; - background: #e0e7d3; -} - -fieldset table { - width: 100%; -} - -fieldset th { - padding-left: 25px; -} - -.table-buttons { - background-color:#fff; - border:none; -} - -.table-buttons td { - border:none; -} - -.submit input { - border: 1px solid #BBBBBB; - color:#777777; - padding:2px 7px; - font-size:11px; - text-transform:uppercase; - font-weight:bold; - height:24px; -} - -.updated { - background:#ecf1e5; - font-size:11px; - margin-left:2px; - border:4px solid #ecf1e5; -} - -.updated td { - padding:2px 8px; - font-size:11px; - color:#888888; -} - -.dijitTextArea{ - min-height:5.5em !important; - max-height:22em !important; - overflow-y: auto !important; - max-width: 175px; -} - -.RichTextEditable{ - min-height:18em !important; - max-height:18em !important; -} - -.flag { - height: 11px; - width: 16px; -} \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/main/webapp/styles/standard.css b/spring-integration-samples/loanshark/src/main/webapp/styles/standard.css deleted file mode 100644 index b32928c7a9..0000000000 --- a/spring-integration-samples/loanshark/src/main/webapp/styles/standard.css +++ /dev/null @@ -1,366 +0,0 @@ -/* main elements */ - -body,div,td { - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #666; -} - -body { - background-color: #fff; - text-align: center; -} - -#header { - margin-bottom: 1em; -} - -#wrapper { - width:800px; - min-width: 800px; - max-width: 800px; - margin-right: auto; - margin-left: auto; - - /* fix max-width incompatibility in IE6 */ - width:expression(document.body.clientWidth > 800? "800px": "auto" ); - - overflow:hidden; - display:block; -} - -/* header and footer elements */ - -#main { - overflow:hidden; - display:box; -} - -#menu { - background: #eee; - position:relative; - float:left; - left:0px; - width:220px; - margin-right:15px; -} - -#menu ul{ - list-style: none; - margin: 0; - padding: 0; -} - -#menu ul li{ - padding: 0px; -} - - -#menu a, #menu h2 { - display: block; - margin: 0; - padding: 2px 6px; - color:#FFFFFF; -} - -#menu h2 { - color: #fff; - background: #648C1D; - text-transform: uppercase; - font-weight:bold; - font-size: 12px; -} - -#menu a { - color: #666666; - background: #efefef; - text-decoration: none; - padding: 2px 12px; -} - -#menu a:hover { - color: #648C1D; - background: #fff; -} - -#footer { - background:#fff; - border:none; - margin-top:15px; - border-top:1px solid #999999; -} - -#footer .new { - float:left; -} - -#footer a:link {color: #7db223;} - -.quicklinks { - clear:both; - padding-bottom: 15px -} -.quicklinks span { - float: right; -} - -table.navigation { - border: 0px; -} - -label { - width:100px; - float:left; - margin-left: 5px; - margin-top: 0px; -} - -input { - height:20px; -} - -input, textarea, select { - border:1px solid #B3B3B3; -} - -input.image { - border: none; - height: auto; -} - -submit { - height:25px; -} - -div { - text-align: left; -} - -div .box { - display:block; - margin-left:105px; -} - -/* menu elements*/ - -a.menu, a.menu:link, a.menu:visited {display:block; width:150px; height:25px;} - -/* text styles */ - -h1,h2,h3 { - font-family: Helvetica, sans-serif; - color: #7db223; -} - -h1 { - font-size: 20px; - line-height: 26px; -} - -h2 { - font-size: 18px; - line-height: 20px; -} - -h3 { - font-size: 15px; - line-height: 21px; - color:#555; -} - -h4 { - font-size: 14px; - line-height: 20px; -} - -.errors { - color: red; - font-weight: bold; - display: block; - margin-left: 105px; -} - -a { - text-decoration: underline; - font-size: 12px; -} - -a img { - border: 0 none; - vertical-align: middle; -} - -tr:nth-child(odd) { - background-color: #FFFFFF; -} - -tr:nth-child(even) { - background-color: #EFEFEF; -} - -a:link { - color: #7db223; -} - -a:hover { - color: #456314; -} - -a:active { - color: #7db223; -} - -a:visited { - color: #7db223; -} - -li { - padding-top: 5px; - text-align: left; -} - -ul li { - margin:0 0 0.25em 0; - padding:0; -} -/* table elements */ - -table { - background: #EEEEEE; - margin: 2px 0 0 0; - border: 1px solid #BBBBBB; - border-collapse: collapse; - width: 100% -} - -table table { - margin: -5px 0; - border: 0px solid #e0e7d3; - width: 100%; -} - -table td,table th { - padding: 2px; - border: 1px solid #CCCCCC; -} - -table td form { - text-align:center; - vertical-align: middle; - margin: 0px; -} - -table th { - font-size: 0.9em; - text-align: left; - font-weight: bold; - color: #FFF; - background: #999; -} - -table thead { - font-weight: bold; - font-style: italic; - background-color: #BBBBBB; -} - -table a:link {color: #303030;} - -caption { - caption-side: top; - width: auto; - text-align: left; - font-size: 12px; - color: #848f73; - padding-bottom: 4px; -} - -fieldset { - background: #e0e7d3; - padding: 8px; - padding-bottom: 22px; - border: none; - width: 560px; -} - -fieldset label { - width: 70px; - float: left; - margin-top: 1.7em; - margin-left: 20px; -} - -fieldset textfield { - margin: 3px; - height: 20px; - background: #e0e7d3; -} - -fieldset textarea { - margin: 3px; - height: 165px; - background: #e0e7d3; -} - -fieldset input { - margin: 3px; - height: 20px; - background: #e0e7d3; -} - -fieldset table { - width: 100%; -} - -fieldset th { - padding-left: 25px; -} - -.table-buttons { - background-color:#fff; - border:none; -} - -.table-buttons td { - border:none; -} - -.submit input { - border: 1px solid #BBBBBB; - color:#777777; - padding:2px 7px; - font-size:11px; - text-transform:uppercase; - font-weight:bold; - height:24px; -} - -.updated { - background:#ecf1e5; - font-size:11px; - margin-left:2px; - border:4px solid #ecf1e5; -} - -.updated td { - padding:2px 8px; - font-size:11px; - color:#888888; -} - -.dijitTextArea{ - min-height:5.5em !important; - max-height:22em !important; - overflow-y: auto !important; - max-width: 175px; -} - -.RichTextEditable{ - min-height:18em !important; - max-height:18em !important; -} - -.flag { - height: 11px; - width: 16px; -} \ No newline at end of file diff --git a/spring-integration-samples/loanshark/src/test/java/org/springframework/integration/samples/loanbroker/loanshark/biz/TestAccumulator.java b/spring-integration-samples/loanshark/src/test/java/org/springframework/integration/samples/loanbroker/loanshark/biz/TestAccumulator.java deleted file mode 100644 index bf2c19b544..0000000000 --- a/spring-integration-samples/loanshark/src/test/java/org/springframework/integration/samples/loanbroker/loanshark/biz/TestAccumulator.java +++ /dev/null @@ -1,53 +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.samples.loanbroker.loanshark.biz; - - -import static junit.framework.Assert.assertEquals; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.integration.samples.loanbroker.loanshark.biz.Accumulator; -import org.springframework.integration.samples.loanbroker.loanshark.biz.SharkQuote; -import org.springframework.integration.samples.loanbroker.loanshark.domain.LoanShark; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.transaction.annotation.Transactional; - - - -/** - * @author Gary Russell - * - */ -@ContextConfiguration(locations="classpath:META-INF/spring/applicationContext.xml") -@RunWith(SpringJUnit4ClassRunner.class) -public class TestAccumulator { - - @Autowired - Accumulator accumulator; - - @Test - @Transactional - public void test() { - accumulator.accumulate(new SharkQuote("fred", 6.0d)); - accumulator.accumulate(new SharkQuote("fred", 6.2d)); - LoanShark shark = (LoanShark) LoanShark.findLoanSharksByName("fred").getSingleResult(); - assertEquals(new Long(2), shark.getCounter()); - assertEquals(new Double(6.1), shark.getAverageRate()); - } -} diff --git a/spring-integration-samples/loanshark/src/test/resources/log4j.properties b/spring-integration-samples/loanshark/src/test/resources/log4j.properties deleted file mode 100644 index becbf46cca..0000000000 --- a/spring-integration-samples/loanshark/src/test/resources/log4j.properties +++ /dev/null @@ -1,12 +0,0 @@ -#Updated at Tue Mar 23 17:20:25 PDT 2010 -#Tue Mar 23 17:20:25 PDT 2010 -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.rootLogger=DEBUG, stdout, R -log4j.appender.R.File=application.log -log4j.appender.R.MaxFileSize=100KB -log4j.appender.R.layout=org.apache.log4j.PatternLayout -log4j.appender.R.MaxBackupIndex=1 -log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n -log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.R=org.apache.log4j.RollingFileAppender diff --git a/spring-integration-samples/loanshark/udps.groovy b/spring-integration-samples/loanshark/udps.groovy deleted file mode 100644 index f9b69716a7..0000000000 --- a/spring-integration-samples/loanshark/udps.groovy +++ /dev/null @@ -1,12 +0,0 @@ -//Groovy Script to catch multicast packets. -socket = new MulticastSocket(11111) -mcast = InetAddress.getByName("225.6.7.8") -socket.joinGroup(mcast) -buffer = (' ' * 1024) as byte[] -while(true) { - incoming = new DatagramPacket(buffer, buffer.length) - socket.receive(incoming) - s = new String(incoming.data, 0, incoming.length) - println ("** Shark **" + s) -} - diff --git a/spring-integration-samples/loanshark/udps.pl b/spring-integration-samples/loanshark/udps.pl deleted file mode 100755 index ed00ed571d..0000000000 --- a/spring-integration-samples/loanshark/udps.pl +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/perl -w -#Perl Script to catch multicast packets. -use strict; -use IO::Socket::Multicast; - -my $socket = IO::Socket::Multicast->new(LocalPort=>11111, ReuseAddr=>1) - or die "Can't start UDP server: $@"; - -$socket->mcast_add('225.6.7.8'); - -my ($datagram,$flags); -while ($socket->recv($datagram,1024,$flags)) { - print "**Shark** $datagram\n"; -} - -$socket->close(); diff --git a/spring-integration-samples/multipart-http/.classpath b/spring-integration-samples/multipart-http/.classpath deleted file mode 100644 index 060835db5e..0000000000 --- a/spring-integration-samples/multipart-http/.classpath +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/spring-integration-samples/multipart-http/.project b/spring-integration-samples/multipart-http/.project deleted file mode 100644 index 1aa0542ba1..0000000000 --- a/spring-integration-samples/multipart-http/.project +++ /dev/null @@ -1,48 +0,0 @@ - - - multipart-http - - - - - - org.eclipse.wst.jsdt.core.javascriptValidator - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - - org.springframework.ide.eclipse.core.springnature - org.maven.ide.eclipse.maven2Nature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.jdt.core.javanature - org.eclipse.wst.jsdt.core.jsNature - - diff --git a/spring-integration-samples/multipart-http/.settings/org.maven.ide.eclipse.prefs b/spring-integration-samples/multipart-http/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 00480d5b51..0000000000 --- a/spring-integration-samples/multipart-http/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Tue Aug 31 23:37:04 EDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=false -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/spring-integration-samples/multipart-http/pom.xml b/spring-integration-samples/multipart-http/pom.xml deleted file mode 100644 index 0b27fdb518..0000000000 --- a/spring-integration-samples/multipart-http/pom.xml +++ /dev/null @@ -1,34 +0,0 @@ - - 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - - multipart-http - Spring Integration HTTP Multipart Demo - war - - - org.springframework.integration - spring-integration-http - 2.0.0.BUILD-SNAPSHOT - - - org.springframework - spring-webmvc - 3.0.3.RELEASE - - - commons-fileupload - commons-fileupload - 1.2 - - - org.apache.commons - commons-io - 1.3.2 - - - diff --git a/spring-integration-samples/multipart-http/readme.txt b/spring-integration-samples/multipart-http/readme.txt deleted file mode 100644 index 235eb5c4b6..0000000000 --- a/spring-integration-samples/multipart-http/readme.txt +++ /dev/null @@ -1,11 +0,0 @@ -To run this sample - 1) deploy project - - If you are using STS and project is imported as Eclipse project in your workspace you can just execute 'Run on Server' - - You can also run 'mvn clean install' and generate the WAR file that you can deploy the conventional way - 2) run the simple test client program: org.springframework.integration.samples.multipart.MultipartClient - - You should see the following output from the server: - - ### Successfully recieved multipart request ### - company - SpringSource - company-logo - as UploadedMultipartFile: spring09_logo.png \ No newline at end of file diff --git a/spring-integration-samples/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartClient.java b/spring-integration-samples/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartClient.java deleted file mode 100644 index 38d26df5d5..0000000000 --- a/spring-integration-samples/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartClient.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.springframework.integration.samples.multipart; - -import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.Resource; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; -import org.springframework.web.client.RestTemplate; -/** - * @author Oleg Zhurakousky - * - */ -public class MultipartClient { - - /** - * @param args - */ - @SuppressWarnings("unchecked") - public static void main(String[] args) throws Exception{ - - RestTemplate template = new RestTemplate(); - String uri = "http://localhost:8080/multipart-http/inboundAdapter.htm"; - Resource s2logo = new ClassPathResource("org/springframework/integration/samples/multipart/spring09_logo.png"); - MultiValueMap map = new LinkedMultiValueMap(); - map.add("company", "SpringSource"); - map.add("company-logo", s2logo); - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(new MediaType("multipart", "form-data")); - HttpEntity request = new HttpEntity(map, headers); - @SuppressWarnings("unused") - ResponseEntity httpResponse = template.exchange(uri, HttpMethod.POST, request, null); - } -} diff --git a/spring-integration-samples/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartReceiever.java b/spring-integration-samples/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartReceiever.java deleted file mode 100644 index 40e915fdcb..0000000000 --- a/spring-integration-samples/multipart-http/src/main/java/org/springframework/integration/samples/multipart/MultipartReceiever.java +++ /dev/null @@ -1,36 +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.samples.multipart; - -import org.springframework.integration.http.UploadedMultipartFile; -import org.springframework.util.LinkedMultiValueMap; -/** - * @author Oleg Zhurakousky - * - */ -public class MultipartReceiever { - - public void recieve(LinkedMultiValueMap multipartRequest){ - System.out.println("### Successfully recieved multipart request ###"); - for (String elementName : multipartRequest.keySet()) { - if (elementName.equals("company")){ - System.out.println("\t" + elementName + " - " + ((String[]) multipartRequest.getFirst("company"))[0]); - } else if (elementName.equals("company-logo")){ - System.out.println("\t" + elementName + " - as UploadedMultipartFile: " + ((UploadedMultipartFile) multipartRequest.getFirst("company-logo")).getOriginalFilename()); - } - } - } -} diff --git a/spring-integration-samples/multipart-http/src/main/java/org/springframework/integration/samples/multipart/spring09_logo.png b/spring-integration-samples/multipart-http/src/main/java/org/springframework/integration/samples/multipart/spring09_logo.png deleted file mode 100644 index 36b42b0015..0000000000 Binary files a/spring-integration-samples/multipart-http/src/main/java/org/springframework/integration/samples/multipart/spring09_logo.png and /dev/null differ diff --git a/spring-integration-samples/multipart-http/src/main/webapp/WEB-INF/servlet-config.xml b/spring-integration-samples/multipart-http/src/main/webapp/WEB-INF/servlet-config.xml deleted file mode 100644 index 3fe44b98d6..0000000000 --- a/spring-integration-samples/multipart-http/src/main/webapp/WEB-INF/servlet-config.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - diff --git a/spring-integration-samples/multipart-http/src/main/webapp/WEB-INF/web.xml b/spring-integration-samples/multipart-http/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 43c0d51ac0..0000000000 --- a/spring-integration-samples/multipart-http/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - multipart-http - - Multipart - org.springframework.web.servlet.DispatcherServlet - - contextConfigLocation - /WEB-INF/servlet-config.xml - - 1 - - - Multipart - *.htm - - \ No newline at end of file diff --git a/spring-integration-samples/multipart-http/src/main/webapp/index.html b/spring-integration-samples/multipart-http/src/main/webapp/index.html deleted file mode 100644 index f60b3bbef4..0000000000 --- a/spring-integration-samples/multipart-http/src/main/webapp/index.html +++ /dev/null @@ -1,3 +0,0 @@ -You have successfully deployed HTTP Multipart Sample. - -Now you ready to execute org.springframework.integration.samples.multipart.MultipartClient \ No newline at end of file diff --git a/spring-integration-samples/oddeven/.classpath b/spring-integration-samples/oddeven/.classpath deleted file mode 100644 index 24166ba51f..0000000000 --- a/spring-integration-samples/oddeven/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/spring-integration-samples/oddeven/.project b/spring-integration-samples/oddeven/.project deleted file mode 100644 index 7d3fb08840..0000000000 --- a/spring-integration-samples/oddeven/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - oddeven - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/spring-integration-samples/oddeven/pom.xml b/spring-integration-samples/oddeven/pom.xml deleted file mode 100644 index 5f7d473069..0000000000 --- a/spring-integration-samples/oddeven/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - - oddeven - Spring Integration Odd-Even Sample - - - org.springframework.integration - spring-integration-core - - - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - diff --git a/spring-integration-samples/oddeven/src/main/java/log4j.xml b/spring-integration-samples/oddeven/src/main/java/log4j.xml deleted file mode 100644 index 78268c06cc..0000000000 --- a/spring-integration-samples/oddeven/src/main/java/log4j.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/Counter.java b/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/Counter.java deleted file mode 100644 index 736989d8fa..0000000000 --- a/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/Counter.java +++ /dev/null @@ -1,39 +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.samples.oddeven; - -import java.util.concurrent.atomic.AtomicInteger; - -/** - * A simple POJO providing a method that returns incrementing integer values. - * This is referenced in the sample's configuration by an inbound Channel - * Adapter acting as a Polling Consumer. - *

    - * Every 5th number will be returned as a negative value. - * - * @author Mark Fisher - */ -public class Counter { - - private final AtomicInteger count = new AtomicInteger(); - - public int next() { - int nextNumber = count.incrementAndGet(); - return (nextNumber % 5 == 0) ? -nextNumber : nextNumber; - } - -} diff --git a/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/CronOddEvenDemo.java b/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/CronOddEvenDemo.java deleted file mode 100644 index 5dfc387d9d..0000000000 --- a/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/CronOddEvenDemo.java +++ /dev/null @@ -1,41 +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.samples.oddeven; - -import org.springframework.context.support.ClassPathXmlApplicationContext; - -/** - * Demonstrates a method-invoking inbound Channel Adapter acting as a Polling - * Consumer with a cron-based trigger. That adapter is followed, downstream, by - * a simple method-invoking Message Filter that discards negative numbers to - * the "nullChannel". Next is a Content Based Router. The router sends to one of - * two channels based on whether the payload number is odd or even. Each of - * those two channels has an Event Driven Consumer ready to log the number - * and the current time. - *

    - * See the 'cronOddEvenDemo.xml' configuration file for more detail. The cron - * expression is based on the Fibonacci sequence. Feel free to modify it. - * - * @author Mark Fisher - */ -public class CronOddEvenDemo { - - public static void main(String[] args) { - new ClassPathXmlApplicationContext("cronOddEvenDemo.xml", CronOddEvenDemo.class); - } - -} diff --git a/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/EvenLogger.java b/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/EvenLogger.java deleted file mode 100644 index 7f3f1e551f..0000000000 --- a/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/EvenLogger.java +++ /dev/null @@ -1,39 +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.samples.oddeven; - -import java.text.SimpleDateFormat; -import java.util.Date; - -import org.springframework.integration.annotation.MessageEndpoint; -import org.springframework.integration.annotation.ServiceActivator; - -/** - * A POJO Service Activator that logs even numbers and the current time. - * - * @author Mark Fisher - * @author Marius Bogoevici - */ -@MessageEndpoint -public class EvenLogger { - - @ServiceActivator - public void log(int i) { - System.out.println("even: " + i + " at " + new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date())); - } - -} diff --git a/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/IntervalOddEvenDemo.java b/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/IntervalOddEvenDemo.java deleted file mode 100644 index fcf3107347..0000000000 --- a/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/IntervalOddEvenDemo.java +++ /dev/null @@ -1,40 +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.samples.oddeven; - -import org.springframework.context.support.ClassPathXmlApplicationContext; - -/** - * Demonstrates a method-invoking inbound Channel Adapter acting as a Polling - * Consumer with an interval-based trigger. That adapter is followed, - * downstream, by a simple method-invoking Message Filter that discards - * negative numbers to the "nullChannel". Next is a Content Based Router. The - * router sends to one of two channels based on whether the payload number is - * odd or even. Each of those two channels has an Event Driven Consumer ready - * to log the number and the current time. - *

    - * See the 'intervalOddEvenDemo.xml' configuration file for more detail. - * - * @author Mark Fisher - */ -public class IntervalOddEvenDemo { - - public static void main(String[] args) { - new ClassPathXmlApplicationContext("intervalOddEvenDemo.xml", IntervalOddEvenDemo.class); - } - -} diff --git a/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/OddLogger.java b/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/OddLogger.java deleted file mode 100644 index 2e2dbb0cdc..0000000000 --- a/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/OddLogger.java +++ /dev/null @@ -1,39 +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.samples.oddeven; - -import java.text.SimpleDateFormat; -import java.util.Date; - -import org.springframework.integration.annotation.MessageEndpoint; -import org.springframework.integration.annotation.ServiceActivator; - -/** - * A POJO Service Activator that logs odd numbers and the current time. - * - * @author Mark Fisher - * @author Marius Bogoevici - */ -@MessageEndpoint -public class OddLogger { - - @ServiceActivator - public void log(int i) { - System.out.println("odd: " + i + " at " + new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date())); - } - -} \ No newline at end of file diff --git a/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/cronOddEvenDemo.xml b/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/cronOddEvenDemo.xml deleted file mode 100644 index eef728da26..0000000000 --- a/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/cronOddEvenDemo.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/intervalOddEvenDemo.xml b/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/intervalOddEvenDemo.xml deleted file mode 100644 index a155d20532..0000000000 --- a/spring-integration-samples/oddeven/src/main/java/org/springframework/integration/samples/oddeven/intervalOddEvenDemo.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/pom.xml b/spring-integration-samples/pom.xml deleted file mode 100644 index fdea04acd6..0000000000 --- a/spring-integration-samples/pom.xml +++ /dev/null @@ -1,356 +0,0 @@ - - - 4.0.0 - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - pom - - UTF-8 - false - - 2.2 - 1.1.1 - 4.7 - 1.2.12 - 1.8.0.10 - 1.6.5 - 2.3 - 3.4.2.v_883_R34x - 1.8.4 - 1.1 - 1.5.10 - 3.0.3.RELEASE - 2.0.5.RELEASE - 1.5.9 - - Spring Integration Samples - - async-gateway - cafe - errorhandling - filecopy - helloworld - jms - jmx - loan-broker - loanshark - multipart-http - oddeven - quote - ws-inbound-gateway - ws-outbound-gateway - xml - - - - - ${project.basedir}/src/main/java - - **/* - - - **/*.java - - - - ${project.basedir}/src/main/resources - - **/* - - - - - - ${project.basedir}/src/test/java - - **/* - - - **/*.java - - - - ${project.basedir}/src/test/resources - - **/* - - - **/*.java - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - -Xlint:all - true - false - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - **/*Tests.java - - - **/Abstract*.java - - junit:junit - - - - - - - - - org.aspectj - aspectjrt - ${org.aspectj.version} - - - org.aspectj - aspectjweaver - ${org.aspectj.version} - - - org.springframework - spring-aop - ${org.springframework.version} - - - org.springframework - spring-aspects - ${org.springframework.version} - - - org.springframework - spring-core - ${org.springframework.version} - - - org.springframework - spring-context - ${org.springframework.version} - - - org.springframework - spring-expression - ${org.springframework.version} - - - org.springframework - spring-context-support - ${org.springframework.version} - - - org.springframework - spring-jdbc - ${org.springframework.version} - - - org.springframework - spring-jms - ${org.springframework.version} - - - org.springframework - spring-orm - ${org.springframework.version} - - - org.springframework - spring-oxm - ${org.springframework.version} - - - org.springframework - spring-tx - ${org.springframework.version} - - - org.springframework - spring-web - ${org.springframework.version} - - - org.springframework - spring-webmvc - ${org.springframework.version} - - - org.springframework.integration - spring-integration-core - ${project.version} - - - org.springframework.integration - spring-integration-file - ${project.version} - - - org.springframework.integration - spring-integration-stream - ${project.version} - - - org.springframework.commons - spring-commons-serializer - 1.0.0.M1 - - - - - cglib - cglib-nodep - ${cglib.version} - test - - - junit - junit - ${junit.version} - test - - - org.easymock - easymock - ${org.easymock.version} - test - - - org.easymock - easymockclassextension - ${org.easymock.version} - test - - - org.mockito - mockito-all - ${org.mockito.version} - test - - - org.hamcrest - hamcrest-all - ${org.hamcrest.version} - test - - - org.springframework - spring-test - ${org.springframework.version} - test - - - org.springframework.integration - spring-integration-test - ${project.version} - test - - - commons-logging - commons-logging - ${commons-logging.version} - - - org.springframework.integration - spring-integration-ip - ${project.version} - - - org.springframework.integration - spring-integration-xml - ${project.version} - - - org.springframework.integration - spring-integration-jms - ${project.version} - - - org.springframework.integration - spring-integration-jmx - ${project.version} - - - org.springframework.integration - spring-integration-ws - ${project.version} - - - - - hsqldb - hsqldb - ${hsqldb.version} - compile - - - - - - classpath - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - package - - copy-dependencies - - - lib - false - false - true - - - - - - - - - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - diff --git a/spring-integration-samples/quote/.classpath b/spring-integration-samples/quote/.classpath deleted file mode 100644 index 24166ba51f..0000000000 --- a/spring-integration-samples/quote/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/spring-integration-samples/quote/.project b/spring-integration-samples/quote/.project deleted file mode 100644 index bcc6794989..0000000000 --- a/spring-integration-samples/quote/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - quote - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/spring-integration-samples/quote/pom.xml b/spring-integration-samples/quote/pom.xml deleted file mode 100644 index 488e3caccb..0000000000 --- a/spring-integration-samples/quote/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - - quote - Spring Integration Quote Sample - - - org.springframework.integration - spring-integration-stream - - - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - diff --git a/spring-integration-samples/quote/src/main/java/log4j.xml b/spring-integration-samples/quote/src/main/java/log4j.xml deleted file mode 100644 index 3865c97d90..0000000000 --- a/spring-integration-samples/quote/src/main/java/log4j.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/Quote.java b/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/Quote.java deleted file mode 100644 index d8c051c5f2..0000000000 --- a/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/Quote.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2002-2008 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.samples.quote; - -import java.math.BigDecimal; - -/** - * @author Mark Fisher - */ -public class Quote { - - private String ticker; - - private BigDecimal price; - - public Quote(String ticker, BigDecimal price) { - this.ticker = ticker; - this.price = price; - } - - public String toString() { - return ticker + ": " + price; - } - -} diff --git a/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/QuoteDemo.java b/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/QuoteDemo.java deleted file mode 100644 index c868dfc545..0000000000 --- a/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/QuoteDemo.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.samples.quote; - -import org.springframework.context.support.ClassPathXmlApplicationContext; - -/** - * Demonstrates a method-invoking inbound Channel Adapter and an - * outbound Channel Adapter that writes to stdout. Between them - * is an annotated Service Activator. See QuoteService and the - * 'quoteDemo.xml' configuration file for more detail. - * - * @author Mark Fisher - */ -public class QuoteDemo { - - public static void main(String[] args) { - new ClassPathXmlApplicationContext("quoteDemo.xml", QuoteDemo.class); - } -} diff --git a/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/QuoteService.java b/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/QuoteService.java deleted file mode 100644 index 49af03427b..0000000000 --- a/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/QuoteService.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2002-2008 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.samples.quote; - -import java.math.BigDecimal; -import java.math.RoundingMode; -import java.util.Random; - -import org.springframework.integration.annotation.MessageEndpoint; -import org.springframework.integration.annotation.ServiceActivator; - -/** - * @author Mark Fisher - */ -@MessageEndpoint -public class QuoteService { - - @ServiceActivator(inputChannel="tickers", outputChannel="quotes") - public Quote lookupQuote(String ticker) { - BigDecimal price = new BigDecimal(new Random().nextDouble() * 100); - return new Quote(ticker, price.setScale(2, RoundingMode.HALF_EVEN)); - } - -} diff --git a/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/TickerStream.java b/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/TickerStream.java deleted file mode 100644 index 77f58dcf75..0000000000 --- a/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/TickerStream.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2002-2008 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.samples.quote; - -import java.util.Random; - -/** - * @author Mark Fisher - */ -public class TickerStream { - - public String nextTicker() { - char[] chars = new char[3]; - for (int i = 0; i < 3; i++) { - chars[i] = (char) (new Random().nextInt(25) + 65); - } - return new String(chars); - } - -} diff --git a/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/quoteDemo.xml b/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/quoteDemo.xml deleted file mode 100644 index 25c335e67f..0000000000 --- a/spring-integration-samples/quote/src/main/java/org/springframework/integration/samples/quote/quoteDemo.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/ws-inbound-gateway/.classpath b/spring-integration-samples/ws-inbound-gateway/.classpath deleted file mode 100644 index 02d04a45fe..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/.classpath +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/spring-integration-samples/ws-inbound-gateway/.project b/spring-integration-samples/ws-inbound-gateway/.project deleted file mode 100644 index bc2b2f9ebe..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/.project +++ /dev/null @@ -1,48 +0,0 @@ - - - ws-inbound-gateway - - - - - - org.eclipse.wst.jsdt.core.javascriptValidator - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.maven.ide.eclipse.maven2Nature - org.springframework.ide.eclipse.core.springnature - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.jsdt.core.jsNature - - diff --git a/spring-integration-samples/ws-inbound-gateway/.settings/.jsdtscope b/spring-integration-samples/ws-inbound-gateway/.settings/.jsdtscope deleted file mode 100644 index bbb8e68be8..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/.settings/.jsdtscope +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.jdt.core.prefs b/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 0a8f20b3f0..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Fri May 28 19:45:14 CEST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.wst.common.component b/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 860f1e3b6f..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.wst.common.project.facet.core.xml b/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index 13ac87e9d8..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.wst.jsdt.ui.superType.container b/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.wst.jsdt.ui.superType.container deleted file mode 100644 index 3bd5d0a480..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.wst.jsdt.ui.superType.name b/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.wst.jsdt.ui.superType.name deleted file mode 100644 index 05bd71b6ec..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ /dev/null @@ -1 +0,0 @@ -Window \ No newline at end of file diff --git a/spring-integration-samples/ws-inbound-gateway/.settings/org.maven.ide.eclipse.prefs b/spring-integration-samples/ws-inbound-gateway/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 3555c41515..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Jul 28 12:38:49 EDT 2010 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=false -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/spring-integration-samples/ws-inbound-gateway/.settings/org.springframework.ide.eclipse.beans.core.prefs b/spring-integration-samples/ws-inbound-gateway/.settings/org.springframework.ide.eclipse.beans.core.prefs deleted file mode 100644 index f53abcb235..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/.settings/org.springframework.ide.eclipse.beans.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Fri Feb 26 15:19:13 PST 2010 -eclipse.preferences.version=1 -org.springframework.ide.eclipse.beans.core.ignoreMissingNamespaceHandler=false -org.springframework.ide.eclipse.beans.core.loadNamespaceHandlerFromClasspath=false diff --git a/spring-integration-samples/ws-inbound-gateway/README.txt b/spring-integration-samples/ws-inbound-gateway/README.txt deleted file mode 100644 index 7632d648a3..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -This sample demonstrates a barebones inbound Web Service Gateway. Take a look at "web.xml" in the WEB-INF directory where the Spring Web Services Message-dispatching Servlet is defined. Then have a look at the "spring-ws-config.xml" file (also in the WEB-INF directory) where the Spring WS EndpointMapping is defined. Finally view the Spring Integration configuration in the "inbound-gateway-config.xml" file within the "org.springframework.integration.samples.ws" package where the actual gateway is defined along with a channel and service-activator. - -To use the gateway, you can run the tests that are located within the "src/test/java" directory. One is for standalone testing of the gateway itself, while the other tests the gateway running on a web server. The latter uses Spring Web Services' client-side support. Alternatively, you can simply start the server, and then send invocations with any standalone HTTP client testing tool. The request format should be similar to the following and should be POSTed to the service URL (e.g. http://localhost:8080/ws-inbound-gateway/echoservice): - - - - -hello - - diff --git a/spring-integration-samples/ws-inbound-gateway/pom.xml b/spring-integration-samples/ws-inbound-gateway/pom.xml deleted file mode 100644 index a885157b29..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/pom.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - - ws-inbound-gateway - Spring Integration WS Inbound Gateway Sample - war - - - org.springframework.integration - spring-integration-xml - - - org.springframework.integration - spring-integration-ws - - - - junit - junit - - - org.springframework - spring-test - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - - org.apache.maven.plugins - maven-surefire-plugin - - - **/*Tests.java - - - - **/InContainerTests.java - - - - - - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - diff --git a/spring-integration-samples/ws-inbound-gateway/src/main/java/log4j.dtd b/spring-integration-samples/ws-inbound-gateway/src/main/java/log4j.dtd deleted file mode 100644 index d92a6e7bc6..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/src/main/java/log4j.dtd +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/ws-inbound-gateway/src/main/java/log4j.xml b/spring-integration-samples/ws-inbound-gateway/src/main/java/log4j.xml deleted file mode 100644 index cf78c080e5..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/src/main/java/log4j.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/SimpleEchoResponder.java b/spring-integration-samples/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/SimpleEchoResponder.java deleted file mode 100644 index 13c5bfb933..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/SimpleEchoResponder.java +++ /dev/null @@ -1,31 +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.samples.ws; - -import javax.xml.transform.Source; -import javax.xml.transform.dom.DOMSource; - -import org.springframework.integration.xml.source.DomSourceFactory; - -public class SimpleEchoResponder { - - public Source issueResponseFor(DOMSource request) { - return new DomSourceFactory().createSource( - "" + - request.getNode().getTextContent() + ""); - } -} diff --git a/spring-integration-samples/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/inbound-gateway-config.xml b/spring-integration-samples/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/inbound-gateway-config.xml deleted file mode 100644 index 8c0644df92..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/inbound-gateway-config.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/ws-inbound-gateway/src/main/webapp/WEB-INF/spring-ws-config.xml b/spring-integration-samples/ws-inbound-gateway/src/main/webapp/WEB-INF/spring-ws-config.xml deleted file mode 100644 index 05dea19637..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/src/main/webapp/WEB-INF/spring-ws-config.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - diff --git a/spring-integration-samples/ws-inbound-gateway/src/main/webapp/WEB-INF/web.xml b/spring-integration-samples/ws-inbound-gateway/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index e732138554..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - ws:inbound-gateway sample - - - spring-ws - org.springframework.ws.transport.http.MessageDispatcherServlet - - contextConfigLocation - WEB-INF/spring-ws-config.xml - - 1 - - - - spring-ws - /echoservice - - - - index.html - - - diff --git a/spring-integration-samples/ws-inbound-gateway/src/main/webapp/index.html b/spring-integration-samples/ws-inbound-gateway/src/main/webapp/index.html deleted file mode 100644 index 54436ec8a2..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/src/main/webapp/index.html +++ /dev/null @@ -1 +0,0 @@ -The web service has been successfully deployed. You may now issue SOAP requests. See included JUnit tests for examples. \ No newline at end of file diff --git a/spring-integration-samples/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InContainerTests.java b/spring-integration-samples/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InContainerTests.java deleted file mode 100644 index c01140b8ef..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InContainerTests.java +++ /dev/null @@ -1,57 +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.samples.ws; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; - -import javax.xml.transform.Source; - -import org.junit.Test; - -import org.springframework.ws.client.core.WebServiceTemplate; -import org.springframework.xml.transform.StringResult; -import org.springframework.xml.transform.StringSource; - -/** - * System tests ensuring the Spring WS MessageDispatcherServlet is correctly - * set up and configured to delegate incoming requests to our ws:inbound-gateway. - * - * Use 'mvn package' to create a war file for this project, then deploy before - * attempting to run this test. - * - * @author Chris Beams - */ -public class InContainerTests { - - private static final String WS_URI = "http://localhost:8080/ws-inbound-gateway/echoservice"; - private final WebServiceTemplate template = new WebServiceTemplate(); - - @Test - public void testWebServiceRequestAndResponse() { - StringResult result = new StringResult(); - Source payload = new StringSource( - "" + - "hello"); - - template.sendSourceAndReceiveToResult(WS_URI, payload, result); - - assertThat(result.toString(), equalTo( - "" + - "hello")); - } -} diff --git a/spring-integration-samples/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InboundGatewayTests.java b/spring-integration-samples/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InboundGatewayTests.java deleted file mode 100644 index af9915c5d4..0000000000 --- a/spring-integration-samples/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InboundGatewayTests.java +++ /dev/null @@ -1,84 +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.samples.ws; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - -import java.io.StringReader; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.xml.sax.InputSource; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.integration.ws.SimpleWebServiceInboundGateway; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.ws.context.DefaultMessageContext; -import org.springframework.ws.context.MessageContext; -import org.springframework.ws.pox.dom.DomPoxMessage; -import org.springframework.ws.pox.dom.DomPoxMessageFactory; - -/** - * Out-of-container tests for ws:inbound-gateway message processing. - * - * @author Chris Beams - * @author Mark Fisher - */ -@ContextConfiguration("inbound-gateway-config.xml") -@RunWith(SpringJUnit4ClassRunner.class) -public class InboundGatewayTests { - - @Autowired - private SimpleWebServiceInboundGateway gateway; - - /** - * Emulate the Spring WS MessageDispatcherServlet by calling the gateway - * with a DOMSource object representing the payload of the original SOAP - * 'echoRequest' message. Expect an 'echoResponse' DOMSource object - * to be returned in synchronous fashion, which the MessageDispatcherServlet - * would in turn wrap in a SOAP envelope and return to the client. - */ - @Test - public void testSendAndReceive() throws Exception { - String xml = "hello"; - DomPoxMessageFactory messageFactory = new DomPoxMessageFactory(); - DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); - documentBuilderFactory.setNamespaceAware(true); - DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); - Document document = documentBuilder.parse(new InputSource(new StringReader(xml))); - Transformer transformer = TransformerFactory.newInstance().newTransformer(); - DomPoxMessage request = new DomPoxMessage(document, transformer, "text/xml"); - MessageContext messageContext = new DefaultMessageContext(request, messageFactory); - gateway.invoke(messageContext); - Object reply = messageContext.getResponse().getPayloadSource(); - assertThat(reply, is(DOMSource.class)); - DOMSource replySource = (DOMSource) reply; - Element element = (Element) replySource.getNode().getFirstChild(); - assertThat(element.getTagName(), equalTo("echoResponse")); - } -} diff --git a/spring-integration-samples/ws-outbound-gateway/.classpath b/spring-integration-samples/ws-outbound-gateway/.classpath deleted file mode 100644 index 24166ba51f..0000000000 --- a/spring-integration-samples/ws-outbound-gateway/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/spring-integration-samples/ws-outbound-gateway/.project b/spring-integration-samples/ws-outbound-gateway/.project deleted file mode 100644 index 9730b83f00..0000000000 --- a/spring-integration-samples/ws-outbound-gateway/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - ws-outbound-gateway - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/spring-integration-samples/ws-outbound-gateway/pom.xml b/spring-integration-samples/ws-outbound-gateway/pom.xml deleted file mode 100644 index f3b0d1777f..0000000000 --- a/spring-integration-samples/ws-outbound-gateway/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - - ws-outbound-gateway - Spring Integration WS Outbound Gateway Sample - - - com.sun.xml.messaging.saaj - saaj-impl - 1.3 - - - javax.activation - activation - 1.1.1 - - - org.springframework.integration - spring-integration-stream - - - org.springframework.integration - spring-integration-ws - - - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - diff --git a/spring-integration-samples/ws-outbound-gateway/src/main/java/log4j.xml b/spring-integration-samples/ws-outbound-gateway/src/main/java/log4j.xml deleted file mode 100644 index 6cb1544ee3..0000000000 --- a/spring-integration-samples/ws-outbound-gateway/src/main/java/log4j.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/WebServiceDemo.java b/spring-integration-samples/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/WebServiceDemo.java deleted file mode 100644 index 93bb6654f1..0000000000 --- a/spring-integration-samples/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/WebServiceDemo.java +++ /dev/null @@ -1,53 +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.samples.ws; - -import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.Message; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.support.MessageBuilder; -import org.springframework.integration.support.channel.BeanFactoryChannelResolver; -import org.springframework.integration.support.channel.ChannelResolver; - -/** - * Demonstrates a web service invocation through a Web Service outbound Gateway. - * A header-enricher provides the Soap Action prior to invocation. See the - * 'temperatureConversion.xml' configuration file for more detail. - * - * @author Marius Bogoevici - */ -public class WebServiceDemo { - - public static void main(String[] args) { - ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("temperatureConversion.xml", WebServiceDemo.class); - ChannelResolver channelResolver = new BeanFactoryChannelResolver(context); - - // Compose the XML message according to the server's schema - String requestXml = - "" + - " 90.0" + - ""; - - // Create the Message object - Message message = MessageBuilder.withPayload(requestXml).build(); - - // Send the Message to the handler's input channel - MessageChannel channel = channelResolver.resolveChannelName("fahrenheitChannel"); - channel.send(message); - } - -} diff --git a/spring-integration-samples/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/temperatureConversion.xml b/spring-integration-samples/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/temperatureConversion.xml deleted file mode 100644 index e6a3c49502..0000000000 --- a/spring-integration-samples/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/temperatureConversion.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/spring-integration-samples/xml/.classpath b/spring-integration-samples/xml/.classpath deleted file mode 100644 index 24166ba51f..0000000000 --- a/spring-integration-samples/xml/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/spring-integration-samples/xml/.project b/spring-integration-samples/xml/.project deleted file mode 100644 index ccdada115b..0000000000 --- a/spring-integration-samples/xml/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - xml - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/spring-integration-samples/xml/.settings/org.eclipse.jdt.core.prefs b/spring-integration-samples/xml/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 74d312fca6..0000000000 --- a/spring-integration-samples/xml/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,6 +0,0 @@ -#Fri May 28 19:45:26 CEST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/spring-integration-samples/xml/.settings/org.maven.ide.eclipse.prefs b/spring-integration-samples/xml/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 2218245182..0000000000 --- a/spring-integration-samples/xml/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Tue Jun 30 15:22:48 EDT 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/spring-integration-samples/xml/pom.xml b/spring-integration-samples/xml/pom.xml deleted file mode 100644 index c054a1fb73..0000000000 --- a/spring-integration-samples/xml/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - org.springframework.integration.samples - spring-integration-samples - 2.0.0.BUILD-SNAPSHOT - - xml - Spring Integration XML Sample - - - org.springframework.integration - spring-integration-xml - - - - - repository.springframework.maven.release - Spring Framework Maven Release Repository - http://maven.springframework.org/release - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - repository.springframework.maven.snapshot - Spring Framework Maven Snapshot Repository - http://maven.springframework.org/snapshot - - - diff --git a/spring-integration-samples/xml/src/main/java/log4j.xml b/spring-integration-samples/xml/src/main/java/log4j.xml deleted file mode 100644 index da6411c70a..0000000000 --- a/spring-integration-samples/xml/src/main/java/log4j.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/BookOrderProcessingSample.java b/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/BookOrderProcessingSample.java deleted file mode 100644 index a53ccd36da..0000000000 --- a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/BookOrderProcessingSample.java +++ /dev/null @@ -1,74 +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.samples.xml; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.w3c.dom.Document; - -import org.springframework.context.support.AbstractApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.Resource; -import org.springframework.integration.MessageChannel; -import org.springframework.integration.message.GenericMessage; - -/** - * This example demonstrates the processing of an order for books using - * several of the components provided by the Spring Integration Xml - * module for dealing with Xml payloads. This includes: - * - *

      - *
    • an XPath based implementation of the splitter pattern to split an - * order with multiple items into several order messages for separate - * processing.
    • - *
    • XPath expression namespace support to build an XPath expression to - * extract the isbn from each order item.
    • - *
    • an XPath router implementation to route messages according to the - * evaluation of an XPath expression which tests to see if the order item is in - * stock.
    • - *
    • an XSLT transformer implementation to transform the payload of the - * order message into a resupply message where the order item is found to be - * out of stock.
    • - *
    - * - * @author Jonas Partner - */ -public class BookOrderProcessingSample { - - public static void main(String[] args) throws Exception { - AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext("orderProcessingSample.xml", - BookOrderProcessingSample.class); - MessageChannel messageChannel = (MessageChannel) applicationContext.getBean("ordersChannel"); - GenericMessage orderMessage = createXmlMessageFromResource("org/springframework/integration/samples/xml/order.xml"); - messageChannel.send(orderMessage); - applicationContext.close(); - } - - private static GenericMessage createXmlMessageFromResource(String path) throws Exception { - Resource orderRes = new ClassPathResource(path); - - DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); - builderFactory.setNamespaceAware(true); - DocumentBuilder builder = builderFactory.newDocumentBuilder(); - - Document orderDoc = builder.parse(orderRes.getInputStream()); - return new GenericMessage(orderDoc); - } - -} diff --git a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/ExternalResupply.java b/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/ExternalResupply.java deleted file mode 100644 index 3923057eaf..0000000000 --- a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/ExternalResupply.java +++ /dev/null @@ -1,27 +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.samples.xml; - -import org.w3c.dom.Document; - -public class ExternalResupply { - - public void orderResupply(Document resupplyOrder) { - System.out.println("Placing resupply order: " + XmlUtil.docAsString(resupplyOrder)); - } - -} diff --git a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/StockChecker.java b/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/StockChecker.java deleted file mode 100644 index f481f1a151..0000000000 --- a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/StockChecker.java +++ /dev/null @@ -1,46 +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.samples.xml; - -import org.w3c.dom.Document; - -import org.springframework.xml.xpath.XPathExpression; - -/** - * @author Jonas Partner - */ -public class StockChecker { - - private final XPathExpression isbnSelectingXPath; - - public StockChecker(XPathExpression isbnSelectingXPath) { - this.isbnSelectingXPath = isbnSelectingXPath; - } - - public Document checkStockLevel(Document doc) { - String isbn = isbnSelectingXPath.evaluateAsString(doc); - boolean inStock = false; - - // we only carry stock of one book currently - if ("0321200683".equals(isbn)) { - inStock = true; - } - doc.getDocumentElement().setAttribute("in-stock", String.valueOf(inStock)); - return doc; - } - -} diff --git a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/WarehouseDispatch.java b/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/WarehouseDispatch.java deleted file mode 100644 index 832f8f7a79..0000000000 --- a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/WarehouseDispatch.java +++ /dev/null @@ -1,27 +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.samples.xml; - -import org.w3c.dom.Document; - -public class WarehouseDispatch { - - public void dispatch(Document orderItem){ - System.out.println("Warehouse dispatching orderItem: " + XmlUtil.docAsString(orderItem)); - } - -} diff --git a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/XmlUtil.java b/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/XmlUtil.java deleted file mode 100644 index c703523a08..0000000000 --- a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/XmlUtil.java +++ /dev/null @@ -1,44 +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.samples.xml; - -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; - -import org.w3c.dom.Document; - -import org.springframework.xml.transform.StringResult; - -/** - * @author Jonas Partner - */ -public class XmlUtil { - - public static String docAsString(Document doc) { - try { - StringResult res = new StringResult(); - Transformer transformer = TransformerFactory.newInstance().newTransformer(); - transformer.transform(new DOMSource(doc), res); - return res.toString(); - } - catch (Exception e) { - throw new RuntimeException(e); - } - } - -} diff --git a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/bigBooksSupplierTransformer.xsl b/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/bigBooksSupplierTransformer.xsl deleted file mode 100644 index 0791aff407..0000000000 --- a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/bigBooksSupplierTransformer.xsl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - smallbooks - 5 - - - - - - - - \ No newline at end of file diff --git a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/order.xml b/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/order.xml deleted file mode 100644 index cb4c48cbbe..0000000000 --- a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/order.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - 0321200683 - 2 - - - 1590596439 - 1 - - \ No newline at end of file diff --git a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/orderProcessingSample.xml b/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/orderProcessingSample.xml deleted file mode 100644 index 62f391c002..0000000000 --- a/spring-integration-samples/xml/src/main/java/org/springframework/integration/samples/xml/orderProcessingSample.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -