Examples of MutableAttributeMap


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

      return defaultGetFlowId(request);
    }
  }

  private MutableAttributeMap getInputMap(FlowHandler handler, HttpServletRequest request) {
    MutableAttributeMap input = handler.createExecutionInputMap(request);
    if (input != null) {
      return input;
    } else {
      return defaultCreateFlowExecutionInputMap(request);
    }
View Full Code Here

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

  public void afterPropertiesSet() throws Exception {
    Assert.notNull(flowDefinitionLocator, "The flow definition locator property is required");
    if (conversionService == null) {
      conversionService = new DefaultConversionService();
    }
    MutableAttributeMap executionAttributes = createFlowExecutionAttributes();
    FlowExecutionImplFactory executionFactory = createFlowExecutionFactory(executionAttributes);
    DefaultFlowExecutionRepository executionRepository = createFlowExecutionRepository(executionFactory);
    executionFactory.setExecutionKeyFactory(executionRepository);
    flowExecutor = new FlowExecutorImpl(flowDefinitionLocator, executionFactory, executionRepository);
  }
View Full Code Here

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

   * @param context the control context for the currently executing flow, used by this state to manipulate the flow
   * execution
   * @throws FlowExecutionException if an exception occurs in this state
   */
  protected void doEnter(RequestControlContext context) throws FlowExecutionException {
    MutableAttributeMap flowInput;
    if (subflowAttributeMapper != null) {
      flowInput = subflowAttributeMapper.createSubflowInput(context);
    } else {
      flowInput = new LocalAttributeMap();
    }
View Full Code Here

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

   * @param conversation the governing conversation
   * @return the restored flow execution
   */
  protected FlowExecution restoreFlowExecution(FlowExecutionSnapshot snapshot, FlowExecutionKey key,
      Conversation conversation) {
    MutableAttributeMap conversationScope = (MutableAttributeMap) conversation.getAttribute("scope");
    String flowId = (String) conversation.getAttribute("name");
    return snapshotFactory.restoreExecution(snapshot, flowId, key, conversationScope, this);
  }
View Full Code Here

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

  }

  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

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

    AttributeMap flowAttributes = getFlowAttributes(location.getAttributes());
    return flowResourceFactory.createResource(location.getPath(), flowAttributes, location.getId());
  }

  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));
      }
    }
    return flowAttributes;
  }
View Full Code Here

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

  EasyMock.expect(bookingService.createBooking(1L, "keith")).andReturn(booking);

  EasyMock.replay(bookingService);

  MutableAttributeMap input = new LocalAttributeMap();
  input.put("hotelId", "1");
  MockExternalContext context = new MockExternalContext();
  context.setCurrentUser("keith");
  startFlow(input, context);

  assertCurrentStateEquals("enterBookingDetails");
View Full Code Here

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

    }

    @Test
    public void testAction() {
        MockExternalContext ctx = new MockExternalContext();
        MutableAttributeMap input = new LocalAttributeMap();
        input.put("id", "1");
        startFlow(input, ctx);

        assertFlowExecutionActive();
        assertCurrentStateEquals("personForm");
        Object person = getFlowAttribute("person");
View Full Code Here

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

    }

    @Test
    public void testFullFlow() {
        MockExternalContext ctx = new MockExternalContext();
        MutableAttributeMap input = new LocalAttributeMap();
        input.put("id", "1");
        startFlow(input, ctx);

        ctx.setEventId("cancel");
        resumeFlow(ctx);
View Full Code Here

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

    return (target instanceof MutableAttributeMap);
  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException {
    MutableAttributeMap map = (MutableAttributeMap) target;
    map.put(name, newValue);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.