spring-mobile-device

org.springframework.mobile.device.switcher
Class AbstractSitePathUrlFactory

java.lang.Object
  extended by org.springframework.mobile.device.switcher.AbstractSiteUrlFactory
      extended by org.springframework.mobile.device.switcher.AbstractSitePathUrlFactory
All Implemented Interfaces:
SiteUrlFactory
Direct Known Subclasses:
MobileSitePathUrlFactory, NormalSitePathUrlFactory

public abstract class AbstractSitePathUrlFactory
extends AbstractSiteUrlFactory
implements SiteUrlFactory

Abstract SiteUrlFactory implementation that differentiates each site by the HTTP request path. Provides functionality common to all path based site URL factories.

Author:
Scott Rossillo, Roy Clarkson

Constructor Summary
AbstractSitePathUrlFactory(java.lang.String mobilePath)
          Creates a new abstract site path URL factory for the given mobile path.
AbstractSitePathUrlFactory(java.lang.String mobilePath, java.lang.String rootPath)
          Creates a new abstract site path URL factory for the given mobile path and root application path.
 
Method Summary
protected  java.lang.String getCleanMobilePath()
          Returns the full mobile path without a trailing slash.
 java.lang.String getFullMobilePath()
          The full path of the mobile site.
 java.lang.String getMobilePath()
          The mobile path with a trailing slash.
 java.lang.String getRootPath()
          The root path of the application with a trailing slash.
 
Methods inherited from class org.springframework.mobile.device.switcher.AbstractSiteUrlFactory
createSiteUrlInternal, optionalPort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.mobile.device.switcher.SiteUrlFactory
createSiteUrl, isRequestForSite
 

Constructor Detail

AbstractSitePathUrlFactory

public AbstractSitePathUrlFactory(java.lang.String mobilePath)
Creates a new abstract site path URL factory for the given mobile path.


AbstractSitePathUrlFactory

public AbstractSitePathUrlFactory(java.lang.String mobilePath,
                                  java.lang.String rootPath)
Creates a new abstract site path URL factory for the given mobile path and root application path.

Method Detail

getMobilePath

public java.lang.String getMobilePath()
The mobile path with a trailing slash.

Examples:

  "/m/"
  "/mobile/"
 

Returns:
the mobile path

getRootPath

public java.lang.String getRootPath()
The root path of the application with a trailing slash.

Examples:

  "/showcase/"
  "/demo/"
 

Returns:
the root path of the application

getFullMobilePath

public java.lang.String getFullMobilePath()
The full path of the mobile site.

Examples:

  "/showcase/m/"
  "/demo/mobile/"
 

Returns:
the full path of the mobile site

getCleanMobilePath

protected java.lang.String getCleanMobilePath()
Returns the full mobile path without a trailing slash.


spring-mobile-device