Package org.apache.commons.jelly

Examples of org.apache.commons.jelly.JellyContext


    }

    public void setUp() throws Exception {
        super.setUp();
        jelly = new Jelly();
        context = new JellyContext();
        xmlOutput = XMLOutput.createDummyXMLOutput();
    }
View Full Code Here


            jelly.setScript(scriptFile);

            final Script script = jelly.compileScript();

            // add the system properties and the command line arguments
            final JellyContext context = jelly.getJellyContext();
            context.setVariable("args", args);
            context.setVariable("commandLine", cmdLine);
            if (runInSwingThread) {
                javax.swing.SwingUtilities.invokeAndWait(new Runnable() { public void run() {
                    try {
                        script.run(context, output);
                    } catch (Exception ex) {
View Full Code Here

            log.debug("Invoking dynamic tag with attributes: " + attributes);
        }
        attributes.put("org.apache.commons.jelly.body", getBody());

        // create new context based on current attributes
        JellyContext newJellyContext = context.newJellyContext(attributes);
        Map attrMap = new HashMap();
        for ( Iterator keyIter = this.attributes.keySet().iterator();
              keyIter.hasNext();) {
            String key = (String) keyIter.next();
            if ( key.endsWith( "Attr" ) ) {
                Object value = this.attributes.get( key );
                attrMap.put( key, value );
                attrMap.put( key.substring( 0, key.length()-4 ), value );
            }
        }
        newJellyContext.setVariable( "attrs", attrMap );
        getTemplate().run(newJellyContext, output);
    }
View Full Code Here

                throws ProcessingException,SAXException,IOException {

        super.setup(resolver, objectModel, src, params);

        // Initialize the Jelly context
        this.jellyContext = new JellyContext();
       
        // Update JellyContext with sitemap parameters
        this.updateContext(params);
    }
View Full Code Here

     *
     *  @throws ActivityException if an error occurs.
     */
    public void perform(ProcessContext context) throws ActivityException
    {
        JellyContext jellyContext = new JellyContext();

        jellyContext.setVariable( "context",
                                   context );

        try
        {
            XMLOutput output = XMLOutput.createXMLOutput( System.err,
View Full Code Here

     *          this guard, otherwise <code>false</code>.
     */
    public boolean test(Transition transition,
                        ProcessContext context)
    {
        JellyContext jellyContext = new JellyContext();

        jellyContext.setVariable( "blissed_context",
                                  context );

        try
        {
            XMLOutput output = XMLOutput.createXMLOutput( System.err,
View Full Code Here

    EnvVars env = getEnvironment(master, listener);
    if (env == null) {
      return false;
    }

    JellyContext context = new JellyContext();
    context.setVariable("master", master);
    String subject = compileJelly(context,
        "prebuild_email_subject.jelly");

    context = new JellyContext();
    context.setVariable("subject", subject);
    context.setVariable("preamble", env.expand(preamble));
    String body = compileJelly(context,
        "prebuild_email_body.jelly");
 
    try {
      MimeMessage message = sendMail(master, subject, body, listener);
View Full Code Here

    if (env == null) {
      return false;
    }
   
    MasterBuild master = (MasterBuild) build;
    JellyContext context = new JellyContext();
    context.setVariable("master", master);
    String subject = compileJelly(context,
        "result_email_subject.jelly");

    context = new JellyContext();
    context.setVariable("subject", subject);
    context.setVariable("preamble", env.expand(preamble));
    context.setVariable("master", master);
    context.setVariable("links", links);
    context.setVariable("rootURL", Hudson.getInstance().getRootUrl());
    String body = compileJelly(context,
        "result_email_body.jelly");

    try {
      sendMail(build, subject, body, listener);
View Full Code Here

                throws ProcessingException,SAXException,IOException {

        super.setup(resolver, objectModel, src, params);

        // Initialize the Jelly context
        this.jellyContext = new JellyContext();
       
        // Update JellyContext with sitemap parameters
        this.updateContext(params);
    }
View Full Code Here

    }

    public void setUp() throws Exception {
        super.setUp();
        jelly = new Jelly();
        context = new JellyContext();
        xmlOutput = XMLOutput.createDummyXMLOutput();
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.jelly.JellyContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.