wicket.util.resource.locator
Class CompoundResourceStreamLocator

java.lang.Object
  extended by wicket.util.resource.locator.CompoundResourceStreamLocator
All Implemented Interfaces:
IResourceStreamLocator

public final class CompoundResourceStreamLocator
extends java.lang.Object
implements IResourceStreamLocator

A resource locator that looks in default places for resources. At the present time, the given finder and the default classloader are searched.

Author:
Jonathan Locke, Johan Compagner

Constructor Summary
CompoundResourceStreamLocator(IResourceFinder finder)
          Constructor
 
Method Summary
 void add(int index, IResourceStreamLocator locator)
          Add a resource stream locator
 void add(IResourceStreamLocator locator)
          Add a resource stream locator
 IResourceStream locate(java.lang.Class clazz, java.lang.String path, java.lang.String style, java.util.Locale locale, java.lang.String extension)
          Loads a resource, given a path, style, locale and extension.
 IResourceStreamLocator remove(int index)
          Remove locator from list
 boolean remove(IResourceStreamLocator locator)
          Remove locator from list
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundResourceStreamLocator

public CompoundResourceStreamLocator(IResourceFinder finder)
Constructor

Parameters:
finder - The finder to search
Method Detail

locate

public IResourceStream locate(java.lang.Class clazz,
                              java.lang.String path,
                              java.lang.String style,
                              java.util.Locale locale,
                              java.lang.String extension)
Description copied from interface: IResourceStreamLocator
Loads a resource, given a path, style, locale and extension.

Specified by:
locate in interface IResourceStreamLocator
Parameters:
clazz - The class loader for delegating the loading of the resource
path - The path of the resource
style - Any resource style, such as a skin style (see Session)
locale - The locale of the resource to load
extension - The extension of the resource
Returns:
The resource
See Also:
IResourceStreamLocator.locate(java.lang.Class, java.lang.String, java.lang.String, java.util.Locale, java.lang.String)

add

public void add(int index,
                IResourceStreamLocator locator)
Add a resource stream locator

Parameters:
index -
locator -

add

public void add(IResourceStreamLocator locator)
Add a resource stream locator

Parameters:
locator -

remove

public IResourceStreamLocator remove(int index)
Remove locator from list

Parameters:
index -
Returns:
locator which has been removed

remove

public boolean remove(IResourceStreamLocator locator)
Remove locator from list

Parameters:
locator -
Returns:
true, if object has been found and removed

size

public int size()
Returns:
Number of locators in the list


Copyright © 2004-2007 Wicket developers. All Rights Reserved.