Package org.springframework.webflow.core.collection

Examples of org.springframework.webflow.core.collection.AttributeMap


    }
  }

  protected Flow createFlow() {
    String flowId = getContext().getFlowId();
    AttributeMap flowAttributes = parseFlowMetaAttributes(flowModel);
    flowAttributes = getContext().getFlowAttributes().union(flowAttributes);
    Flow flow = getLocalContext().getFlowArtifactFactory().createFlow(flowId, flowAttributes);
    flow.setApplicationContext(getLocalContext().getApplicationContext());
    return flow;
  }
View Full Code Here


  private boolean shouldValidate(Object model, TransitionDefinition transition) {
    Boolean validateAttribute = getValidateAttribute(transition);
    if (validateAttribute != null) {
      return validateAttribute.booleanValue();
    } else {
      AttributeMap flowExecutionAttributes = requestContext.getFlowExecutionContext().getAttributes();
      Boolean validateOnBindingErrors = flowExecutionAttributes.getBoolean("validateOnBindingErrors");
      if (validateOnBindingErrors != null) {
        if (!validateOnBindingErrors.booleanValue() && mappingResults.hasErrorResults()) {
          return false;
        }
      }
View Full Code Here

   * delegates to the configured flow artifact factory by default.
   * @return the flow instance, initially created but not yet built
   */
  protected Flow createFlow() {
    String id = getContext().getFlowId();
    AttributeMap attributes = getContext().getFlowAttributes();
    return getContext().getFlowArtifactFactory().createFlow(id, attributes);
  }
View Full Code Here

   * Called on completion of the subflow to handle the subflow result event as determined by the end state reached by
   * the subflow.
   */
  public boolean handleEvent(RequestControlContext context) {
    if (subflowAttributeMapper != null) {
      AttributeMap subflowOutput = context.getCurrentEvent().getAttributes();
      if (logger.isDebugEnabled()) {
        logger.debug("Mapping subflow output " + subflowOutput);
      }
      subflowAttributeMapper.mapSubflowOutput(subflowOutput, context);
    }
View Full Code Here

    MockExternalContext ext = new MockExternalContext();
    ext.setNativeContext(new MockServletContext());
    ext.setNativeRequest(new MockHttpServletRequest());
    ext.setNativeResponse(new MockHttpServletResponse());
    EasyMock.expect(context.getExternalContext()).andStubReturn(ext);
    AttributeMap requestMap = new LocalAttributeMap();
    EasyMock.expect(context.getFlashScope()).andStubReturn(requestMap);
    EasyMock.expect(context.getRequestParameters()).andStubReturn(new LocalParameterMap(new HashMap()));
  }
View Full Code Here

  protected void setUp() throws Exception {
    jsfMock.setUp();

    listener = new FlowActionListener(jsfMock.application().getActionListener());
    RequestContextHolder.setRequestContext(context);
    AttributeMap flash = new LocalAttributeMap();
    EasyMock.expect(context.getFlashScope()).andStubReturn(flash);
    EasyMock.expect(context.getCurrentState()).andStubReturn(new MockViewState());
    EasyMock.replay(new Object[] { context });
  }
View Full Code Here

  private void registerFlowLocationPatterns() {
    if (flowLocationPatterns != null) {
      for (int i = 0; i < flowLocationPatterns.length; i++) {
        String pattern = flowLocationPatterns[i];
        FlowDefinitionResource[] resources;
        AttributeMap attributes = getFlowAttributes(Collections.EMPTY_SET);
        try {
          resources = flowResourceFactory.createResources(pattern, attributes);
        } catch (IOException e) {
          IllegalStateException ise = new IllegalStateException(
              "An I/O Exception occurred resolving the flow location pattern '" + pattern + "'");
View Full Code Here

    FlowAssembler assembler = new FlowAssembler(builder, builderContext);
    return new DefaultFlowHolder(assembler);
  }

  private FlowDefinitionResource createResource(FlowLocation location) {
    AttributeMap flowAttributes = getFlowAttributes(location.getAttributes());
    return flowResourceFactory.createResource(location.getPath(), flowAttributes, location.getId());
  }
View Full Code Here

  private FlowDefinition buildFlowDefinition(FlowBuilderInfo builderInfo) {
    try {
      Class flowBuilderClass = loadClass(builderInfo.getClassName());
      FlowBuilder builder = (FlowBuilder) flowBuilderClass.newInstance();
      AttributeMap flowAttributes = getFlowAttributes(builderInfo.getAttributes());
      FlowBuilderContext builderContext = new FlowBuilderContextImpl(builderInfo.getId(), flowAttributes,
          flowRegistry, flowBuilderServices);
      FlowAssembler assembler = new FlowAssembler(builder, builderContext);
      return assembler.assembleFlow();
    } catch (IllegalArgumentException e) {
View Full Code Here

TOP

Related Classes of org.springframework.webflow.core.collection.AttributeMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.