org.apache.tiles.request.portlet.wildcard
Class WildcardPortletApplicationContext

Package class diagram package WildcardPortletApplicationContext
java.lang.Object
  extended by org.apache.tiles.request.portlet.PortletApplicationContext
      extended by org.apache.tiles.request.portlet.wildcard.WildcardPortletApplicationContext
All Implemented Interfaces:
ApplicationContext

public class WildcardPortletApplicationContext
extends PortletApplicationContext

Portlet-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  org.springframework.core.io.support.ResourcePatternResolver resolver
          The pattern resolver.
 
Fields inherited from class org.apache.tiles.request.portlet.PortletApplicationContext
context
 
Constructor Summary
WildcardPortletApplicationContext(javax.portlet.PortletContext portletContext)
          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.
 void initialize(javax.portlet.PortletContext context)
          Initialize (or reinitialize) this PortletApplicationContext instance for the specified Portlet API objects.
 
Methods inherited from class org.apache.tiles.request.portlet.PortletApplicationContext
getApplicationScope, getContext, getInitParams, getPortletContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resolver

protected org.springframework.core.io.support.ResourcePatternResolver resolver
The pattern resolver.

Constructor Detail

WildcardPortletApplicationContext

public WildcardPortletApplicationContext(javax.portlet.PortletContext portletContext)
Constructor.

Parameters:
portletContext - The portlet context.
Method Detail

initialize

public void initialize(javax.portlet.PortletContext context)

Initialize (or reinitialize) this PortletApplicationContext instance for the specified Portlet API objects.

Overrides:
initialize in class PortletApplicationContext
Parameters:
context - The PortletContext for this web application

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 PortletApplicationContext
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 PortletApplicationContext
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 PortletApplicationContext
Parameters:
path - to the desired resource.
Returns:
all resources which match the given path.


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