| org.apache.cocoon.acting.AbstractAction org.apache.cocoon.acting.AbstractConfigurableAction org.apache.cocoon.acting.RequestParameterExistsAction
RequestParameterExistsAction | public class RequestParameterExistsAction extends AbstractConfigurableAction (Code) | | This action simply checks to see if a given request parameter
exists. It takes an arbitrary number of default parameters to check
named 'parameter-name'. Non-default parameters need to be separated
by spaces and passed as value of a sitemap parameter named
'parameters'. The action returns a map with all parameters if all
of them exist and null otherwise. Parameter names can only be added
to this list but no default parameters can be overridden by
specific ones.
This action is very closely related to @link{RequestParamAction}
and
FormValidatorAction . However this action is considerably
simpler in that it tests only for existence of a parameter and it
doesn't need a descriptor. Besides it doesn't propagate all request
parameters to the sitemap but only those that are marked as
required. One special feature is, however, that parameters
can contain one wildcard ("*"). It will be
checked, whether all parameters with a wildcard have the same
matches. E.g. "id_* name_*" enforces, that if "id_1" exists,
"name_1" must also exist and vice versa.
author: Christian Haul version: CVS $Id: RequestParameterExistsAction.java 433543 2006-08-22 06:22:54Z crossley $ |
Inner Class :protected static class StringParts | |
Method Summary | |
public Map | act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) | protected String | getMatch(String paramName, StringParts sp) If a String matches a StringPart spec, return the substring
between the specified prefix and postfix. | protected StringParts | splitParameter(String paramName) Find first "*" in a String and split it into the substring
before and after the "*". |
getMatch | protected String getMatch(String paramName, StringParts sp)(Code) | | If a String matches a StringPart spec, return the substring
between the specified prefix and postfix. Returns null if it
doesn't match.
|
splitParameter | protected StringParts splitParameter(String paramName)(Code) | | Find first "*" in a String and split it into the substring
before and after the "*". Returns null if no "*" is present.
|
Fields inherited from org.apache.cocoon.acting.AbstractConfigurableAction | protected HashMap settings(Code)(Java Doc)
|
Methods inherited from org.apache.cocoon.acting.AbstractConfigurableAction | public void configure(Configuration conf) throws ConfigurationException(Code)(Java Doc)
|
Fields inherited from org.apache.cocoon.acting.AbstractAction | final protected static Map EMPTY_MAP(Code)(Java Doc)
|
|
|