ro.isdc.wro.model.resource.locator.factory
Class SimpleUriLocatorFactory

java.lang.Object
  extended by ro.isdc.wro.model.resource.locator.factory.AbstractUriLocatorFactory
      extended by ro.isdc.wro.model.resource.locator.factory.SimpleUriLocatorFactory
All Implemented Interfaces:
UriLocatorFactory
Direct Known Subclasses:
DefaultUriLocatorFactory

public class SimpleUriLocatorFactory
extends AbstractUriLocatorFactory

Holds a list of uri locators. The uriLocator will be created based on the first uriLocator from the supplied list which will accept the url.

Author:
Alex Objelean

Constructor Summary
SimpleUriLocatorFactory()
           
 
Method Summary
 SimpleUriLocatorFactory addUriLocator(UriLocator... locators)
          Allow adding more than one uriLocators.
 UriLocator getInstance(String uri)
           
 List<UriLocator> getUriLocators()
           
 
Methods inherited from class ro.isdc.wro.model.resource.locator.factory.AbstractUriLocatorFactory
locate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleUriLocatorFactory

public SimpleUriLocatorFactory()
Method Detail

getInstance

public UriLocator getInstance(String uri)
Parameters:
uri - to handle by the locator.
Returns:
an instance of UriLocator which is capable of handling provided uri. Returns null if no locator found.

addUriLocator

public final SimpleUriLocatorFactory addUriLocator(UriLocator... locators)
Allow adding more than one uriLocators.

Parameters:
locators - list of UriLocator arguments.

getUriLocators

public List<UriLocator> getUriLocators()
Returns:
the list of currently configured locators.


Copyright © 2008-2013. All Rights Reserved.