org.nuxeo.runtime.jboss.deployer
Class Utils
java.lang.Object
org.nuxeo.runtime.jboss.deployer.Utils
public class Utils
- extends Object
- Author:
- Bogdan Stefanescu
Constructor Summary |
Utils()
|
Utils
public Utils()
tryGetFile
public static File tryGetFile(URL url)
throws Exception
- Throws:
Exception
getFile
public static File getFile(URL url)
throws Exception
- Throws:
Exception
getJarFile
public static File getJarFile(URL url)
throws Exception
- Throws:
Exception
getFile
public static File getFile(org.jboss.virtual.VirtualFile vf)
throws Exception
- Try to convert a virtual file to a real java file. An IOException is
thrown if the virtual file cannot be converted to a java file. Virtual
files that point to a zip entry will return the zip file containing the
entry.
- Parameters:
vf
-
- Returns:
-
- Throws:
Exception
getRealHomeDir
public static File getRealHomeDir(org.jboss.virtual.VirtualFile vf)
throws Exception
- Throws:
Exception
getRealHomeDir
public static File getRealHomeDir(org.jboss.virtual.VirtualFile vf,
long lastModified)
throws Exception
- Unzip only if the given lastModified is greater than the already unzipped
home (if any). Must use a vlue of 0 if the lastModified time is not
known.
- Parameters:
vf
- lastModified
-
- Returns:
-
- Throws:
Exception
split
public static String[] split(String str,
char delimiter,
boolean trim)
expandVars
public static String expandVars(String expression,
Map<?,?> properties)
- Expands any variable found in the given expression with the values in the
given map.
The variable format is ${property_key}.
- Parameters:
expression
- the expression to expandproperties
- a map containing variables
Copyright © 2011 Nuxeo SAS. All Rights Reserved.