public class MappingsImpl extends Object implements Mappings, Serializable
Default implementation of Mappings
.
Constructor and Description |
---|
MappingsImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addMapping(Mapping mapping)
Add the specified
Mapping to the set of mappings for which
remoting services are supplied. |
String |
getExtension()
Return the extension that will replace the
FacesServlet
extension pattern, if FacesServlet is extension mapped. |
Mapping |
getMapping(String pattern)
Return the
Mapping , if any, for the specified matching
pattern . |
List |
getMappings()
Return a
List of all the currently defined Mapping s
for this application. |
int |
getPatternIndex()
Return the zero-relative index, into the array returned by
getPatterns() , of the URL pattern to be used by default
when creating URLs for resources. |
String[] |
getPatterns()
Return a list of URL patterns that this application has mapped to
FacesServlet . |
void |
removeMapping(Mapping mapping)
Remove the specified
Mapping from the set of mappings for which
remoting services are supplied, if it is currently included. |
void |
setExtension(String extension)
Set the extension that will replace the
FacesServlet
extension pattern, if FacesServlet is extension mapped. |
void |
setPatternIndex(int patternIndex)
Set the zero-relative index, into the array returned by
getPatterns() , of the URL pattern to be used by default
when creating URLs for resources. |
void |
setPatterns(String[] patterns)
Set a list of URL patterns that this application has mapped to
FacesServlet . |
public void addMapping(Mapping mapping)
Add the specified Mapping
to the set of mappings for which
remoting services are supplied.
addMapping
in interface Mappings
mapping
- The new Mapping
to be addedpublic String getExtension()
Return the extension that will replace the FacesServlet
extension pattern, if FacesServlet
is extension mapped.
getExtension
in interface Mappings
public Mapping getMapping(String pattern)
Return the Mapping
, if any, for the specified matching
pattern
. If there is no such Mapping
, return
null
instead.
getMapping
in interface Mappings
pattern
- Matching pattern for which to return a Mapping
public List getMappings()
Return a List
of all the currently defined Mapping
s
for this application. If there are no currently defined Mapping
s,
an empty List
is returned.
getMappings
in interface Mappings
public int getPatternIndex()
Return the zero-relative index, into the array returned by
getPatterns()
, of the URL pattern to be used by default
when creating URLs for resources.
getPatternIndex
in interface Mappings
public void setPatternIndex(int patternIndex)
Set the zero-relative index, into the array returned by
getPatterns()
, of the URL pattern to be used by default
when creating URLs for resources. If not called, the default value
will be zero.
setPatternIndex
in interface Mappings
patternIndex
- The new pattern indexpublic String[] getPatterns()
Return a list of URL patterns that this application has mapped to
FacesServlet
. This information is useful to renderers that
wish to dynamically calculate URLs that will be guaranteed to trigger
the JSF request processing lifecycle.
getPatterns
in interface Mappings
public void removeMapping(Mapping mapping)
Remove the specified Mapping
from the set of mappings for which
remoting services are supplied, if it is currently included.
removeMapping
in interface Mappings
mapping
- The Mapping
to be removedpublic void setExtension(String extension)
Set the extension that will replace the FacesServlet
extension pattern, if FacesServlet
is extension mapped.
setExtension
in interface Mappings
extension
- The new extensionpublic void setPatterns(String[] patterns)
Set a list of URL patterns that this application has mapped to
FacesServlet
. If no patterns are known, this SHOULD
be set to a zero-length array, rather than null
.
setPatterns
in interface Mappings
patterns
- The new list of patternsCopyright © 2004-2013 Apache Software Foundation. All Rights Reserved.