public FlowExecutionKey assignFlowExecutionKey() { GeneratedFlowExecutionKey key = new GeneratedFlowExecutionKey(); getMockFlowExecutionContext().setKey(key); return key; }
/** * Puts a multi-valued MultipartFile request parameter into the mock parameter map. * * @param parameterName the parameter name * @param parameterValue the parameter value */ public void putRequestParameter(String parameterName, List<MultipartFile> parameterValue) { getMockRequestParameterMap().put(parameterName, parameterValue); }
/** * Puts a MultipartFile request parameter into the mock parameter map. * @param parameterName the parameter name * @param parameterValue the parameter value */ public void putRequestParameter(String parameterName, MultipartFile parameterValue) { getMockExternalContext().putRequestParameter(parameterName, parameterValue); }
public void setCurrentState(State state) { getMockFlowExecutionContext().getMockActiveSession().setState(state); }
public void setEmbeddedMode() { getMockFlowExecutionContext().getMockActiveSession().setEmbeddedMode(); } }
public boolean getEmbeddedMode() { return getMockFlowExecutionContext().getMockActiveSession().isEmbeddedMode(); }
/** * Sets the active flow session of the executing flow associated with this request. This will influence * {@link #getActiveFlow()} and {@link #getCurrentState()}, as well as {@link #getFlowScope()} and * {@link #getFlashScope()}. */ public void setActiveSession(FlowSession flowSession) { getMockFlowExecutionContext().setActiveSession(flowSession); }
public MutableAttributeMap<Object> getConversationScope() { return getMockFlowExecutionContext().getConversationScope(); }
/** * Returns the root flow definition for this request context. Assumes a {@link Flow} implementation. */ public Flow getRootFlow() { return getMockFlowExecutionContext().getDefinitionInternal(); }
public MutableAttributeMap<Object> getFlashScope() { return getMockFlowExecutionContext().getFlashScope(); }
/** * Sets the id of the event that should be signaled by this context. For use when resuming a flow. This method * depends on a MockViewFactory being configured for parsing the event id on a resume operation. * @param eventId the id of the event to signal */ public void setEventId(String eventId) { putRequestParameter("_eventId", eventId); }
/** * Convenience constructor that creates a new mock request context with the following defaults: * <ul> * <li>A mock flow execution context with a active session of flow "mockFlow" in state "mockState". * <li>A mock external context with no request parameters set. * </ul> * To add request parameters to this request, use the {@link #putRequestParameter(String, String)} method. */ public MockRequestContext() { this(new MockFlowExecutionContext()); }
public ViewFactory createViewFactory(Expression viewId, ExpressionParser expressionParser, ConversionService conversionService, BinderConfiguration binderConfiguration, Validator validator, ValidationHintResolver resolver) { return new MockViewFactory(viewId); }
/** * Creates a new mock flow execution key. */ public GeneratedFlowExecutionKey() { this.value = nextKey(); }
/** * Puts a multi-valued request parameter into the mock parameter map. * @param parameterName the parameter name * @param parameterValues the parameter values */ public void putRequestParameter(String parameterName, String[] parameterValues) { getMockRequestParameterMap().put(parameterName, parameterValues); }
/** * Puts a multi-valued MultipartFile request parameter into the mock parameter map. * @param parameterName the parameter name * @param parameterValue the parameter value */ public void putRequestParameter(String parameterName, List<MultipartFile> parameterValue) { getMockExternalContext().putRequestParameter(parameterName, parameterValue); }
/** * Puts a request parameter into the mock parameter map. * @param parameterName the parameter name * @param parameterValue the parameter value */ public void putRequestParameter(String parameterName, String parameterValue) { getMockRequestParameterMap().put(parameterName, parameterValue); }
/** * Adds a request parameter to the configured external context. * @param parameterName the parameter name * @param parameterValue the parameter value */ public void putRequestParameter(String parameterName, String parameterValue) { getMockExternalContext().putRequestParameter(parameterName, parameterValue); }
/** * Puts a MultipartFile request parameter into the mock parameter map. * @param parameterName the parameter name * @param parameterValue the parameter value */ public void putRequestParameter(String parameterName, MultipartFile parameterValue) { getMockRequestParameterMap().put(parameterName, parameterValue); }
/** * Adds a multi-valued request parameter to the configured external context. * @param parameterName the parameter name * @param parameterValues the parameter values */ public void putRequestParameter(String parameterName, String[] parameterValues) { getMockExternalContext().putRequestParameter(parameterName, parameterValues); }