From 51e5ca754d3d79393793fddcfd6079f3b0c70d8a Mon Sep 17 00:00:00 2001 From: bdaniel Date: Fri, 17 Sep 2010 18:10:18 +0000 Subject: 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 --- .../apache/tuscany/sca/interfacedef/Operation.java | 5 ++++ .../tuscany/sca/interfacedef/ParameterMode.java | 28 ++++++++++++++++++++++ .../sca/interfacedef/impl/DataTypeImpl.java | 15 ++++++++---- .../sca/interfacedef/impl/OperationImpl.java | 6 +++++ 4 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 sca-java-2.x/trunk/modules/assembly/src/main/java/org/apache/tuscany/sca/interfacedef/ParameterMode.java (limited to 'sca-java-2.x/trunk/modules/assembly/src/main') 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 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 implements DataType { 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> inputType; private List faultTypes; private Interface interfaze; + private List parameterModes = new ArrayList(); private boolean nonBlocking; private boolean wrapperStyle; private WrapperInfo wrapper; @@ -279,4 +281,8 @@ public class OperationImpl implements Operation { return false; } + public List getParameterModes() { + return this.parameterModes; + } + } -- cgit v1.2.3