summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-12-05 12:23:45 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-12-05 12:23:45 +0000
commite0ebb0d6572598345f52c7d2d56cd28b50f69e99 (patch)
tree16b434acf62d2e3eaa963e229811368fb190a55e /sca-java-2.x
parentf6578a250b378e28f37cae3b56a7431d3439b616 (diff)
TUSCANY_3965: Add a field thats annotated but not with an SCA annotation to match the scenario as described in TUSCANY_3965
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1210425 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x')
-rw-r--r--sca-java-2.x/trunk/testing/itest/properties/pom.xml6
-rw-r--r--sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedCTCalcComponentImpl.java5
-rw-r--r--sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/DefaultHelperContext.java35
3 files changed, 46 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/properties/pom.xml b/sca-java-2.x/trunk/testing/itest/properties/pom.xml
index ba8a3deaab..8df05dee37 100644
--- a/sca-java-2.x/trunk/testing/itest/properties/pom.xml
+++ b/sca-java-2.x/trunk/testing/itest/properties/pom.xml
@@ -70,5 +70,11 @@
<version>2.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sdo</groupId>
+ <artifactId>tuscany-sdo-api-r2.1</artifactId>
+ <version>1.1.1</version>
+ </dependency>
</dependencies>
</project>
diff --git a/sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedCTCalcComponentImpl.java b/sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedCTCalcComponentImpl.java
index ab1e7ae1c7..c37a21ec8f 100644
--- a/sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedCTCalcComponentImpl.java
+++ b/sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedCTCalcComponentImpl.java
@@ -20,6 +20,8 @@ package org.apache.tuscany.sca.itest.ctcalc;
import org.oasisopen.sca.annotation.Service;
+import commonj.sdo.helper.HelperContext;
+
@Service(CTCalcComponent.class)
public class AnnotatedCTCalcComponentImpl extends BaseCTCalcComponentImpl {
@@ -27,6 +29,9 @@ public class AnnotatedCTCalcComponentImpl extends BaseCTCalcComponentImpl {
protected String aPropertyProtected;
public String aPropertyPublic;
+ @DefaultHelperContext
+ protected HelperContext hc;
+
public String test(){
return "Annotated";
}
diff --git a/sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/DefaultHelperContext.java b/sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/DefaultHelperContext.java
new file mode 100644
index 0000000000..cb5021d343
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/DefaultHelperContext.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.apache.tuscany.sca.itest.ctcalc;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+@Target({TYPE, METHOD, FIELD, PARAMETER})
+@Retention(RUNTIME)
+public @interface DefaultHelperContext {
+
+}