org.apache.tapestry.resolver
Class ComponentResourceResolverImpl

java.lang.Object
  extended by org.apache.tapestry.resolver.ComponentResourceResolverImpl
All Implemented Interfaces:
IComponentResourceResolver

public class ComponentResourceResolverImpl
extends Object
implements IComponentResourceResolver

Implementation of IComponentResourceResolver.


Constructor Summary
ComponentResourceResolverImpl()
           
 
Method Summary
 org.apache.hivemind.Resource findComponentResource(IComponent component, IRequestCycle cycle, String path, String extension, Locale locale)
          Searches for a resource relative to the specified IComponent, optionally also attemping to find a localized version of the resource using the specified Locale.
 void initializeService()
          Called by hivemind automatically.
 void setApplicationId(String applicationId)
           
 void setClasspathAssetFactory(AssetFactory classpathAssetFactory)
           
 void setContextAssetFactory(AssetFactory contextAssetFactory)
           
 void setContextRoot(org.apache.hivemind.Resource contextRoot)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentResourceResolverImpl

public ComponentResourceResolverImpl()
Method Detail

initializeService

public void initializeService()
Called by hivemind automatically.


findComponentResource

public org.apache.hivemind.Resource findComponentResource(IComponent component,
                                                          IRequestCycle cycle,
                                                          String path,
                                                          String extension,
                                                          Locale locale)
Description copied from interface: IComponentResourceResolver
Searches for a resource relative to the specified IComponent, optionally also attemping to find a localized version of the resource using the specified Locale.

Specified by:
findComponentResource in interface IComponentResourceResolver
Parameters:
component - The component to find the resource relative to.
cycle - The current request.
path - Optional resource name to search for, the default is to use the component name.
extension - Extension name of the resource, such as <ComponentName>.properties for properties / <ComponentName>.html for templates and so on.
locale - Optional localization specifier.
Returns:
The resolved resource, or null if none could be found. The returned Resource may also be not null but still not valid. To ensure validity check Resource.getResourceURL() for a not null value.

setContextRoot

public void setContextRoot(org.apache.hivemind.Resource contextRoot)

setClasspathAssetFactory

public void setClasspathAssetFactory(AssetFactory classpathAssetFactory)

setContextAssetFactory

public void setContextAssetFactory(AssetFactory contextAssetFactory)

setApplicationId

public void setApplicationId(String applicationId)


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.