org.shept.util
public abstract class JarUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
private static Set<? super String> |
alreadyCopied |
protected static org.apache.commons.logging.Log |
logger
Logger that is available to subclasses
|
| Constructor and Description |
|---|
JarUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyResources(org.springframework.core.io.ClassPathResource cpr,
String webAppDestPath)
Copy resources from a classPath, typically within a jar file
to a specified destination, typically a resource directory in
the projects webApp directory (images, sounds, e.t.c.
|
static void |
copyResources(String[] resources,
org.springframework.core.io.ClassPathResource cpr,
String webAppDestPath)
Copy resources from a classPath, typically within a jar file
to a specified destination, typically a resource directory in
the projects webApp directory (images, sounds, e.t.c.
|
static void |
copyResourcesOnce(org.springframework.core.io.ClassPathResource cpr,
String destPath) |
static void |
copyResourcesOnce(org.springframework.core.io.ClassPathResource cpr,
String destPath,
String resName)
Init this controllers ressources by copying them into the web container
(subpath of WEB-INF).
|
static Set<? super String> |
getAlreadyCopied() |
static String |
jarPathInternal(URL jarPathUrl)
Extract the URL-String for the internal resource path from the given URL
(which points to a resource in a jar file).
|
protected static final org.apache.commons.logging.Log logger
public static void copyResourcesOnce(org.springframework.core.io.ClassPathResource cpr,
String destPath,
String resName)
Resource copying is done only if there are no resources in the destination path so you can easily provide other than the default resources.
Note that changing the names for destination directory in the servlet context requires that you need to specify an imagePath for the taglibs. Alternatively you can also copy the taglibs into your WEB-INF/tags directory and modify for a different behavior or look and feel. In this case you need to specify your own (shept).tld file (copy implicit.tld from shept META-INF).public static void copyResourcesOnce(org.springframework.core.io.ClassPathResource cpr,
String destPath)
public static void copyResources(org.springframework.core.io.ClassPathResource cpr,
String webAppDestPath)
throws IOException,
URISyntaxException
cpr - ClassPathResource specifying the source location on the classPath (maybe within a jar)webAppDestPath - Full path String to the fileSystem destination directoryIOException - when copying on copy errorURISyntaxExceptionpublic static void copyResources(String[] resources, org.springframework.core.io.ClassPathResource cpr, String webAppDestPath) throws IOException
resources - Array of String resources (filenames) to be copiedcpr - ClassPathResource specifying the source location on the classPath (maybe within a jar)webAppDestPath - Full path String to the fileSystem destination directoryIOException - when copying on copy errorpublic static String jarPathInternal(URL jarPathUrl)
ResourceUtils.extractJarFileURL(URL)jarPathUrl - Copyright © 2014. All Rights Reserved.