@Override public SectionFlowSinkNode secureFlow(SectionDesigner designer, Class<?> argumentType, SectionFlowSinkNode secureFlowSink, SectionFlowSinkNode insecureFlowSink) { // Create the annotation HttpFlowSecurerAnnotation annotation = new HttpFlowSecurerAnnotation( this.httpSecurerBuilder.getHttpSecurityName(), this.httpSecurerBuilder.getAnyRoles(), this.httpSecurerBuilder.getRequiredRoles(), argumentType); // Configure the function String functionName = HttpSecurityArchitectEmployer.this.nextUniqueName(); SectionFunctionNamespace namespace = designer.addSectionFunctionNamespace(functionName, new HttpFlowSecurerManagedFunctionSource(annotation)); SectionFunction function = namespace.addSectionFunction(functionName, HttpFlowSecurerManagedFunctionSource.FUNCTION_NAME); // Configure the function designer.link(function.getFunctionFlow(Flows.SECURE.name()), secureFlowSink, false); designer.link(function.getFunctionFlow(Flows.INSECURE.name()), insecureFlowSink, false); // Return the decision flow sink return function; } }
@Override public void sourceSection(SectionDesigner designer, SectionSourceContext context) throws Exception { SectionFunctionNamespace namespace = designer.addSectionFunctionNamespace("secure", new HttpFlowSecurerManagedFunctionSource(this.annotation)); SectionFunction function = namespace.addSectionFunction("secure", HttpFlowSecurerManagedFunctionSource.FUNCTION_NAME); designer.link(designer.addSectionInput(INPUT_NAME, null), function); designer.link(function.getFunctionFlow(Flows.SECURE.name()), designer.addSectionOutput(SECURE_OUTPUT_NAME, null, false), false); designer.link(function.getFunctionFlow(Flows.INSECURE.name()), designer.addSectionOutput(INSECURE_OUTPUT_NAME, null, false), false); } }
FunctionFlow flow = handler.getFunctionFlow(httpSecurityName); designer.link(flow, output, false); designer.link(handler.getFunctionFlow("Send"), sender, false);
FunctionFlow templateRedirectFlow = initialFunction.getFunctionFlow(Flows.REDIRECT.name()); String redirectValuesFunctionName = context.getProperty(PROPERTY_REDIRECT_VALUES_FUNCTION, null); SectionFunction redirectValuesFunction = null; arrayIteratorFunction.getFunctionFlow( WebTemplateArrayIteratorManagedFunctionSource.RENDER_ELEMENT_FLOW_NAME), templateFunction, false); FunctionFlow renderFlow = initialFunction.getFunctionFlow(Flows.RENDER.name()); if (beanFunction != null) { previousTemplateFunction.getFunctionFlow( WebTemplateArrayIteratorManagedFunctionSource.CONTINUE_TEMPLATE_FLOW_NAME), beanFunction.function, false); previousTemplateFunction.getFunctionFlow( WebTemplateArrayIteratorManagedFunctionSource.CONTINUE_TEMPLATE_FLOW_NAME), templateFunction, false); designer.link( previousTemplateFunction .getFunctionFlow(WebTemplateArrayIteratorManagedFunctionSource.CONTINUE_TEMPLATE_FLOW_NAME), completeFunction, false);
FunctionFlow functionFlow = challengeFunction.getFunctionFlow("Flow_" + flowName); SectionOutput sectionOutput = designer.addSectionOutput(flowName, flowType.getArgumentType().getName(), false);
designer.link(route.getFunctionFlow(HANDLE_REDIRECT_FLOW), handleRedirect, false); FunctionFlow handleRedirectFlow = handleRedirect.getFunctionFlow(outputName); designer.link(handleRedirectFlow, output, false); FunctionFlow routeFlow = route.getFunctionFlow(outputName); if (!routeConfig.inputPath.isPathParameters()) { designer.link(route.getFunctionFlow(UNHANDLED_OUTPUT_NAME), unhandled, false); designer.link(handleRedirect.getFunctionFlow(UNHANDLED_OUTPUT_NAME), unhandled, false);