diff options
Diffstat (limited to 'branches/sca-java-0.90/itest/properties/src')
18 files changed, 0 insertions, 1166 deletions
diff --git a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java b/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java deleted file mode 100644 index 667b854c10..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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; - -public interface ABCDComponent { - String getA(); - String getB(); - String getC(); - String getD(); -} - diff --git a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java b/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java deleted file mode 100644 index 51d4d9b3cb..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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; - -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; - -@Scope("COMPOSITE") -public class ABCDComponentImpl implements ABCDComponent { - private ABComponent abComponent; - private CDComponent cdComponent; - - @Reference - public void setAb(ABComponent component) { - this.abComponent = component; - } - - @Reference - public void setCd(CDComponent component) { - this.cdComponent = component; - } - - public String getA() { - return this.abComponent.getA(); - } - - public String getB() { - return this.abComponent.getB(); - } - - public String getC() { - return this.cdComponent.getC(); - } - - public String getD() { - return this.cdComponent.getD(); - } -} diff --git a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java b/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java deleted file mode 100644 index c33c140aec..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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; - -import java.util.Collection; - -import org.osoa.sca.annotations.Remotable; -@Remotable -public interface ABComponent { - - String getA(); - String getB(); - String getZ(); - int getIntValue(); - String getF(); - Collection<String> getManyStringValues(); - Collection<Integer> getManyIntegers(); -} diff --git a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java b/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java deleted file mode 100644 index b78d6380ef..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 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; - -import java.util.Collection; - -import org.osoa.sca.annotations.Property; - -public class ABComponentImpl implements ABComponent { - - private String aProperty; - private String bProperty; - private int intValue; - private Collection<String> manyStringValues; - private Collection<Integer> manyIntegerValues; - private String zProperty; - private String fProperty; - - @Property(name="xpath") - public void setZProperty(final String value) { - this.zProperty = value; - } - - @Property(name="foobar") - public void setManyStringValues(final Collection<String> value) { - this.manyStringValues = value; - } - - @Property(name="fooInts") - public void setManyIntegers(final Collection<Integer> value) { - this.manyIntegerValues = value; - } - - @Property - public void setA(final String A) { - this.aProperty = A; - } - - @Property - public void setB(final String B) { - this.bProperty = B; - } - - @Property - public void setF(final String F) { - this.fProperty = F; - } - - @Property - public void setOne(final int value) { - this.intValue = value; - } - - public String getA() { - return this.aProperty; - } - - public String getB() { - return this.bProperty; - } - - public int getIntValue() { - return this.intValue; - } - - public String getZ() { - return this.zProperty; - } - - public String getF() { - return this.fProperty; - } - - public Collection<String> getManyStringValues() { - return manyStringValues; - } - - public Collection<Integer> getManyIntegers() { - return manyIntegerValues; - } -} diff --git a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java b/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java deleted file mode 100644 index cd3046c62c..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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; - -import java.util.Collection; - -public interface CDComponent { - - String getC(); - String getC2(); - String getD(); - String getNoSource(); - String getFileProperty(); - Collection<String> getManyValuesFileProperty(); - int getOverrideValue(); -} diff --git a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java b/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java deleted file mode 100644 index aec71d30f9..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * 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; - -import java.util.Collection; - -import org.osoa.sca.annotations.Property; - -public class CDComponentImpl implements CDComponent { - - private String cProperty; - private String dProperty; - private String nosource; - private String fileProperty; - private Collection<String> manyValuesFileProperty; - private int overrideNumber; - private String cProperty2; - - @Property(name="nonFileProperty") - public void setC2(final String value) { - this.cProperty2 = value; - } - @Property(name="two") - public void setOverrideNumber(final int value) { - this.overrideNumber = value; - } - - @Property(name="fileProperty") - public void setFileProp(final String value) { - this.fileProperty = value; - } - - @Property(name="manyValuesFileProperty") - public void setFileManyValueProp(final Collection<String> values) { - this.manyValuesFileProperty = values; - } - - @Property - public void setC(final String C) { - this.cProperty = C; - } - - @Property - public void setD(final String D) { - this.dProperty = D; - } - - @Property - public void setNosource(final String value) { - this.nosource = value; - } - - public String getFileProperty() { - return this.fileProperty; - } - - public String getC() { - return this.cProperty; - } - - public String getC2() { - return this.cProperty2; - } - - public String getD() { - return this.dProperty; - } - - public String getNoSource() { - return this.nosource; - } - - public int getOverrideValue() { - return this.overrideNumber; - } - public Collection<String> getManyValuesFileProperty() { - return this.manyValuesFileProperty; - } -} - diff --git a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java b/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java deleted file mode 100644 index 56820279d6..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/ComplexPropertyBean.java +++ /dev/null @@ -1,88 +0,0 @@ -/*
- * 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;
-
-public class ComplexPropertyBean {
-
- protected int integerNumber = 25;
- public float floatNumber = 50;
- public double doubleNumber = 75;
- public int[] intArray = null;
- public double[] doubleArray = null;
- protected String[] stringArray = null;
-
- ComplexPropertyBean numberSet;
- public ComplexPropertyBean[] numberSetArray = null;
-
- public ComplexPropertyBean() {
-
- }
-
- public double getDoubleNumber() {
- return doubleNumber;
- }
-
- public void setDoubleNumber(double doubleNumber) {
- this.doubleNumber = doubleNumber;
- }
-
- public float getFloatNumber() {
- return floatNumber;
- }
-
- public void setFloatNumber(float floatNumber) {
- this.floatNumber = floatNumber;
- }
-
- public int getIntegerNumber() {
- return integerNumber;
- }
-
- public void setIntegerNumber(int integerNumber) {
- this.integerNumber = integerNumber;
- }
-
- public ComplexPropertyBean getNumberSet() {
- return numberSet;
- }
-
- public void setNumberSet(ComplexPropertyBean numberSet) {
- this.numberSet = numberSet;
- }
-
- public String toString() {
- return Double.toString(integerNumber) + " - " +
- Double.toString(floatNumber) + " - " +
- Double.toString(doubleNumber) + " \n" +
- ((intArray == null ) ? "" : intArray[0] + " - " + intArray[1] + " \n " ) +
- ((doubleArray == null ) ? "" : doubleArray[0] + " - " + doubleArray[1] + " \n " ) +
- ((stringArray == null ) ? "" : stringArray[0] + " - " + stringArray[1] + " \n " ) +
- ((numberSetArray == null ) ? "" : numberSetArray[0] + " - " + numberSetArray[1] + " \n " ) +
- ((numberSet == null ) ? "" : numberSet.toString());
- }
-
- public String[] getStringArray() {
- return stringArray;
- }
-
- public void setStringArray(String[] stringArray) {
- this.stringArray = stringArray;
- }
-}
diff --git a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java b/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java deleted file mode 100644 index 116cdef48f..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java +++ /dev/null @@ -1,25 +0,0 @@ - -/* - * 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; - -public interface OverrideService { - -} diff --git a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java b/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java deleted file mode 100644 index a36bb5e419..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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; - -public class OverrideServiceImpl implements OverrideService { - -} diff --git a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java b/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java deleted file mode 100644 index a76f17bcad..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponent.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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; - -import java.util.Collection; - - -public interface PropertyComponent { - public String getLocation(); - public String getYear(); - public ComplexPropertyBean getComplexPropertyOne(); - public ComplexPropertyBean getComplexPropertyTwo(); - public ComplexPropertyBean getComplexPropertyThree(); - public Collection<ComplexPropertyBean> getComplexPropertyFour(); -} diff --git a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java b/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java deleted file mode 100644 index be99611dfa..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyComponentImpl.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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; - -import java.util.Collection; - -import org.osoa.sca.annotations.Property; - -public class PropertyComponentImpl implements PropertyComponent { - @Property - protected ComplexPropertyBean complexPropertyOne; - - @Property - protected ComplexPropertyBean complexPropertyTwo; - - @Property - protected ComplexPropertyBean complexPropertyThree; - - @Property - protected Collection<ComplexPropertyBean> complexPropertyFour; - - @Property(name = "location") - protected String location = "RTP"; - - @Property(name = "year") - protected String year = "2006"; - - public String getLocation(){ - return location; - } - - public String getYear(){ - return year; - } - - public ComplexPropertyBean getComplexPropertyOne() { - //System.out.println(complexPropertyOne); - return complexPropertyOne; - } - - public ComplexPropertyBean getComplexPropertyTwo() { - //System.out.println(complexPropertyTwo); - return complexPropertyTwo; - } - - public ComplexPropertyBean getComplexPropertyThree() { - //System.out.println(complexPropertyThree); - return complexPropertyThree; - } - - public Collection<ComplexPropertyBean> getComplexPropertyFour() { - //System.out.println(complexPropertyThree); - return complexPropertyFour; - } -} diff --git a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java b/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java deleted file mode 100644 index f20d295a06..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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; - -public interface PropertyService { - -} diff --git a/branches/sca-java-0.90/itest/properties/src/main/resources/OuterPropertyTest.composite b/branches/sca-java-0.90/itest/properties/src/main/resources/OuterPropertyTest.composite deleted file mode 100644 index 43853d46a5..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/resources/OuterPropertyTest.composite +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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
- * 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.
--->
-<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
- xmlns:foo="http://foo"
- targetNamespace="http://foo"
- name="OuterPropertyTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
- <component name="OuterComponent">
- <implementation.composite name="foo:PropertyTest"/>
- <property name="number">125</property>
- <property name="complex" type="foo:MyComplexType">
- <foo:MyComplexValue xsi:type="foo:MyComplexType" >
- <foo:a>Overriden A</foo:a>
- <foo:b>Overriden B</foo:b>
- <foo:c>Overriden C</foo:c>
- <foo:d>Overriden D</foo:d>
- <foo:x>
- <foo:y>Overriden Y</foo:y>
- <foo:z>Overriden Z</foo:z>
- </foo:x>
- </foo:MyComplexValue>
- </property>
- </component>
-</composite>
-
diff --git a/branches/sca-java-0.90/itest/properties/src/main/resources/PropertyTest.composite b/branches/sca-java-0.90/itest/properties/src/main/resources/PropertyTest.composite deleted file mode 100644 index a678451c74..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/resources/PropertyTest.composite +++ /dev/null @@ -1,193 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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 - * 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. ---> -<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" - xmlns:foo="http://foo" - targetNamespace="http://foo" - name="PropertyTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - - <service name="ProperterTestService" promote="ABComponent"> - <interface.java interface="org.apache.tuscany.sca.itest.ABComponent"/> - </service> - - <property name="number" type="xsd:int">1</property> - <property name="complex" type="foo:MyComplexType" > - <foo:MyComplexValue xsi:type="foo:MyComplexType" > - <foo:a>a</foo:a> - <foo:b>b</foo:b> - <foo:c>c</foo:c> - <foo:d>d</foo:d> - <foo:x> - <foo:y>y</foo:y> - <foo:z>z</foo:z> - </foo:x> - </foo:MyComplexValue> - </property> - - <property name="moreComplex" type="foo:MyMoreComplexType"> - <foo:MyMoreComplexValue xsi:type="foo:MyMoreComplexType"> - <foo:numberSetArray> - <foo:integerNumber>1</foo:integerNumber> - <foo:floatNumber>11</foo:floatNumber> - <foo:doubleNumber>111</foo:doubleNumber> - </foo:numberSetArray> - <foo:numberSetArray> - <foo:integerNumber>2</foo:integerNumber> - <foo:floatNumber>22</foo:floatNumber> - <foo:doubleNumber>222</foo:doubleNumber> - </foo:numberSetArray> - <foo:stringArray>TestString_1</foo:stringArray> - <foo:intArray>10</foo:intArray> - <foo:stringArray>TestString_2</foo:stringArray> - <foo:intArray>20</foo:intArray> - <foo:integerNumber>27</foo:integerNumber> - <foo:floatNumber>79.34</foo:floatNumber> - <foo:doubleNumber>184.52</foo:doubleNumber> - <foo:doubleArray>50.05</foo:doubleArray> - <foo:doubleArray>25.52</foo:doubleArray> - <foo:numberSet> - <foo:integerNumber>54</foo:integerNumber> - <foo:floatNumber>158.68</foo:floatNumber> - <foo:doubleNumber>369.04</foo:doubleNumber> - </foo:numberSet> - </foo:MyMoreComplexValue> - </property> - - <component name="ABCDComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.ABCDComponentImpl"/> - <reference name="ab" target="ABComponent"/> - <reference name="cd" target="CDComponent"/> - </component> - - <component name="ABComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.ABComponentImpl"/> - <property name="a" source="$complex/foo:MyComplexValue/foo:a"/> - <property name="b" source="$complex/foo:MyComplexValue/foo:b"/> - <property name="f" source="$complex/foo:MyComplexValue/foo:a">f</property> - <property name="xpath" source="$complex/foo:MyComplexValue/foo:x/*[local-name()='z']"/> - <property name="one" source="$number"/> - <property name="foobar" many="true">"Apache" "Tuscany" "Java SCA"</property> - <property name="fooInts" many="true">123 456 789</property> - </component> - - - <component name="CDComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.CDComponentImpl"/> - <property name="c" source="$complex/foo:MyComplexValue/foo:c"/> - <property name="d" source="$complex/foo:MyComplexValue/foo:d"/> - <property name="nosource">aValue</property> - <property name="fileProperty" file="fileProperty.txt"/> - <property name="manyValuesFileProperty" many="true" file="manyValuesFileProperty.txt"/> - <property name="nonFileProperty" file="fileProperty.txt" source="$complex/foo:MyComplexValue/foo:c"/> - <property name="two" source="$number">25</property> - </component> - - <component name="PropertyComponent"> - <implementation.java class="org.apache.tuscany.sca.itest.PropertyComponentImpl"/> - <property name="complexPropertyOne" source="$moreComplex"></property> - <property name="complexPropertyTwo"> - <foo:MyAnotherComplexValue> - <foo:stringArray>TestString_1</foo:stringArray> - <foo:stringArray>TestString_2</foo:stringArray> - <foo:intArray>10</foo:intArray> - <foo:integerNumber>27</foo:integerNumber> - <foo:floatNumber>79.34</foo:floatNumber> - <foo:doubleArray>25.52</foo:doubleArray> - <foo:doubleNumber>184.52</foo:doubleNumber> - <foo:doubleArray>50.05</foo:doubleArray> - <foo:intArray>20</foo:intArray> - <foo:numberSetArray> - <foo:integerNumber>1</foo:integerNumber> - <foo:floatNumber>11</foo:floatNumber> - <foo:doubleNumber>111</foo:doubleNumber> - </foo:numberSetArray> - <foo:numberSetArray> - <foo:integerNumber>2</foo:integerNumber> - <foo:floatNumber>22</foo:floatNumber> - <foo:doubleNumber>222</foo:doubleNumber> - </foo:numberSetArray> - <foo:numberSet> - <foo:integerNumber>54</foo:integerNumber> - <foo:floatNumber>158.68</foo:floatNumber> - <foo:doubleNumber>369.04</foo:doubleNumber> - </foo:numberSet> - </foo:MyAnotherComplexValue> - </property> - <property name="complexPropertyThree" element="foo:PropertyThreeElement"> - <foo:PropertyThreeElement> - <foo:stringArray>TestElementString_1</foo:stringArray> - <foo:stringArray>TestElementString_2</foo:stringArray> - <foo:intArray>10</foo:intArray> - <foo:integerNumber>27</foo:integerNumber> - <foo:floatNumber>79.34</foo:floatNumber> - <foo:doubleArray>25.52</foo:doubleArray> - <foo:doubleNumber>184.52</foo:doubleNumber> - <foo:doubleArray>50.05</foo:doubleArray> - <foo:intArray>20</foo:intArray> - <foo:numberSetArray> - <foo:integerNumber>1</foo:integerNumber> - <foo:floatNumber>11</foo:floatNumber> - <foo:doubleNumber>111</foo:doubleNumber> - </foo:numberSetArray> - <foo:numberSetArray> - <foo:integerNumber>2</foo:integerNumber> - <foo:floatNumber>22</foo:floatNumber> - <foo:doubleNumber>222</foo:doubleNumber> - </foo:numberSetArray> - <foo:numberSet> - <foo:integerNumber>54</foo:integerNumber> - <foo:floatNumber>158.68</foo:floatNumber> - <foo:doubleNumber>369.04</foo:doubleNumber> - </foo:numberSet> - </foo:PropertyThreeElement> - </property> - <property name="complexPropertyFour" element="foo:PropertyFourElement" many="true"> - <foo:PropertyFourElement> - <foo:integerNumber>1</foo:integerNumber> - <foo:floatNumber>11.11</foo:floatNumber> - <foo:doubleNumber>111.111</foo:doubleNumber> - <foo:numberSet> - <foo:integerNumber>11</foo:integerNumber> - <foo:floatNumber>1111.1111</foo:floatNumber> - <foo:doubleNumber>11111.11111</foo:doubleNumber> - </foo:numberSet> - </foo:PropertyFourElement> - <foo:PropertyFourElement> - <foo:integerNumber>2</foo:integerNumber> - <foo:floatNumber>22.22</foo:floatNumber> - <foo:doubleNumber>222.222</foo:doubleNumber> - <foo:numberSet> - <foo:integerNumber>22</foo:integerNumber> - <foo:floatNumber>2222.2222</foo:floatNumber> - <foo:doubleNumber>22222.22222</foo:doubleNumber> - </foo:numberSet> - </foo:PropertyFourElement> - <foo:PropertyFourElement> - <foo:integerNumber>3</foo:integerNumber> - <foo:floatNumber>33.33</foo:floatNumber> - <foo:doubleNumber>333.333</foo:doubleNumber> - <foo:numberSet> - <foo:integerNumber>33</foo:integerNumber> - <foo:floatNumber>3333.3333</foo:floatNumber> - <foo:doubleNumber>33333.33333</foo:doubleNumber> - </foo:numberSet> - </foo:PropertyFourElement> - </property> - </component> -</composite> - diff --git a/branches/sca-java-0.90/itest/properties/src/main/resources/fileProperty.txt b/branches/sca-java-0.90/itest/properties/src/main/resources/fileProperty.txt deleted file mode 100644 index 0d3d9ead83..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/resources/fileProperty.txt +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * 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. ---> - -<filePropertyTest>fileValue</filePropertyTest> diff --git a/branches/sca-java-0.90/itest/properties/src/main/resources/manyValuesFileProperty.txt b/branches/sca-java-0.90/itest/properties/src/main/resources/manyValuesFileProperty.txt deleted file mode 100644 index 450f397b30..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/main/resources/manyValuesFileProperty.txt +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * 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.
--->
-
-<manyFilePropertyValues>
- "fileValueOne" "fileValueTwo" "fileValueThree" "fileValueFour"
-</manyFilePropertyValues>
diff --git a/branches/sca-java-0.90/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java b/branches/sca-java-0.90/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java deleted file mode 100644 index b2ac537dec..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/test/java/org/apache/tuscany/sca/itest/OuterPropertyTestCase.java +++ /dev/null @@ -1,92 +0,0 @@ -/*
- * 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;
-
-import static junit.framework.Assert.assertEquals;
-
-import java.util.Iterator;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class OuterPropertyTestCase {
-
- private static SCADomain domain;
- private static ABComponent outerABService;
-
- @BeforeClass
- public static void init() throws Exception {
- domain = SCADomain.newInstance("OuterPropertyTest.composite");
- outerABService = domain.getService(ABComponent.class, "OuterComponent");
- }
-
- @AfterClass
- public static void destroy() throws Exception {
- domain.close();
- }
-
- @Test
- public void testOverridenA() {
- assertEquals("Overriden A", outerABService.getA());
- }
-
- @Test
- public void testOverridenB() {
- assertEquals("Overriden B", outerABService.getB());
- }
-
- @Test
- public void testOverridenF() {
- assertEquals("Overriden A", outerABService.getF());
- }
-
- @Test
- public void testOverridenZ() {
- assertEquals("Overriden Z", outerABService.getZ());
- }
-
- @Test
- public void testOverridenIntValue() {
- assertEquals(125, outerABService.getIntValue());
- }
-
- @Test
- public void testDefaultValue() {
- assertEquals(125, outerABService.getIntValue());
- }
-
- @Test
- public void testManySimpleStringValues() {
- Iterator<String> iterator = outerABService.getManyStringValues().iterator();
- assertEquals("Apache", iterator.next());
- assertEquals("Tuscany", iterator.next());
- assertEquals("Java SCA", iterator.next());
- }
-
- @Test
- public void testManySimpleIntegerValues() {
- Iterator<Integer> iterator = outerABService.getManyIntegers().iterator();
- assertEquals(123, iterator.next().intValue());
- assertEquals(456, iterator.next().intValue());
- assertEquals(789, iterator.next().intValue());
- }
-}
diff --git a/branches/sca-java-0.90/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java b/branches/sca-java-0.90/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java deleted file mode 100644 index 4e9c76bf09..0000000000 --- a/branches/sca-java-0.90/itest/properties/src/test/java/org/apache/tuscany/sca/itest/PropertyTestCase.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * 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; - -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNotNull; - -import java.util.Iterator; - -import org.apache.tuscany.sca.host.embedded.SCADomain; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class PropertyTestCase { - private static SCADomain domain; - private static ABComponent abService; - private static CDComponent cdService; - private static ABCDComponent abcdService; - private static PropertyComponent propertyService; - - @Test - public void testA() { - assertEquals("a", abService.getA()); - } - - @Test - public void testB() { - assertEquals("b", abService.getB()); - } - - @Test - public void testC() { - assertEquals("c", cdService.getC()); - } - - @Test - public void testC2() { - assertEquals("c", cdService.getC2()); - } - - @Test - public void testD() { - assertEquals("d", cdService.getD()); - } - - @Test - public void testF() { - assertEquals("a", abService.getF()); - } - - @Test - public void testZ() { - assertEquals("z", abService.getZ()); - } - - @Test - public void testIntValue() { - assertEquals(1, abService.getIntValue()); - } - - @Test - public void testDefaultValue() { - assertEquals(1, abService.getIntValue()); - } - - @Test - public void testDefaultValueOverride() { - assertEquals(1, cdService.getOverrideValue()); - } - - @Test - public void testNoSource() { - assertEquals("aValue", cdService.getNoSource()); - } - - @Test - public void testFileProperty() { - assertEquals("fileValue", cdService.getFileProperty()); - } - - @Test - public void testManyValuesFileProperty() { - Iterator<String> iterator = cdService.getManyValuesFileProperty().iterator(); - iterator.next(); - String secondValue = iterator.next(); - assertEquals(4, cdService.getManyValuesFileProperty().size()); - assertEquals("fileValueTwo", secondValue); - } - - @Test - public void testABCD() { - assertEquals("a", abcdService.getA()); - assertEquals("b", abcdService.getB()); - assertEquals("c", abcdService.getC()); - assertEquals("d", abcdService.getD()); - } - - @Test - public void testDefaultProperty() { - assertEquals("RTP", propertyService.getLocation()); - assertEquals("2006", propertyService.getYear()); - - } - - @Test - public void testManySimpleStringValues() { - Iterator<String> iterator = abService.getManyStringValues().iterator(); - assertEquals("Apache", iterator.next()); - assertEquals("Tuscany", iterator.next()); - assertEquals("Java SCA", iterator.next()); - } - - @Test - public void testManySimpleIntegerValues() { - Iterator<Integer> iterator = abService.getManyIntegers().iterator(); - assertEquals(123, iterator.next().intValue()); - assertEquals(456, iterator.next().intValue()); - assertEquals(789, iterator.next().intValue()); - } - - @Test - public void testComplexPropertyOne() { - ComplexPropertyBean propBean = propertyService.getComplexPropertyOne(); - assertNotNull(propBean); - assertEquals("TestString_1", propBean.getStringArray()[0]); - assertEquals(2, propBean.numberSetArray[1].integerNumber); - } - - @Test - public void testComplexPropertyTwo() { - ComplexPropertyBean propBean = propertyService.getComplexPropertyTwo(); - assertNotNull(propBean); - assertEquals(10, propBean.intArray[0]); - assertEquals((float)22, propBean.numberSetArray[1].floatNumber); - } - - @Test - public void testComplexPropertyThree() { - ComplexPropertyBean propBean = propertyService.getComplexPropertyThree(); - assertNotNull(propBean); - assertEquals("TestElementString_1", propBean.stringArray[0]); - assertEquals((float)22, propBean.numberSetArray[1].floatNumber); - } - - @Test - public void testComplexPropertyFour() { - Object[] propBeanCollection = propertyService.getComplexPropertyFour().toArray(); - assertNotNull(propBeanCollection); - assertEquals(1, ((ComplexPropertyBean)propBeanCollection[0]).getIntegerNumber()); - assertEquals(222.222, ((ComplexPropertyBean)propBeanCollection[1]).getDoubleNumber()); - assertEquals(33, ((ComplexPropertyBean)propBeanCollection[2]).getNumberSet().getIntegerNumber()); - } - - @BeforeClass - public static void init() throws Exception { - domain = SCADomain.newInstance("PropertyTest.composite"); - abService = domain.getService(ABComponent.class, "ABComponent"); - cdService = domain.getService(CDComponent.class, "CDComponent"); - abcdService = domain.getService(ABCDComponent.class, "ABCDComponent"); - propertyService = - domain.getService(PropertyComponent.class, "PropertyComponent"); - } - - @AfterClass - public static void destroy() throws Exception { - domain.close(); - } -} |