diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/core-databinding/src/main/java/org')
2 files changed, 8 insertions, 8 deletions
diff --git a/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java b/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java index 0ac448ce34..1386aa38e9 100644 --- a/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java +++ b/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java @@ -126,7 +126,7 @@ public class Input2InputTransformer extends BaseTransformer<Object[], Object[]> DataType<List<DataType>> sourceType = context.getSourceDataType(); Operation sourceOp = context.getSourceOperation(); boolean sourceWrapped = sourceOp != null && sourceOp.isWrapperStyle() && sourceOp.getWrapper() != null; - boolean sourceBare = sourceOp != null && !sourceOp.isWrapperStyle() && sourceOp.getWrapper() == null; + boolean sourceNotSubjectToWrapping = sourceOp != null && sourceOp.isNotSubjectToWrapping(); // Find the wrapper handler for source data WrapperHandler sourceWrapperHandler = null; @@ -137,14 +137,14 @@ public class Input2InputTransformer extends BaseTransformer<Object[], Object[]> DataType<List<DataType>> targetType = context.getTargetDataType(); Operation targetOp = (Operation)context.getTargetOperation(); boolean targetWrapped = targetOp != null && targetOp.isWrapperStyle() && targetOp.getWrapper() != null; - boolean targetBare = targetOp != null && !targetOp.isWrapperStyle() && targetOp.getWrapper() == null; + boolean targetNotSubjectToWrapping = targetOp != null && targetOp.isNotSubjectToWrapping(); // Find the wrapper handler for target data WrapperHandler targetWrapperHandler = null; String targetDataBinding = getDataBinding(targetOp); targetWrapperHandler = getWrapperHandler(targetDataBinding, targetWrapped); - if ((!sourceWrapped && !sourceBare) && targetWrapped) { + if ((!sourceWrapped && !sourceNotSubjectToWrapping) && targetWrapped) { // Unwrapped --> Wrapped WrapperInfo wrapper = targetOp.getWrapper(); // ElementInfo wrapperElement = wrapper.getInputWrapperElement(); @@ -201,7 +201,7 @@ public class Input2InputTransformer extends BaseTransformer<Object[], Object[]> true); return new Object[] {targetWrapper}; - } else if (sourceWrapped && (!targetWrapped && !targetBare)) { + } else if (sourceWrapped && (!targetWrapped && !targetNotSubjectToWrapping)) { // Wrapped to Unwrapped Object sourceWrapper = source[0]; Object[] target = null; diff --git a/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java b/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java index ad37eaccb8..706e01aac7 100644 --- a/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java +++ b/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java @@ -152,7 +152,7 @@ public class Output2OutputTransformer extends BaseTransformer<Object, Object> im DataType<List<DataType>> sourceType = context.getSourceDataType(); Operation sourceOp = context.getSourceOperation(); boolean sourceWrapped = sourceOp != null && sourceOp.isWrapperStyle() && sourceOp.getWrapper() != null; - boolean sourceBare = sourceOp != null && !sourceOp.isWrapperStyle() && sourceOp.getWrapper() == null; + boolean sourceNotSubjectToWrapping = sourceOp != null && sourceOp.isNotSubjectToWrapping(); WrapperHandler sourceWrapperHandler = null; String sourceDataBinding = getDataBinding(sourceOp); @@ -161,13 +161,13 @@ public class Output2OutputTransformer extends BaseTransformer<Object, Object> im DataType<List<DataType>> targetType = context.getTargetDataType(); Operation targetOp = (Operation)context.getTargetOperation(); boolean targetWrapped = targetOp != null && targetOp.isWrapperStyle() && targetOp.getWrapper() != null; - boolean targetBare = targetOp != null && !targetOp.isWrapperStyle() && targetOp.getWrapper() == null; + boolean targetNotSubjectToWrapping = targetOp != null && targetOp.isNotSubjectToWrapping(); WrapperHandler targetWrapperHandler = null; String targetDataBinding = getDataBinding(targetOp); targetWrapperHandler = getWrapperHandler(targetDataBinding, targetWrapped); - if ((!sourceWrapped &&!sourceBare) && targetWrapped) { + if ((!sourceWrapped &&!sourceNotSubjectToWrapping) && targetWrapped) { // Unwrapped --> Wrapped WrapperInfo wrapper = targetOp.getWrapper(); ElementInfo wrapperElement = wrapper.getOutputWrapperElement(); @@ -228,7 +228,7 @@ public class Output2OutputTransformer extends BaseTransformer<Object, Object> im false); return targetWrapper; - } else if (sourceWrapped && (!targetWrapped && !targetBare)) { + } else if (sourceWrapped && (!targetWrapped && !targetNotSubjectToWrapping)) { // Wrapped to Unwrapped Object sourceWrapper = response; List<ElementInfo> childElements = sourceOp.getWrapper().getOutputChildElements(); |