Package org.springframework.webflow.core.collection

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


  public Object getObject() throws Exception {
    return flowExecutor;
  }

  private MutableAttributeMap createFlowExecutionAttributes() {
    LocalAttributeMap executionAttributes = new LocalAttributeMap();
    if (flowExecutionAttributes != null) {
      for (Iterator it = flowExecutionAttributes.iterator(); it.hasNext();) {
        FlowElementAttribute attribute = (FlowElementAttribute) it.next();
        executionAttributes.put(attribute.getName(), getConvertedValue(attribute));
      }
    }
    putDefaultFlowExecutionAttributes(executionAttributes);
    return executionAttributes;
  }
View Full Code Here


  protected void doEnter(RequestControlContext context) throws FlowExecutionException {
    MutableAttributeMap flowInput;
    if (subflowAttributeMapper != null) {
      flowInput = subflowAttributeMapper.createSubflowInput(context);
    } else {
      flowInput = new LocalAttributeMap();
    }
    Flow subflow = (Flow) this.subflow.getValue(context);
    if (logger.isDebugEnabled()) {
      logger.debug("Calling subflow '" + subflow.getId() + "' with input " + flowInput);
    }
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

  }

  // internal helpers

  private void initViewScope() {
    scope.put(FLOW_VIEW_MAP_ATTRIBUTE, new LocalAttributeMap());
  }
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

  }

  public Event doExecute(RequestContext context) throws Exception {
    Action[] actions = getActions();
    String eventId = getEventFactorySupport().getSuccessEventId();
    MutableAttributeMap eventAttributes = new LocalAttributeMap();
    List actionResults = new ArrayList(actions.length);
    for (int i = 0; i < actions.length; i++) {
      Event result = actions[i].execute(context);
      actionResults.add(result);
      if (result != null) {
        eventId = result.getId();
        if (isStopOnError() && result.getId().equals(getEventFactorySupport().getErrorEventId())) {
          break;
        }
      }
    }
    eventAttributes.put(ACTION_RESULTS_ATTRIBUTE_NAME, actionResults);
    return new Event(this, eventId, eventAttributes);
  }
View Full Code Here

    // the encoded FlowDefinitionRedirect should look something like
    // "flowDefinitionId?param0=value0&param1=value1"
    // now parse that and build a corresponding view selection
    int index = encodedRedirect.indexOf('?');
    String flowDefinitionId;
    LocalAttributeMap executionInput = null;
    if (index != -1) {
      flowDefinitionId = encodedRedirect.substring(0, index);
      String[] parameters = StringUtils.delimitedListToStringArray(encodedRedirect.substring(index + 1), "&");
      executionInput = new LocalAttributeMap(parameters.length, 1);
      for (int i = 0; i < parameters.length; i++) {
        String nameAndValue = parameters[i];
        index = nameAndValue.indexOf('=');
        if (index != -1) {
          executionInput.put(nameAndValue.substring(0, index), nameAndValue.substring(index + 1));
        } else {
          executionInput.put(nameAndValue, "");
        }
      }
    } else {
      flowDefinitionId = encodedRedirect;
    }
View Full Code Here

      FlowUrlHandler flowUrlHandler) {
    this.context = context;
    this.request = request;
    this.response = response;
    this.requestParameterMap = new LocalParameterMap(new PortletRequestParameterMap(request));
    this.requestMap = new LocalAttributeMap(new PortletRequestMap(request));
    this.sessionMap = new LocalSharedAttributeMap(new PortletSessionMap(request));
    this.applicationMap = new LocalSharedAttributeMap(new PortletContextMap(context));
    this.flowUrlHandler = flowUrlHandler;
    if (request instanceof ActionRequest && response instanceof ActionResponse) {
      requestPhase = ACTION_PHASE;
View Full Code Here

      FlowUrlHandler flowUrlHandler) {
    this.context = context;
    this.request = request;
    this.response = response;
    this.requestParameterMap = new LocalParameterMap(new HttpServletRequestParameterMap(request));
    this.requestMap = new LocalAttributeMap(new HttpServletRequestMap(request));
    this.sessionMap = new LocalSharedAttributeMap(new HttpSessionMap(request));
    this.applicationMap = new LocalSharedAttributeMap(new HttpServletContextMap(context));
    this.flowUrlHandler = flowUrlHandler;
  }
View Full Code Here

  }

  private AttributeMap getFlowAttributes(Set attributes) {
    MutableAttributeMap flowAttributes = null;
    if (flowBuilderServices.getDevelopment()) {
      flowAttributes = new LocalAttributeMap(1 + attributes.size(), 1);
      flowAttributes.put("development", Boolean.TRUE);
    }
    if (!attributes.isEmpty()) {
      if (flowAttributes == null) {
        flowAttributes = new LocalAttributeMap(attributes.size(), 1);
      }
      for (Iterator it = attributes.iterator(); it.hasNext();) {
        FlowElementAttribute attribute = (FlowElementAttribute) it.next();
        flowAttributes.put(attribute.getName(), getConvertedValue(attribute));
      }
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.