uk.org.retep.util.io
Class ResourceInstaller
java.lang.Object
uk.org.retep.util.io.ResourceInstaller
public class ResourceInstaller
- extends java.lang.Object
A simple file installer which will copy resources from a jar into the
local filesystem.
A deployment descriptor is itself a properties file who's keys define the
resource to copy, and the value defines the relative path to copy to.
The path can be processed by a PropertyExpansion, to allow custom naming
of the destination.
- Author:
- peter
|
Constructor Summary |
ResourceInstaller(java.lang.Class<?> resourceClass,
java.io.File installationDirectory,
java.lang.String descriptor)
|
ResourceInstaller(java.lang.Class<?> resourceClass,
java.io.File installationDirectory,
java.lang.String descriptor,
java.util.Map<?,?> properties)
|
|
Method Summary |
java.util.List<java.io.File> |
getDestinationFiles()
|
java.lang.String |
getMessage()
|
|
getProperties()
|
void |
install()
|
static void |
install(java.lang.Class<?> resourceClass,
java.io.File installationDirectory,
java.lang.String descriptor)
|
static void |
install(java.lang.Class<?> resourceClass,
java.io.File installationDirectory,
java.lang.String descriptor,
Log log)
|
static void |
install(java.lang.Class<?> resourceClass,
java.io.File installationDirectory,
java.lang.String descriptor,
java.util.Map<?,?> properties)
|
static void |
install(java.lang.Class<?> resourceClass,
java.io.File installationDirectory,
java.lang.String descriptor,
java.util.Map<?,?> properties,
Log log)
|
boolean |
isOverwrite()
|
void |
setHook(ResourceInstaller.Hook hook)
|
ResourceInstaller |
setLog(Log log)
|
void |
setMessage(java.lang.String message)
|
void |
setOverwrite(boolean overwrite)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceInstaller
public ResourceInstaller(java.lang.Class<?> resourceClass,
java.io.File installationDirectory,
java.lang.String descriptor)
throws java.io.IOException
- Throws:
java.io.IOException
ResourceInstaller
public ResourceInstaller(java.lang.Class<?> resourceClass,
java.io.File installationDirectory,
java.lang.String descriptor,
java.util.Map<?,?> properties)
throws java.io.IOException
- Throws:
java.io.IOException
install
public static void install(java.lang.Class<?> resourceClass,
java.io.File installationDirectory,
java.lang.String descriptor)
throws java.io.IOException
- Throws:
java.io.IOException
install
public static void install(java.lang.Class<?> resourceClass,
java.io.File installationDirectory,
java.lang.String descriptor,
java.util.Map<?,?> properties)
throws java.io.IOException
- Throws:
java.io.IOException
install
public static void install(java.lang.Class<?> resourceClass,
java.io.File installationDirectory,
java.lang.String descriptor,
Log log)
throws java.io.IOException
- Throws:
java.io.IOException
install
public static void install(java.lang.Class<?> resourceClass,
java.io.File installationDirectory,
java.lang.String descriptor,
java.util.Map<?,?> properties,
Log log)
throws java.io.IOException
- Throws:
java.io.IOException
setLog
public ResourceInstaller setLog(Log log)
getMessage
public java.lang.String getMessage()
setMessage
public void setMessage(java.lang.String message)
isOverwrite
public boolean isOverwrite()
setOverwrite
public void setOverwrite(boolean overwrite)
getProperties
public <K,V> java.util.Map<K,V> getProperties()
setHook
public void setHook(ResourceInstaller.Hook hook)
getDestinationFiles
public java.util.List<java.io.File> getDestinationFiles()
install
public void install()
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 1998-2010 Retep Development Group. All Rights Reserved.