private Properties getHeaders() { Properties headerProperties = new Properties(); for (Map.Entry<String, String> entry : getContext().getRequestHeaders().entrySet()) { if (ALLOWED_METADATA.contains(entry.getKey())) { headerProperties.put(entry.getKey(), entry.getValue()); } } return headerProperties; } }
/** * Delete a configured flow. Running flows are not affected. The schedule will be removed for scheduled flows. * @param key composite key containing flow group and flow name that identifies the flow to remove from the flow catalog * @return {@link UpdateResponse} */ @Override public UpdateResponse delete(ComplexResourceKey<FlowId, EmptyRecord> key) { String flowGroup = key.getKey().getFlowGroup(); String flowName = key.getKey().getFlowName(); FlowId flowId = new FlowId().setFlowGroup(flowGroup).setFlowName(flowName); return this.flowConfigsResourceHandler.deleteFlowConfig(flowId, getHeaders()); }