org.inria.ns.reflex.modules.web
Class ServiceAction
java.lang.Object
org.inria.ns.reflex.processor.core.AbstractAction
org.inria.ns.reflex.modules.web.ServiceAction
- All Implemented Interfaces:
- Executable, Presentable, NamespaceContextFactory
public class ServiceAction
- extends AbstractAction
The <web:service> element is the root element
of an Active Sheet XML document that handles HTTP requests.
It selects the service to call.
A service is used by a servlet.
- Author:
- Philippe Poulard
- See Also:
ReflexServlet
Methods inherited from class org.inria.ns.reflex.processor.core.AbstractAction |
addFallbackAction, createContext, getCanonicalPath, getFallbackAction, getLocalFallbackAction, getLogger, getNamespaceContext, getNode, getParent, recover, recover, removeFallbackAction, reorganize, run, runAction, runActions, toPrettyString, toPrettyString, toString |
ServiceAction
public ServiceAction(String characterEncoding,
Node node,
AbstractAction parent)
- Creates a new instance of
ServiceAction
.
- Parameters:
characterEncoding
- The character encoding to set on requests that doesn't specify any.node
- The node from which the action has been unmarshalled. Used for
namespace prefix resolution when performing XPath expressions.parent
- The action depending from.
unmarshal
public static AbstractAction unmarshal(AbstractAction parent,
Element element)
throws XMLException
- XML unmarshaller for
ServiceAction
.
- Parameters:
parent
- The action depending fromelement
- The XML element to unmarshall.
- Returns:
- The
ServiceAction
created.
- Throws:
UnmarshalException
- When the element and its content is not those expected.
XMLException
addAction
public void addAction(AbstractAction action)
- Filters the actions to add : only
MappingAction
s
and Fallback
are added,
other are discarded (<web:init>
registers itself to the logic procedures).
- Overrides:
addAction
in class AbstractAction
- Parameters:
action
- The child action to add.- See Also:
AbstractAction.addAction(AbstractAction)
setCharacterEncoding
public void setCharacterEncoding(HttpServletRequest request)
throws UnsupportedEncodingException
- Set the character encoding specified in this service to
the request if it doesn't have one.
- Parameters:
request
- The request.
- Throws:
UnsupportedEncodingException
- If the encoding is not supported.