Nuxeo ECM Projects 5.4.3-SNAPSHOT

Class Archetype

java.lang.Object
  extended by Archetype

public class Archetype
extends Object

Author:
Bogdan Stefanescu

Constructor Summary
Archetype()
           
 
Method Summary
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)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Archetype

public Archetype()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

unzip

public static void unzip(File zip,
                         File dir)
                  throws IOException
Throws:
IOException

unzip

public static void unzip(ZipInputStream in,
                         File dir)
                  throws IOException
Throws:
IOException

getShortName

public static String getShortName(String name)

expandVars

public static String expandVars(String expression,
                                Map<?,?> properties)

readFile

public static String readFile(File file)
                       throws IOException
Throws:
IOException

read

public static String read(InputStream in)
                   throws IOException
Throws:
IOException

copyToFile

public static void copyToFile(InputStream in,
                              File file)
                       throws IOException
Throws:
IOException

load

public static Document load(File file)
                     throws Exception
Throws:
Exception

load

public static Document load(InputStream in)
                     throws Exception
Throws:
Exception

processVars

public static void processVars(Element root,
                               Map<Object,Object> vars)
                        throws Exception
Throws:
Exception

processResources

public static void processResources(Element root,
                                    File dir,
                                    Map<Object,Object> vars)
                             throws Exception
Throws:
Exception

processArchetype

public static void processArchetype(Document doc,
                                    Map<Object,Object> vars)
                             throws Exception
Throws:
Exception

readVar

public static String readVar(String key,
                             String value)
                      throws IOException
Throws:
IOException

unzipArchetype

public static File unzipArchetype(File zipFile)
                           throws IOException
Throws:
IOException

deleteTree

public static void deleteTree(File dir)

emptyDirectory

public static void emptyDirectory(File dir)

writeFile

public static void writeFile(File file,
                             byte[] buf)
                      throws IOException
Throws:
IOException

writeFile

public static void writeFile(File file,
                             String buf)
                      throws IOException
Throws:
IOException

launch

public static void launch(String[] args)

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.