public class Archetype extends Object
Constructor and Description |
---|
Archetype() |
Modifier and Type | Method and Description |
---|---|
static void |
copyToFile(InputStream in,
File file) |
static void |
deleteTree(File dir) |
static void |
emptyDirectory(File dir) |
static String |
expandVars(String expression,
Map<?,?> properties) |
static String |
getShortName(String name) |
static void |
launch(String[] args) |
static Document |
load(File file) |
static Document |
load(InputStream in) |
static void |
main(String[] args) |
static void |
processArchetype(Document doc,
Map<Object,Object> vars) |
static void |
processResources(Element root,
File dir,
Map<Object,Object> vars) |
static void |
processVars(Element root,
Map<Object,Object> vars) |
static String |
read(InputStream in) |
static String |
readFile(File file) |
static String |
readVar(String key,
String value) |
static void |
unzip(File zip,
File dir) |
static void |
unzip(ZipInputStream in,
File dir) |
static File |
unzipArchetype(File zipFile) |
static void |
writeFile(File file,
byte[] buf) |
static void |
writeFile(File file,
String buf) |
public static void unzip(File zip, File dir) throws IOException
IOException
public static void unzip(ZipInputStream in, File dir) throws IOException
IOException
public static String readFile(File file) throws IOException
IOException
public static String read(InputStream in) throws IOException
IOException
public static void copyToFile(InputStream in, File file) throws IOException
IOException
public static Document load(InputStream in) throws Exception
Exception
public static void processVars(Element root, Map<Object,Object> vars) throws Exception
Exception
public static void processResources(Element root, File dir, Map<Object,Object> vars) throws Exception
Exception
public static void processArchetype(Document doc, Map<Object,Object> vars) throws Exception
Exception
public static String readVar(String key, String value) throws IOException
IOException
public static File unzipArchetype(File zipFile) throws IOException
IOException
public static void deleteTree(File dir)
public static void emptyDirectory(File dir)
public static void writeFile(File file, byte[] buf) throws IOException
IOException
public static void writeFile(File file, String buf) throws IOException
IOException
public static void launch(String[] args)
Copyright © 2011 Nuxeo SA. All Rights Reserved.