ro.isdc.wro.model.resource.locator
Enum ServletContextUriLocator.LocatorStrategy

java.lang.Object
  extended by java.lang.Enum<ServletContextUriLocator.LocatorStrategy>
      extended by ro.isdc.wro.model.resource.locator.ServletContextUriLocator.LocatorStrategy
All Implemented Interfaces:
Serializable, Comparable<ServletContextUriLocator.LocatorStrategy>
Enclosing class:
ServletContextUriLocator

public static enum ServletContextUriLocator.LocatorStrategy
extends Enum<ServletContextUriLocator.LocatorStrategy>

Available LocatorStrategies. DISPATCHER_FIRST is default option. This means this UriLocator will first try to locate resource via the dispatcher stream locator. This will include dynamic resources produces by servlet's or JSP's. If the specified resource cannot be found with the dispatcherStreamLocator the implementation will try to use the ServletContext to locate the resource. SERVLET_CONTEXT_FIRST is a alternative approach where we will first try to locate the resource VIA the ServletContext first, and then use the dispatcheStreamLocator if not found. In some cases, where you do not rely on dynamic resources this can be a more reliable and a more efficient approach.


Enum Constant Summary
DISPATCHER_FIRST
           
SERVLET_CONTEXT_FIRST
           
 
Method Summary
static ServletContextUriLocator.LocatorStrategy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ServletContextUriLocator.LocatorStrategy[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DISPATCHER_FIRST

public static final ServletContextUriLocator.LocatorStrategy DISPATCHER_FIRST

SERVLET_CONTEXT_FIRST

public static final ServletContextUriLocator.LocatorStrategy SERVLET_CONTEXT_FIRST
Method Detail

values

public static ServletContextUriLocator.LocatorStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ServletContextUriLocator.LocatorStrategy c : ServletContextUriLocator.LocatorStrategy.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ServletContextUriLocator.LocatorStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2008-2013. All Rights Reserved.