7 | For further API reference and developer documentation, see the 8 | Spring 9 | Integration reference documentation. 10 | That documentation contains more detailed, developer-targeted 11 | descriptions, with conceptual overviews, definitions of terms, 12 | workarounds, and working code examples. 13 |
14 | 15 |16 | If you are interested in commercial training, consultancy, and 17 | support for Spring Integration, please visit 18 | https://spring.io/ 19 |
20 |47 | We were unable to render the requested view. Other representations 48 | of the data may however exist. 49 |
50 | 51 |true if the Twitter Adapter is running,
53 | * false otherwise.
54 | */
55 | boolean isTwitterAdapterRunning();
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/si-template-projects/adapter/wizard.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "elements" : {
4 | "element" : [
5 | {
6 | "name" : "SIAdapterUpperPrefix",
7 | "description" : "Please enter the adapter name prefix (camel case)",
8 | "defaultValue": "MyAdapter",
9 | "type" : "java.lang.String",
10 | "page" : 0,
11 | "required" : true,
12 | },
13 | {
14 | "name" : "siAdapterLowerPrefix",
15 | "description" : "Please enter the id prefix (lower case)",
16 | "defaultValue": "myadapter",
17 | "type" : "java.lang.String",
18 | "page" : 0,
19 | "required" : true,
20 | },
21 | {
22 | "name" : "SI-TEMPLATE-GROUP-ID",
23 | "description" : "Please enter a 'groupId, e.g. org.springintegration.adapter'",
24 | "type" : "java.lang.String",
25 | "page" : 0,
26 | "required" : true,
27 | },
28 | {
29 | "name" : "SI-TEMPLATE-BUILD-VERSION",
30 | "description" : "Please enter a build version e.g. '1.0.0.BUILD-SNAPSHOT'",
31 | "defaultValue": "1.0.0.BUILD-SNAPSHOT",
32 | "type" : "java.lang.String",
33 | "page" : 0,
34 | "required" : true,
35 | },
36 | {
37 | "name" : "SI-TEMPLATE-VERSION",
38 | "description" : "Please enter a short version e.g. '1.0' (For JavaDocs, XSDs)",
39 | "defaultValue": "1.0",
40 | "type" : "java.lang.String",
41 | "page" : 0,
42 | "required" : true,
43 | "replaceKind" : "fixedtoken"
44 | },
45 | {
46 | "name" : "SI-TEMPLATE-AUTHOR",
47 | "description" : "Please enter the author name",
48 | "defaultValue": "Your name",
49 | "type" : "java.lang.String",
50 | "page" : 0,
51 | "required" : true,
52 | },
53 | {
54 | "name" : "topLevelPackage",
55 | "description" : "Please specify the top-level package e.g. com.mycompany.myapp",
56 | "type" : "java.lang.String",
57 | "page" : 0,
58 | "required" : true,
59 | "pattern" : "\\w+(\\.\\w+)*",
60 | "replaceKind" : "topLevelPackage"
61 | }
62 | ]
63 | },
64 | "topLevelPackage" : "sipackage",
65 | "projectName" : "si-template-project-name",
66 | "pages" : {
67 | "page" : [
68 | {
69 | "order" : 0,
70 | "description" : "Project Settings"
71 | }
72 | ]
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/si-template-projects/si-template-standalone-simple-project/src/test/java/sipackage/StringConversionServiceTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2002-2013 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package sipackage;
18 |
19 | import static org.junit.Assert.*;
20 |
21 | import org.junit.Test;
22 | import org.springframework.context.ApplicationContext;
23 | import org.springframework.context.support.ClassPathXmlApplicationContext;
24 |
25 | import sipackage.service.StringConversionService;
26 |
27 | /**
28 | * Verify that the Spring Integration Application Context starts successfully.
29 | *
30 | * @author SI-TEMPLATE-AUTHOR
31 | * @since SI-TEMPLATE-VERSION
32 | *
33 | */
34 | public class StringConversionServiceTest {
35 |
36 | @Test
37 | public void testStartupOfSpringInegrationContext() throws Exception{
38 | new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml",
39 | StringConversionServiceTest.class);
40 | Thread.sleep(2000);
41 | }
42 |
43 | @Test
44 | public void testConvertStringToUpperCase() {
45 | final ApplicationContext context
46 | = new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml",
47 | StringConversionServiceTest.class);
48 |
49 | final StringConversionService service = context.getBean(StringConversionService.class);
50 |
51 | final String stringToConvert = "I love Spring Integration";
52 | final String expectedResult = "I LOVE SPRING INTEGRATION";
53 |
54 | final String convertedString = service.convertToUpperCase(stringToConvert);
55 |
56 | assertEquals("Expecting that the string is converted to upper case.",
57 | expectedResult, convertedString);
58 |
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/si-template-projects/si-template-war-project/src/test/java/sipackage/JacksonTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2002-2013 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package sipackage;
17 |
18 | import java.util.Date;
19 |
20 | import org.junit.Test;
21 | import org.slf4j.Logger;
22 | import org.slf4j.LoggerFactory;
23 |
24 | import sipackage.model.TwitterMessage;
25 | import sipackage.model.TwitterMessages;
26 | import sipackage.support.JaxbJacksonObjectMapper;
27 |
28 | /**
29 | *
30 | * @author SI-TEMPLATE-AUTHOR
31 | * @since SI-TEMPLATE-VERSION
32 | *
33 | */
34 | public class JacksonTest {
35 |
36 | private static final Logger LOGGER = LoggerFactory.getLogger(JacksonTest.class);
37 |
38 | @Test
39 | public void twitterMessageSerializationTest() throws Exception {
40 |
41 | final JaxbJacksonObjectMapper mapper = new JaxbJacksonObjectMapper();
42 |
43 | final TwitterMessage message = new TwitterMessage();
44 |
45 | message.setCreatedAt(new Date());
46 | message.setFromUser("user");
47 | message.setProfileImageUrl("profileImageUrl");
48 | message.setText("some text");
49 | message.setId(123456789L);
50 |
51 | final String json = mapper.writeValueAsString(message);
52 |
53 | LOGGER.info(json);
54 |
55 | final TwitterMessage message2 = new TwitterMessage();
56 | message2.setCreatedAt(new Date());
57 | message2.setFromUser("user");
58 | message2.setProfileImageUrl("profileImageUrl");
59 | message2.setText("some text");
60 | message2.setId(77777L);
61 |
62 | final TwitterMessages list = new TwitterMessages();
63 | list.getTwitterMessages().add(message);
64 | list.getTwitterMessages().add(message2);
65 |
66 | String json2 = mapper.writeValueAsString(list);
67 |
68 | LOGGER.info(json2);
69 |
70 | }
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/si-sts-templates/src/main/assembly/war.xml:
--------------------------------------------------------------------------------
1 | true.
39 |