org.apache.shale.remoting.impl
Class MappingsImpl

java.lang.Object
  extended by org.apache.shale.remoting.impl.MappingsImpl
All Implemented Interfaces:
Serializable, Mappings

public class MappingsImpl
extends Object
implements Mappings, Serializable

Default implementation of Mappings.

See Also:
Serialized Form

Constructor Summary
MappingsImpl()
           
 
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.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingsImpl

public MappingsImpl()
Method Detail

addMapping

public void addMapping(Mapping mapping)

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

Specified by:
addMapping in interface Mappings
Parameters:
mapping - The new Mapping to be added

getExtension

public String getExtension()

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

Specified by:
getExtension in interface Mappings

getMapping

public Mapping getMapping(String pattern)

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

Specified by:
getMapping in interface Mappings
Parameters:
pattern - Matching pattern for which to return a Mapping

getMappings

public 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.

Specified by:
getMappings in interface Mappings

getPatternIndex

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.

Specified by:
getPatternIndex in interface Mappings

setPatternIndex

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.

Specified by:
setPatternIndex in interface Mappings
Parameters:
patternIndex - The new pattern index

getPatterns

public 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.

Specified by:
getPatterns in interface Mappings

removeMapping

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.

Specified by:
removeMapping in interface Mappings
Parameters:
mapping - The Mapping to be removed

setExtension

public void setExtension(String extension)

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

Specified by:
setExtension in interface Mappings
Parameters:
extension - The new extension

setPatterns

public 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.

Specified by:
setPatterns in interface Mappings
Parameters:
patterns - The new list of patterns


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