org.springframework.webflow.context.ExternalContext Maven / Gradle / Ivy
/*
* Copyright 2004-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.webflow.context;
import java.io.Writer;
import java.security.Principal;
import java.util.Locale;
import org.springframework.webflow.core.collection.MutableAttributeMap;
import org.springframework.webflow.core.collection.ParameterMap;
import org.springframework.webflow.core.collection.SharedAttributeMap;
/**
* A facade that provides normalized access to an external system that has called into the Spring Web Flow system.
*
* This context object provides a normalized interface for internal web flow artifacts to use to reason on and
* manipulate the state of an external actor calling into SWF to execute flows. It represents the context about a
* single, external client request to manipulate a flow execution.
*
* The design of this interface was inspired by JSF's own ExternalContext abstraction and shares the same name for
* consistency. If a particular external client type does not support all methods defined by this interface, they can
* just be implemented as returning an empty map or null
.
*
* @author Keith Donald
* @author Erwin Vervaet
* @author Jeremy Grelle
* @author Scott Andrews
*/
public interface ExternalContext {
/**
* Returns the logical path to the application hosting this external context.
* @return the context path
*/
String getContextPath();
/**
* Provides access to the parameters associated with the user request that led to SWF being called. This map is
* expected to be immutable and cannot be changed.
* @return the immutable request parameter map
*/
ParameterMap getRequestParameterMap();
/**
* Provides access to the external request attribute map, providing a storage for data local to the current user
* request and accessible to both internal and external SWF artifacts.
* @return the mutable request attribute map
*/
MutableAttributeMap