public class Jelly extends Object
Jelly
is a helper class which is capable of
running a Jelly script. This class can be used from the command line
or can be used as the basis of an Ant task.
jelly [scriptFile] [-script scriptFile -o outputFile -Dsysprop=syspropval]
Constructor and Description |
---|
Jelly() |
Modifier and Type | Method and Description |
---|---|
Script |
compileScript()
Compiles the script
|
static String |
getJellyBuildDate() |
JellyContext |
getJellyContext()
The context to use
|
static String |
getJellyVersion() |
URL |
getRootContext()
Gets the root context
|
URL |
getUrl() |
protected void |
loadJellyProperties()
Attempts to load jelly.properties from the current directory,
the users home directory or from the classpath
|
protected void |
loadProperties(InputStream is)
Loads the properties from the given input stream
|
static void |
main(String[] args)
Usage: jelly [scriptFile] [-script scriptFile -o outputFile -Dsysprop=syspropval]
|
protected URL |
resolveURL(String name) |
void |
setDefaultNamespaceURI(String namespace)
Set the jelly namespace to use for unprefixed elements.
|
void |
setRootContext(URL rootContext)
Sets the root context
|
void |
setScript(String script)
Sets the script URL to use as an absolute URL or a relative filename
|
void |
setUrl(URL url)
Sets the script URL to use
|
void |
setValidateXML(boolean validate)
When set to true, the XML parser will attempt to validate
the Jelly XML before converting it into a Script.
|
public static void main(String[] args) throws Exception
Exception
public static String getJellyVersion()
public static String getJellyBuildDate()
public Script compileScript() throws JellyException
JellyException
public void setScript(String script) throws MalformedURLException
MalformedURLException
public URL getUrl()
public void setUrl(URL url)
public URL getRootContext() throws MalformedURLException
MalformedURLException
public void setRootContext(URL rootContext)
public JellyContext getJellyContext() throws MalformedURLException
MalformedURLException
public void setDefaultNamespaceURI(String namespace)
namespace
- jelly namespace to use (e.g. 'jelly:core')public void setValidateXML(boolean validate)
validate
- whether or not to validateprotected URL resolveURL(String name) throws MalformedURLException
MalformedURLException
protected void loadJellyProperties()
protected void loadProperties(InputStream is) throws IOException
IOException
Copyright © 2014 Apache Software Foundation. All rights reserved.