diff options
author | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-09-17 18:10:18 +0000 |
---|---|---|
committer | bdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68> | 2010-09-17 18:10:18 +0000 |
commit | 51e5ca754d3d79393793fddcfd6079f3b0c70d8a (patch) | |
tree | 596d6a05fc034ec253af5caea34b735b6e4f72ac /sca-java-2.x/trunk/modules/assembly/src/main | |
parent | 7cb62d52d3c3b680c6984b987a1b212445c1bef8 (diff) |
TUSCANY-3664 Migrate 1.x Holder support to 2.x and add support for non-void methods and multiple Holders
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@998232 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/assembly/src/main')
4 files changed, 50 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Operation.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Operation.java index c71225c9e2..71c641fa38 100644 --- a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Operation.java +++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/Operation.java @@ -201,4 +201,9 @@ public interface Operation extends Cloneable, PolicySubject { */ Object clone() throws CloneNotSupportedException; + /** + * Returns the ParameterModes + * @return + */ + List<ParameterMode> getParameterModes(); } diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/ParameterMode.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/ParameterMode.java new file mode 100644 index 0000000000..c4244a3480 --- /dev/null +++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/ParameterMode.java @@ -0,0 +1,28 @@ +/*
+ * 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.interfacedef;
+
+/**
+ * Parameter mode
+ * @see http://java.sun.com/javase/6/docs/api/javax/jws/WebParam.Mode.html
+ */
+public enum ParameterMode {
+ IN, OUT, INOUT;
+}
diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/DataTypeImpl.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/DataTypeImpl.java index 12ea22938c..572dd7e356 100644 --- a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/DataTypeImpl.java +++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/DataTypeImpl.java @@ -150,11 +150,18 @@ public class DataTypeImpl<L> implements DataType<L> { this.dataBinding = dataBinding; } + @Override - public String toString() { - StringBuffer sb = new StringBuffer(); - sb.append(physical).append(" ").append(dataBinding).append(" ").append(logical); - return sb.toString(); + public String toString() { + StringBuilder b = new StringBuilder( 256 ); + b.append( "DataType[" ); + b.append( "dataBinding=" + ((dataBinding==null) ? "null" : dataBinding) ); + b.append( ", genericType=" + ((genericType==null) ? "null" : genericType) ); + b.append( ", physical=" + ((physical==null) ? "null" : physical) ); + b.append( ", logical=" + ((logical==null) ? "null" : logical) ); + b.append( ", metaData size=" + ((metaDataMap==null) ? "0" : metaDataMap.size()) ); + b.append( "]" ); + return b.toString(); } @SuppressWarnings("unchecked") diff --git a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java index 606782466d..21debb6ea3 100644 --- a/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java +++ b/sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/impl/OperationImpl.java @@ -29,6 +29,7 @@ import javax.xml.namespace.QName; import org.apache.tuscany.sca.interfacedef.DataType; import org.apache.tuscany.sca.interfacedef.Interface; import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.interfacedef.ParameterMode; import org.apache.tuscany.sca.interfacedef.util.WrapperInfo; import org.apache.tuscany.sca.interfacedef.util.XMLType; import org.apache.tuscany.sca.policy.ExtensionType; @@ -49,6 +50,7 @@ public class OperationImpl implements Operation { private DataType<List<DataType>> inputType; private List<DataType> faultTypes; private Interface interfaze; + private List<ParameterMode> parameterModes = new ArrayList<ParameterMode>(); private boolean nonBlocking; private boolean wrapperStyle; private WrapperInfo wrapper; @@ -279,4 +281,8 @@ public class OperationImpl implements Operation { return false; } + public List<ParameterMode> getParameterModes() { + return this.parameterModes; + } + } |