public boolean isCompatible(Operation source, Operation target, Compatibility compatibilityType) { return isCompatible(source, target, compatibilityType, true); }
public boolean isCompatible(Operation source, Operation target, Compatibility compatibilityType, boolean byValue) { return isCompatible(source, target, compatibilityType, true, null); }
public boolean isCompatibleByReference(Operation source, Operation target, Compatibility compatibilityType) { return isCompatible(source, target, compatibilityType, false); }
public boolean isCompatible(DataType source, DataType target, boolean passByValue) { return isCompatible(source, target, passByValue, null); }
public boolean isCompatible(Operation source, Operation target, Compatibility compatibilityType, boolean byValue) { return isCompatible(source, target, compatibilityType, true, null); }
public boolean isCompatible(DataType source, DataType target, boolean passByValue) { return isCompatible(source, target, passByValue, null); }
public boolean isCompatible(Operation source, Operation target, Compatibility compatibilityType) { return isCompatible(source, target, compatibilityType, true); }
public boolean isCompatibleByValue(Operation source, Operation target, Compatibility compatibilityType) { return isCompatible(source, target, compatibilityType, true); }
public boolean isCompatibleByValue(Operation source, Operation target, Compatibility compatibilityType) { return isCompatible(source, target, compatibilityType, true); }
public boolean isCompatibleByReference(Operation source, Operation target, Compatibility compatibilityType) { return isCompatible(source, target, compatibilityType, false); }
@Override public boolean isCompatibleWithoutUnwrapByValue(Operation source, Operation target, Compatibility compatibilityType) { if (!source.isInputWrapperStyle() == target.isInputWrapperStyle()) { return false; } else if (!source.isOutputWrapperStyle() == target.isOutputWrapperStyle()) { return false; } else { return isCompatible(source, target, compatibilityType, true); } }
@Override public boolean isCompatibleWithoutUnwrapByValue(Operation source, Operation target, Compatibility compatibilityType) { if (!source.isInputWrapperStyle() == target.isInputWrapperStyle()) { return false; } else if (!source.isOutputWrapperStyle() == target.isOutputWrapperStyle()) { return false; } else { return isCompatible(source, target, compatibilityType, true); } }
/** * @see org.apache.tuscany.sca.interfacedef.InterfaceContractMapper#map(org.apache.tuscany.sca.interfacedef.Interface, * org.apache.tuscany.sca.interfacedef.Operation) */ public Operation map(Interface target, Operation source) { // TODO: How to handle the case that source operation is dynamic? if (target == null || target.isDynamic()) { return source; } else if (target.isRemotable()) { for (Operation op : target.getOperations()) { if (op.getName().equals(source.getName())) { return op; } } return null; } else { for (Operation op : target.getOperations()) { if (isCompatible(source, op, Compatibility.SUBSET)) { return op; } } return null; } }
/** * @see org.apache.tuscany.sca.interfacedef.InterfaceContractMapper#map(org.apache.tuscany.sca.interfacedef.Interface, * org.apache.tuscany.sca.interfacedef.Operation) */ public Operation map(Interface target, Operation source) { // TODO: How to handle the case that source operation is dynamic? if (target == null || target.isDynamic()) { return source; } else if (target.isRemotable()) { for (Operation op : target.getOperations()) { if (op.getName().equals(source.getName())) { return op; } } return null; } else { for (Operation op : target.getOperations()) { if (isCompatible(source, op, Compatibility.SUBSET)) { return op; } } return null; } }
return false; if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) { return false;
return false; if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) { return false;
public boolean isCompatibleSubset(Interface source, Interface target) { if (source == target) { // Shortcut for performance return true; } if (source == null || target == null) { return false; } if (source.isDynamic() || target.isDynamic()) { return true; } if (source.isRemotable() != target.isRemotable()) { return false; } for (Operation operation : source.getOperations()) { Operation targetOperation = getOperation(target.getOperations(), operation.getName()); if (targetOperation == null) { return false; } if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) { return false; } } return true; }
public boolean isCompatibleSubset(Interface source, Interface target) { if (source == target) { // Shortcut for performance return true; } if (source == null || target == null) { return false; } if (source.isDynamic() || target.isDynamic()) { return true; } if (source.isRemotable() != target.isRemotable()) { return false; } for (Operation operation : source.getOperations()) { Operation targetOperation = getOperation(target.getOperations(), operation.getName()); if (targetOperation == null) { return false; } if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) { return false; } } return true; }
if (audit == null) audit = new Audit(); if (!isCompatible(operation, targetOperation, Compatibility.SUBSET, true, audit)) { audit.append("Operations called " + operation.getName()+ " are not compatible"); if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) { return false;
if (audit == null) audit = new Audit(); if (!isCompatible(operation, targetOperation, Compatibility.SUBSET, true, audit)) { audit.append("Operations called " + operation.getName()+ " are not compatible"); if (!isCompatible(operation, targetOperation, Compatibility.SUBSET)) { return false;