org.apache.tiles.request.servlet.wildcard
Class WildcardServletApplicationContext

Package class diagram package WildcardServletApplicationContext
java.lang.Object
  extended by org.apache.tiles.request.servlet.ServletApplicationContext
      extended by org.apache.tiles.request.servlet.wildcard.WildcardServletApplicationContext
All Implemented Interfaces:
ApplicationContext

public class WildcardServletApplicationContext
extends ServletApplicationContext

Servlet-based implementation of the TilesApplicationContext interface that can resolve resources even using wildcards.

Version:
$Rev: 1306435 $ $Date: 2012-03-28 11:39:11 -0400 (Wed, 28 Mar 2012) $

Field Summary
protected  ResourcePatternResolver resolver
          The pattern resolver.
 
Constructor Summary
WildcardServletApplicationContext(ServletContext servletContext)
          Constructor.
 
Method Summary
 ApplicationResource getResource(ApplicationResource base, Locale locale)
          Return a localized version of an ApplicationResource.
 ApplicationResource getResource(String localePath)
          Return the application resource mapped to the specified path.
 Collection<ApplicationResource> getResources(String path)
          Return the application resources mapped to the specified path.
 
Methods inherited from class org.apache.tiles.request.servlet.ServletApplicationContext
getApplicationScope, getContext, getInitParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resolver

protected ResourcePatternResolver resolver
The pattern resolver.

Constructor Detail

WildcardServletApplicationContext

public WildcardServletApplicationContext(ServletContext servletContext)
Constructor.

Parameters:
servletContext - The servlet context.
Method Detail

getResource

public ApplicationResource getResource(String localePath)
Return the application resource mapped to the specified path.

Specified by:
getResource in interface ApplicationContext
Overrides:
getResource in class ServletApplicationContext
Parameters:
localePath - path to the desired resource, including the Locale suffix.
Returns:
the first located resource which matches the given path or null if no such resource exists.

getResource

public ApplicationResource getResource(ApplicationResource base,
                                       Locale locale)
Return a localized version of an ApplicationResource.

Specified by:
getResource in interface ApplicationContext
Overrides:
getResource in class ServletApplicationContext
Parameters:
base - the ApplicationResource.
locale - the desired Locale.
Returns:
the first located resource which matches the given path or null if no such resource exists.

getResources

public Collection<ApplicationResource> getResources(String path)
Return the application resources mapped to the specified path.

Specified by:
getResources in interface ApplicationContext
Overrides:
getResources in class ServletApplicationContext
Parameters:
path - to the desired resource.
Returns:
all resources which match the given path.


Copyright © 2001-2012 Apache Software Foundation. All Rights Reserved.