protected void setOutDataValueByMappingId(String parameterId, Object value) { Interaction interaction = findInteraction(); DataMapping dm = findDataFlow(interaction, parameterId, Direction.OUT); UiInteractionsRestlet.trace.warn( "Writing OUT data using data mapping ID \"" + parameterId + "\", this is only supported for a transition period."); Serializable decodedValue = unmarshalOutDataValue(interaction.getModel(), dm, value); if (null != decodedValue) { String outParamId = dm.getApplicationAccessPoint().getId(); interaction.setOutDataValue(outParamId, decodedValue); } else { throw new WebApplicationException(Status.BAD_REQUEST); } }
protected void setOutDataValue(String parameterId, Object value) { Interaction interaction = findInteraction(); AccessPoint outParam = findParameterDefinition(interaction, parameterId, Direction.OUT); if (null == outParam) { if (InteractionDataFlowUtils.supportDataMappingIds()) { setOutDataValueByMappingId(parameterId, value); return; } else { throw new WebApplicationException(Status.NOT_FOUND); } } Serializable decodedValue = unmarshalOutDataValue(interaction.getModel(), outParam, value); if (null != decodedValue) { interaction.setOutDataValue(parameterId, decodedValue); } else { throw new WebApplicationException(Status.BAD_REQUEST); } }