From 235fc4303ddf893f928f6c1803bf7eb9d9aeebd9 Mon Sep 17 00:00:00 2001 From: slaws Date: Wed, 14 Dec 2011 13:24:50 +0000 Subject: TUSCANY-3924 playing with whether we should take note of inherited annotations as per JSR-250. Test ignored but I don't want to loose it. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1214234 13f79535-47bb-0310-9956-ffa450edef68 --- .../ctcalc/Annotated2CTCalcComponentImpl.java | 36 ++++++++++++++ .../ctcalc/AnnotatedBaseCTCalcComponentImpl.java | 58 ++++++++++++++++++++++ .../src/main/resources/CTCalcTest.composite | 8 +++ 3 files changed, 102 insertions(+) create mode 100644 sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/Annotated2CTCalcComponentImpl.java create mode 100644 sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedBaseCTCalcComponentImpl.java (limited to 'sca-java-2.x/trunk/testing/itest/properties/src/main') diff --git a/sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/Annotated2CTCalcComponentImpl.java b/sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/Annotated2CTCalcComponentImpl.java new file mode 100644 index 0000000000..b0758d177c --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/Annotated2CTCalcComponentImpl.java @@ -0,0 +1,36 @@ +/* + * 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 org.oasisopen.sca.annotation.Property; +import org.oasisopen.sca.annotation.Service; + +@Service(CTCalcComponent.class) +public class Annotated2CTCalcComponentImpl extends AnnotatedBaseCTCalcComponentImpl { + + private String aPropertyPrivate; + protected String aPropertyProtected; + public String aPropertyPublic; + @Property + public String aPropertyAnnotated; + + 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/AnnotatedBaseCTCalcComponentImpl.java b/sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedBaseCTCalcComponentImpl.java new file mode 100644 index 0000000000..a474756c27 --- /dev/null +++ b/sca-java-2.x/trunk/testing/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ctcalc/AnnotatedBaseCTCalcComponentImpl.java @@ -0,0 +1,58 @@ +/* + * 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 org.oasisopen.sca.annotation.Property; + +public class AnnotatedBaseCTCalcComponentImpl implements CTCalcComponent { + + private String notAPropertyPrivate; + protected String notAPropertyProtected; + + @Property + public String aPropertyPublic; + + public String getNotAPropertyPrivate() { + return notAPropertyPrivate; + } + + public void setNotAPropertyPrivate(String notAPropertyPrivate) { + this.notAPropertyPrivate = notAPropertyPrivate; + } + + public String getNotAPropertyProtected() { + return notAPropertyProtected; + } + + public void setNotAPropertyProtected(String notAPropertyProtected) { + this.notAPropertyProtected = notAPropertyProtected; + } + + public String getNotAPropertyPublic() { + return aPropertyPublic; + } + + public void setNotAPropertyPublic(String notAPropertyPublic) { + this.aPropertyPublic = notAPropertyPublic; + } + + public String test(){ + return "XXX"; + } +} diff --git a/sca-java-2.x/trunk/testing/itest/properties/src/main/resources/CTCalcTest.composite b/sca-java-2.x/trunk/testing/itest/properties/src/main/resources/CTCalcTest.composite index c242c78970..e562568492 100644 --- a/sca-java-2.x/trunk/testing/itest/properties/src/main/resources/CTCalcTest.composite +++ b/sca-java-2.x/trunk/testing/itest/properties/src/main/resources/CTCalcTest.composite @@ -32,5 +32,13 @@ + + + + + + -- cgit v1.2.3