public interface ResourceLocator
Used to locate resources at development or production time.
Type Params | Return Type | Name and description |
---|---|---|
|
public org.springframework.core.io.Resource |
findResourceForClassName(java.lang.String className) Finds the .groovy file or .java file for a given class from a Grails project. |
|
public org.springframework.core.io.Resource |
findResourceForURI(java.lang.String uri) Finds a resource for the given URI |
|
public void |
setSearchLocation(java.lang.String searchLocation) The basic location from which to conduct the search. |
|
public void |
setSearchLocations(java.util.Collection<java.lang.String> searchLocations) Multiple locations to search. |
Finds the .groovy file or .java file for a given class from a Grails project. Note that this method will return null in production since sources are not packaged unless an appropriate search location is specified to locate the resource
className
- The class nameFinds a resource for the given URI
uri
- The URIThe basic location from which to conduct the search. At development time this is the base directory, during production this would be the servlet root
searchLocation
- The search locationMultiple locations to search. See #setSearchLocation
searchLocations
- The locations to search