|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cocoon.spring.configurator.ResourceUtils
Utility class for Spring resource handling.
Nested Class Summary | |
protected static class |
ResourceUtils.ResourceComparator
Class implementing a simple resource comparator as described here: getResourceComparator() . |
Constructor Summary | |
ResourceUtils()
|
Method Summary | |
protected static String |
correctUri(String uri)
|
static Properties |
getPOMProperties(String groupId,
String artifactId)
Return the properties added by Maven. |
static Comparator |
getResourceComparator()
Return a resource comparator. |
static String |
getUri(Resource resource)
Get the uri of a resource. |
static boolean |
isClasspathUri(String uri)
|
static void |
readProperties(String propertiesPath,
Properties properties,
ResourceLoader resourceLoader,
Log logger)
Read all property files from the given directory and apply them to the supplied properties. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ResourceUtils()
Method Detail |
public static String getUri(Resource resource) throws IOException
resource
- The resource.
IOException
protected static String correctUri(String uri)
public static boolean isClasspathUri(String uri)
public static void readProperties(String propertiesPath, Properties properties, ResourceLoader resourceLoader, Log logger)
propertiesPath
- The directory path.properties
- The properties object where all the read properties are applied to.resourceLoader
- The resource loader to load the property files.logger
- Optional logger for debugging.public static Comparator getResourceComparator()
public static Properties getPOMProperties(String groupId, String artifactId)
groupId
- The group identifier of the artifact.artifactId
- The artifact identifier.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |