/** * Generates a PhysicalOperationDefinition when the source reference and target service contracts are the same. * * @param source the logical operation to generate from * @return the PhysicalOperationDefinition */ private PhysicalOperation generate(LogicalOperation source) { Operation o = source.getDefinition(); PhysicalOperation operation = new PhysicalOperation(); operation.setName(o.getName()); operation.setOneWay(o.isOneWay()); operation.setRemotable(o.isRemotable()); // the source and target in-, out- and fault types are the same since the source and target contracts are the same Class<?> returnType = o.getOutputType().getType(); operation.setSourceReturnType(returnType); operation.setTargetReturnType(returnType); for (DataType fault : o.getFaultTypes()) { Class<?> faultType = fault.getType(); operation.addSourceFaultType(faultType); operation.addTargetFaultType(faultType); } List<DataType> params = o.getInputTypes(); for (DataType param : params) { Class<?> paramType = param.getType(); operation.addSourceParameterType(paramType); operation.addTargetParameterType(paramType); } return operation; }
/** * Generates a PhysicalOperationDefinition when the source reference and target service contracts are the same. * * @param source the logical operation to generate from * @return the PhysicalOperationDefinition */ private PhysicalOperation generate(LogicalOperation source) { Operation o = source.getDefinition(); PhysicalOperation operation = new PhysicalOperation(); operation.setName(o.getName()); operation.setOneWay(o.isOneWay()); operation.setRemotable(o.isRemotable()); // the source and target in-, out- and fault types are the same since the source and target contracts are the same Class<?> returnType = o.getOutputType().getType(); operation.setSourceReturnType(returnType); operation.setTargetReturnType(returnType); for (DataType fault : o.getFaultTypes()) { Class<?> faultType = fault.getType(); operation.addSourceFaultType(faultType); operation.addTargetFaultType(faultType); } List<DataType> params = o.getInputTypes(); for (DataType param : params) { Class<?> paramType = param.getType(); operation.addSourceParameterType(paramType); operation.addTargetParameterType(paramType); } return operation; }
operation.setTargetReturnType(targetReturnType);
operation.setTargetReturnType(targetReturnType);