Package org.apache.commons.jelly

Examples of org.apache.commons.jelly.Script.run()


                        return this;
                    }

                    public void run(JellyContext context, XMLOutput output) throws JellyTagException {
                        Functions.initPageVariables(context);
                        s.run(context,output);
                    }
                },self,new XMLOutput(new DefaultHandler()));
            } else
            if (self instanceof Actionable) {
                // fallback
View Full Code Here


        if ( context.getVariable( PLUGIN_HOUSING ) != null )
        {
            throw new IllegalStateException( "nested plugin housings" );
        }
        context.setVariable( PLUGIN_HOUSING, jellyScriptHousing );
        s.run( context, context.getXMLOutput() );
        context.removeVariable( PLUGIN_HOUSING );
    }

    public Project getPluginProjectFromGoal( String goal )
        throws MavenException
View Full Code Here

            context.setRootURL( rootUrl );
            context.setCurrentURL( rootUrl );
        }

        Script script = compileScript( scriptInputStream, systemId, context );
        script.run( context, output );

        context.setRootURL( oldRoot );
        context.setCurrentURL( oldCurrent );
    }
View Full Code Here

            handler.startDocument();
            invokeBody(newOutput);
            handler.endDocument();
            // Run script to generate output
            Script script = getJellyParser().getScript();
            script.run(context, output);
        } catch (JellyTagException e) {
            if (e.getCause() instanceof SAXException) {
                throw (SAXException)e.getCause();
            } else {
                throw e;
View Full Code Here

  jellyParser.configure ();
  reader.setContentHandler(new NamespaceAttributesFilter(jellyParser));
  reader.parse (inSrc);
  Script script = jellyParser.getScript ();
  script.compile ();
  script.run (context, XMLOutput.createXMLOutput(System.out));
    }
}
View Full Code Here

      seb.emit (new NamespaceAttributesFilter(jellyParser));
      Script script = jellyParser.getScript ();
      script.compile ();
      SAXEventBufferImpl jres = new SAXEventBufferImpl ();
      jres.startDocument ();
      script.run (context, new XMLOutput(jres));
      jres.endDocument ();
      jres.pack ();
      return jres;
  } catch (JellyException e) {
      throw (IllegalArgumentException)(new IllegalArgumentException
View Full Code Here

            Script script = this.jellyParser.parse(SourceUtil.getInputSource(scriptSource));
            script = script.compile();
           
            // the script does not output startDocument/endDocument events
            this.contentHandler.startDocument();
            script.run(this.jellyContext, xmlOutput);
            xmlOutput.flush();
            this.contentHandler.endDocument();
           
        } catch (IOException e) {
            getLogger().error("JellyGenerator.generate()", e);
View Full Code Here

            Script script = this.jellyParser.parse(SourceUtil.getInputSource(scriptSource));
            script = script.compile();
           
            // the script does not output startDocument/endDocument events
            this.contentHandler.startDocument();
            script.run(this.jellyContext, xmlOutput);
            xmlOutput.flush();
            this.contentHandler.endDocument();
           
        } catch (IOException e) {
            getLogger().error("JellyGenerator.generate()", e);
View Full Code Here

       
        SAXContentHandler contentHandler = new SAXContentHandler();
        XMLOutput output = new XMLOutput( contentHandler );
       
        contentHandler.startDocument();
        script.run(context, output);
        contentHandler.endDocument();
       
        return contentHandler.getDocument();
    }
}
View Full Code Here

        Script script = parser.parse(in);
        script = script.compile();
        log.debug("Found: " + script);
        assertTrue("Parsed a Script", script instanceof Script);
        StringWriter buffer = new StringWriter();
        script.run(parser.getContext(), XMLOutput.createXMLOutput(buffer));
        String text = buffer.toString().trim();
        if (log.isDebugEnabled()) {
            log.debug("Evaluated script as...");
            log.debug(text);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.