org.apache.shale.remoting
Interface Mappings

All Known Implementing Classes:
MappingsImpl

public interface Mappings

Configuration object used to manage the Mapping instances for a particular web application.


Method Summary
 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 Mappings 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.
 

Method Detail

addMapping

void addMapping(Mapping mapping)

Add the specified Mapping to the set of mappings for which remoting services are supplied.

Parameters:
mapping - The new Mapping to be added
Throws:
IllegalStateException - if there is an existing Mapping already defined for the specified pattern
NullPointerException - if mapping is null

getExtension

String getExtension()

Return the extension that will replace the FacesServlet extension pattern, if FacesServlet is extension mapped.


getMapping

Mapping getMapping(String pattern)

Return the Mapping, if any, for the specified matching pattern. If there is no such Mapping, return null instead.

Parameters:
pattern - Matching pattern for which to return a Mapping

getMappings

List getMappings()

Return a List of all the currently defined Mappings for this application. If there are no currently defined Mappings, an empty List is returned.


getPatternIndex

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.

Since:
1.0.4

setPatternIndex

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.

Parameters:
patternIndex - The new pattern index
Since:
1.0.4

getPatterns

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.


removeMapping

void removeMapping(Mapping mapping)

Remove the specified Mapping from the set of mappings for which remoting services are supplied, if it is currently included.

Parameters:
mapping - The Mapping to be removed
Throws:
NullPointerException - if mapping is null

setExtension

void setExtension(String extension)

Set the extension that will replace the FacesServlet extension pattern, if FacesServlet is extension mapped.

Parameters:
extension - The new extension

setPatterns

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.

Parameters:
patterns - The new list of patterns


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.