org.apache.myfaces.application
Class DefaultViewHandlerSupport.FacesServletMapping

java.lang.Object
  extended by org.apache.myfaces.application.DefaultViewHandlerSupport.FacesServletMapping
Enclosing class:
DefaultViewHandlerSupport

protected static class DefaultViewHandlerSupport.FacesServletMapping
extends Object

Represents a mapping entry of the FacesServlet in the web.xml configuration file.


Constructor Summary
protected DefaultViewHandlerSupport.FacesServletMapping()
           
 
Method Summary
static DefaultViewHandlerSupport.FacesServletMapping createExtensionMapping(String extension)
          Creates a new FacesServletMapping object using extension mapping.
static DefaultViewHandlerSupport.FacesServletMapping createPrefixMapping(String path)
          Creates a new FacesServletMapping object using prefix mapping.
 String getExtension()
          Returns the extension (".jsf", for example) which has been specified in the url-pattern of the FacesServlet mapping.
 String getPrefix()
          Returns the path ("/faces", for example) which has been specified in the url-pattern of the FacesServlet mapping.
 String getUrlPattern()
          Returns the url-pattern entry for this servlet mapping.
 boolean isExtensionMapping()
          Indicates whether this mapping is based on an extension (e.g.
 void setExtension(String extension)
          Sets the extension (".jsf", for example) which has been specified in the url-pattern of the FacesServlet mapping.
 void setPrefix(String path)
          Sets the path ("/faces/", for example) which has been specified in the url-pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultViewHandlerSupport.FacesServletMapping

protected DefaultViewHandlerSupport.FacesServletMapping()
Method Detail

createPrefixMapping

public static DefaultViewHandlerSupport.FacesServletMapping createPrefixMapping(String path)
Creates a new FacesServletMapping object using prefix mapping.

Parameters:
path - The path ("/faces", for example) which has been specified in the url-pattern of the FacesServlet mapping.
Returns:
a newly created FacesServletMapping

createExtensionMapping

public static DefaultViewHandlerSupport.FacesServletMapping createExtensionMapping(String extension)
Creates a new FacesServletMapping object using extension mapping.

Parameters:
path - The extension (".jsf", for example) which has been specified in the url-pattern of the FacesServlet mapping.
Returns:
a newly created FacesServletMapping

getPrefix

public String getPrefix()
Returns the path ("/faces", for example) which has been specified in the url-pattern of the FacesServlet mapping. If this mapping is based on an extension, null will be returned. Note that this path is not the same as the specified url-pattern as the trailing "/*" is omitted.

Returns:
the path which has been specified in the url-pattern

setPrefix

public void setPrefix(String path)
Sets the path ("/faces/", for example) which has been specified in the url-pattern.

Parameters:
path - The path which has been specified in the url-pattern

getExtension

public String getExtension()
Returns the extension (".jsf", for example) which has been specified in the url-pattern of the FacesServlet mapping. If this mapping is not based on an extension, null will be returned.

Returns:
the extension which has been specified in the url-pattern

setExtension

public void setExtension(String extension)
Sets the extension (".jsf", for example) which has been specified in the url-pattern of the FacesServlet mapping.

Parameters:
extension - The extension which has been specified in the url-pattern

isExtensionMapping

public boolean isExtensionMapping()
Indicates whether this mapping is based on an extension (e.g. ".jsp").

Returns:
true, if this mapping is based is on an extension, false otherwise

getUrlPattern

public String getUrlPattern()
Returns the url-pattern entry for this servlet mapping.

Returns:
the url-pattern entry for this servlet mapping


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.