|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.jelly.Jelly
public class Jelly
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]
Field Summary | |
---|---|
private JellyContext |
context
The JellyContext to use |
private java.lang.String |
defaultNamespaceURI
whether to override the default namespace |
private boolean |
loadedProperties
Whether we have loaded the properties yet |
private static org.apache.commons.logging.Log |
log
The Log to which logging calls will be made. |
private java.net.URL |
rootContext
The URL of the root context for other scripts |
private java.net.URL |
url
The URL of the script to execute |
private boolean |
validateXML
whether or not to validate the Jelly script |
Constructor Summary | |
---|---|
Jelly()
|
Method Summary | |
---|---|
Script |
compileScript()
Compiles the script |
static java.lang.String |
getJellyBuildDate()
|
JellyContext |
getJellyContext()
The context to use |
static java.lang.String |
getJellyVersion()
|
java.net.URL |
getRootContext()
Gets the root context |
java.net.URL |
getUrl()
|
protected void |
loadJellyProperties()
Attempts to load jelly.properties from the current directory, the users home directory or from the classpath |
private void |
loadProperties(java.io.File f)
Load properties from a file into the context |
protected void |
loadProperties(java.io.InputStream is)
Loads the properties from the given input stream |
static void |
main(java.lang.String[] args)
Usage: jelly [scriptFile] [-script scriptFile -o outputFile -Dsysprop=syspropval] |
private static java.lang.String |
readBuildTimestampResource(java.lang.String name)
|
protected java.net.URL |
resolveURL(java.lang.String name)
|
void |
setDefaultNamespaceURI(java.lang.String namespace)
Set the jelly namespace to use for unprefixed elements. |
void |
setRootContext(java.net.URL rootContext)
Sets the root context |
void |
setScript(java.lang.String script)
Sets the script URL to use as an absolute URL or a relative filename |
void |
setUrl(java.net.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
private JellyContext context
private java.net.URL url
private java.net.URL rootContext
private boolean loadedProperties
private java.lang.String defaultNamespaceURI
private boolean validateXML
Constructor Detail |
---|
public Jelly()
Method Detail |
---|
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public static java.lang.String getJellyVersion()
public static java.lang.String getJellyBuildDate()
private static java.lang.String readBuildTimestampResource(java.lang.String name)
public Script compileScript() throws JellyException
JellyException
public void setScript(java.lang.String script) throws java.net.MalformedURLException
java.net.MalformedURLException
public java.net.URL getUrl()
public void setUrl(java.net.URL url)
public java.net.URL getRootContext() throws java.net.MalformedURLException
java.net.MalformedURLException
public void setRootContext(java.net.URL rootContext)
public JellyContext getJellyContext() throws java.net.MalformedURLException
java.net.MalformedURLException
public void setDefaultNamespaceURI(java.lang.String namespace)
namespace
- jelly namespace to use (e.g. 'jelly:core')public void setValidateXML(boolean validate)
validate
- whether or not to validateprotected java.net.URL resolveURL(java.lang.String name) throws java.net.MalformedURLException
java.net.MalformedURLException
protected void loadJellyProperties()
private void loadProperties(java.io.File f)
f
- protected void loadProperties(java.io.InputStream is) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |