Package org.apache.commons.jelly

Examples of org.apache.commons.jelly.XMLOutput


    }

    private String convert(AbstractBuild<?, ?> build, JellyContext context, Script script)
            throws JellyTagException, IOException {
        ByteArrayOutputStream output = new ByteArrayOutputStream(16 * 1024);
        XMLOutput xmlOutput = XMLOutput.createXMLOutput(output);
        script.run(context, xmlOutput);
        xmlOutput.flush();
        xmlOutput.close();
        output.close();
        return output.toString(getCharset(build));
    }
View Full Code Here


                    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
                this.addAll(((Actionable)self).getActions());
            }
View Full Code Here

             // supplied through the request object.
            this.updateContext();

            // Execute Jelly script
            StringWriter output = new StringWriter();
            XMLOutput xmlOutput = XMLOutput.createXMLOutput(output);
           
            scriptSource = this.resolver.resolveURI(this.source);
            this.jellyContext.runScript(scriptSource.getURI(), xmlOutput);
            xmlOutput.flush();
           
            InputSource inputSource = new InputSource(new StringReader(output.toString()));
            parser = (SAXParser) this.manager.lookup(SAXParser.ROLE);
            parser.parse(inputSource, super.xmlConsumer);
        } catch (IOException e) {
View Full Code Here

                script.run(context, output);
            }
       
            // Parse script into Jelly parser
            ContentHandler handler = getJellyParser();
            XMLOutput newOutput = new XMLOutput(handler);
            handler.startDocument();
            invokeBody(newOutput);
            handler.endDocument();
            // Run script to generate output
            Script script = getJellyParser().getScript();
View Full Code Here

    /**
     * Simple connection
     */
    public void connect() throws Exception {
  JellyContext context = new JellyContext();
  XMLOutput xmlOutput = XMLOutput.createXMLOutput(System.out);
  context.runScript(new File ("util/ldap-connect.jelly"), xmlOutput);
  xmlOutput.flush();
    }
View Full Code Here

    /**
     * Simple query
     */
    public void query() throws Exception {
  JellyContext context = new JellyContext();
  XMLOutput xmlOutput = XMLOutput.createXMLOutput(System.out);
  context.runScript(new File ("util/ldap-query.jelly"), xmlOutput);
  xmlOutput.flush();
    }
View Full Code Here

    /**
     * Simple insert
     */
    public void insert() throws Exception {
  JellyContext context = new JellyContext();
  XMLOutput xmlOutput = XMLOutput.createXMLOutput(System.out);
  context.runScript(new File ("util/ldap-insert.jelly"), xmlOutput);
  xmlOutput.flush();
    }
View Full Code Here

    /**
     * Simple update
     */
    public void update() throws Exception {
  JellyContext context = new JellyContext();
  XMLOutput xmlOutput = XMLOutput.createXMLOutput(System.out);
  context.runScript(new File ("util/ldap-update.jelly"), xmlOutput);
  xmlOutput.flush();
    }
View Full Code Here

        jscript.compile ();
    }
      }
      SAXEventBufferImpl jres = new SAXEventBufferImpl ();
      jres.startDocument ();
      jscript.run (context, new XMLOutput(jres));
      jres.endDocument ();
      jres.pack ();
      Map resData = new HashMap ();
      int argStart = 0;
      if (fps[0].mode() == FormalParameter.Mode.OUT
View Full Code Here

    /**
     * Simple delete
     */
    public void delete() throws Exception {
  JellyContext context = new JellyContext();
  XMLOutput xmlOutput = XMLOutput.createXMLOutput(System.out);
  context.runScript(new File ("util/ldap-delete.jelly"), xmlOutput);
  xmlOutput.flush();
    }
View Full Code Here

TOP

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

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.