Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.theme
Class ResourceResolver

java.lang.Object
  extended by org.nuxeo.theme.ResourceResolver
Direct Known Subclasses:
FacesResourceResolver, ServletResourceResolver

public class ResourceResolver
extends Object

Resolver for resources.

This default implementation uses the thread context ClassLoader.

Since:
5.4.3

Constructor Summary
ResourceResolver()
           
 
Method Summary
static ResourceResolver getInstance()
          Gets the current resolver (thread local).
 URL getResource(String path)
          Gets a resource URL at the given path.
 InputStream getResourceAsStream(String path)
          Gets a resource at the given path.
static void setInstance(ResourceResolver resolver)
          Called by the framework to set the current resolver or clear it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceResolver

public ResourceResolver()
Method Detail

getInstance

public static ResourceResolver getInstance()
Gets the current resolver (thread local).


setInstance

public static void setInstance(ResourceResolver resolver)
Called by the framework to set the current resolver or clear it.


getResource

public URL getResource(String path)
Gets a resource URL at the given path.

Parameters:
path - the path, which must not start with a /
See Also:
ServletContext.getResource(java.lang.String), ClassLoader.getResource(java.lang.String)

getResourceAsStream

public InputStream getResourceAsStream(String path)
Gets a resource at the given path.

Parameters:
path - the path, which must not start with a /
See Also:
ServletContext.getResourceAsStream(java.lang.String), ClassLoader.getResourceAsStream(java.lang.String)

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.