com.liferay.faces.util.config.internal
Class ConfiguredServletMappingImpl

java.lang.Object
  extended by com.liferay.faces.util.config.internal.ConfiguredServletMappingImpl
All Implemented Interfaces:
ConfiguredServletMapping

public class ConfiguredServletMappingImpl
extends Object
implements ConfiguredServletMapping

This class represents a servlet-mapping found in the WEB-INF/web.xml descriptor.

Author:
Neil Griffin

Constructor Summary
ConfiguredServletMappingImpl(String servletName, String urlPattern, boolean implicit)
           
 
Method Summary
 String getExtension()
          If the servlet-mapping url-pattern is extension-mapped (like *.faces), then this method returns the .faces extension.
 String getServletName()
          Returns the servlet-mapping servlet-name.
 String getServletPath()
          If the servlet-mapping url-pattern is path-mapped (like /views/foo/bar/*), then this method returns the /views/foo/bar path.
 String getUrlPattern()
          Returns the servlet-mapping url-pattern.
 boolean isExtensionMapped()
          Flag indicating whether or not the servlet-mapping url-pattern is extension-mapped.
 boolean isImplicit()
          Flag indicating whether or not the servlet-mapping is implicit, meaning it is associated with ViewHandler.DEFAULT_SUFFIX or ViewHandler.DEFAULT_SUFFIX_PARAM_NAME.
 boolean isMatch(String uri)
          Flag indicating whether or not the specified uri matches the servlet-mapping url-pattern.
 boolean isPathMapped()
          Flag indicating whether or not the servlet-mapping url-pattern is path-mapped.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfiguredServletMappingImpl

public ConfiguredServletMappingImpl(String servletName,
                                    String urlPattern,
                                    boolean implicit)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

isExtensionMapped

public boolean isExtensionMapped()
Description copied from interface: ConfiguredServletMapping
Flag indicating whether or not the servlet-mapping url-pattern is extension-mapped.

Specified by:
isExtensionMapped in interface ConfiguredServletMapping

isPathMapped

public boolean isPathMapped()
Description copied from interface: ConfiguredServletMapping
Flag indicating whether or not the servlet-mapping url-pattern is path-mapped.

Specified by:
isPathMapped in interface ConfiguredServletMapping

getExtension

public String getExtension()
Description copied from interface: ConfiguredServletMapping
If the servlet-mapping url-pattern is extension-mapped (like *.faces), then this method returns the .faces extension. Otherwise returns null.

Specified by:
getExtension in interface ConfiguredServletMapping

isMatch

public boolean isMatch(String uri)
Description copied from interface: ConfiguredServletMapping
Flag indicating whether or not the specified uri matches the servlet-mapping url-pattern.

Specified by:
isMatch in interface ConfiguredServletMapping

getServletName

public String getServletName()
Description copied from interface: ConfiguredServletMapping
Returns the servlet-mapping servlet-name.

Specified by:
getServletName in interface ConfiguredServletMapping

getServletPath

public String getServletPath()
Description copied from interface: ConfiguredServletMapping
If the servlet-mapping url-pattern is path-mapped (like /views/foo/bar/*), then this method returns the /views/foo/bar path. Otherwise returns null.

Specified by:
getServletPath in interface ConfiguredServletMapping

isImplicit

public boolean isImplicit()
Description copied from interface: ConfiguredServletMapping
Flag indicating whether or not the servlet-mapping is implicit, meaning it is associated with ViewHandler.DEFAULT_SUFFIX or ViewHandler.DEFAULT_SUFFIX_PARAM_NAME.

Specified by:
isImplicit in interface ConfiguredServletMapping

getUrlPattern

public String getUrlPattern()
Description copied from interface: ConfiguredServletMapping
Returns the servlet-mapping url-pattern.

Specified by:
getUrlPattern in interface ConfiguredServletMapping


Copyright © 2015 Liferay, Inc.. All rights reserved.