Package org.springframework.webflow.core.collection

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


        }
      }
    }
    execution.setKey(flowExecutionKey);
    if (conversationScope == null) {
      conversationScope = new LocalAttributeMap();
    }
    execution.setConversationScope(conversationScope);
    execution.setAttributes(executionAttributes);
    execution.setListeners(executionListenerLoader.getListeners(execution.getDefinition()));
    execution.setKeyFactory(executionKeyFactory);
View Full Code Here


        context.getExternalContext().recordResponseComplete();
      }
      context.endActiveFlowSession(getId(), createSessionOutput(context));
    } else {
      // there is a parent flow that will resume (this flow is a subflow)
      LocalAttributeMap sessionOutput = createSessionOutput(context);
      context.endActiveFlowSession(getId(), sessionOutput);
    }
  }
View Full Code Here

  /**
   * Returns the subflow output map. This will invoke the output mapper (if any) to map data available in the flow
   * execution request context into a newly created empty map.
   */
  protected LocalAttributeMap createSessionOutput(RequestContext context) {
    LocalAttributeMap output = new LocalAttributeMap();
    if (outputMapper != null) {
      MappingResults results = outputMapper.map(context, output);
      if (results != null && results.hasErrorResults()) {
        throw new FlowOutputMappingException(getOwner().getId(), getId(), results);
      }
View Full Code Here

  /**
   * Initialize the view scope data structure.
   */
  private void initViewScope() {
    scope.put(VIEW_SCOPE_ATTRIBUTE, new LocalAttributeMap());
  }
View Full Code Here

  protected MutableAttributeMap defaultCreateFlowExecutionInputMap(PortletRequest request) {
    Map parameterMap = request.getParameterMap();
    if (parameterMap.size() == 0) {
      return null;
    }
    LocalAttributeMap inputMap = new LocalAttributeMap();
    Iterator it = parameterMap.entrySet().iterator();
    while (it.hasNext()) {
      Map.Entry entry = (Map.Entry) it.next();
      String name = (String) entry.getKey();
      String[] values = (String[]) entry.getValue();
      if (values.length == 1) {
        inputMap.put(name, values[0]);
      } else {
        inputMap.put(name, values);
      }
    }
    return inputMap;
  }
View Full Code Here

    this.outputMapper = outputMapper;
  }

  public MutableAttributeMap createSubflowInput(RequestContext context) {
    if (inputMapper != null) {
      LocalAttributeMap input = new LocalAttributeMap();
      MappingResults results = inputMapper.map(context, input);
      if (results != null && results.hasErrorResults()) {
        throw new FlowInputMappingException(context.getActiveFlow().getId(), context.getCurrentState().getId(),
            results);
      }
      return input;
    } else {
      return new LocalAttributeMap();
    }
  }
View Full Code Here

  protected MutableAttributeMap defaultCreateFlowExecutionInputMap(HttpServletRequest request) {
    Map parameterMap = request.getParameterMap();
    if (parameterMap.size() == 0) {
      return null;
    }
    LocalAttributeMap inputMap = new LocalAttributeMap(parameterMap.size(), 1);
    Iterator it = parameterMap.entrySet().iterator();
    while (it.hasNext()) {
      Map.Entry entry = (Map.Entry) it.next();
      String name = (String) entry.getKey();
      String[] values = (String[]) entry.getValue();
      if (values.length == 1) {
        inputMap.put(name, values[0]);
      } else {
        inputMap.put(name, values);
      }
    }
    return inputMap;
  }
View Full Code Here

  /**
   * Create a attribute map binding event for given HTTP session binding event.
   */
  private AttributeMapBindingEvent getContextBindingEvent(HttpSessionBindingEvent event) {
    return new AttributeMapBindingEvent(new LocalAttributeMap(sessionMap), event.getName(), listener);
  }
View Full Code Here

    Assert.notNull(flow, "The flow definition is required");
    this.flow = flow;
    this.listeners = new FlowExecutionListeners();
    this.attributes = CollectionUtils.EMPTY_ATTRIBUTE_MAP;
    this.flowSessions = new LinkedList();
    this.conversationScope = new LocalAttributeMap();
    this.conversationScope.put(FLASH_SCOPE_ATTRIBUTE, new LocalAttributeMap());
  }
View Full Code Here

  void start(Flow flow, MutableAttributeMap input, RequestControlContext context) {
    listeners.fireSessionCreating(context, flow);
    FlowSession session = activateSession(flow);
    if (input == null) {
      input = new LocalAttributeMap();
    }
    StateManageableMessageContext messageContext = (StateManageableMessageContext) context.getMessageContext();
    messageContext.setMessageSource(flow.getApplicationContext());
    listeners.fireSessionStarting(context, session, input);
    flow.start(context, input);
View Full Code Here

TOP

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

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.