Examples of Script


Examples of org.apache.commons.jelly.Script

    }

    private String renderContent(AbstractBuild<?, ?> build, InputStream inputStream, TaskListener listener)
            throws JellyException, IOException {
        JellyContext context = createContext(new ScriptContentBuildWrapper(build), build, listener);
        Script script = context.compileScript(new InputSource(inputStream));
        if (script != null) {
            return convert(build, context, script);
        }
        return null;
    }
View Full Code Here

Examples of org.apache.commons.jexl.Script

        JMeterContext jmctx = JMeterContextService.getContext();
        JMeterVariables vars = jmctx.getVariables();

        try
        {
            Script script = ScriptFactory.createScript(exp);
            JexlContext jc = JexlHelper.createContext();
            @SuppressWarnings("unchecked")
            final Map<String, Object> jexlVars = jc.getVars();
            jexlVars.put("log", log); //$NON-NLS-1$
            jexlVars.put("ctx", jmctx); //$NON-NLS-1$
            jexlVars.put("vars", vars); //$NON-NLS-1$
            jexlVars.put("props", JMeterUtils.getJMeterProperties()); //$NON-NLS-1$
            // Previously mis-spelt as theadName
            jexlVars.put("threadName", Thread.currentThread().getName()); //$NON-NLS-1$
            jexlVars.put("sampler", currentSampler); //$NON-NLS-1$ (may be null)
            jexlVars.put("sampleResult", previousResult); //$NON-NLS-1$ (may be null)
            jexlVars.put("OUT", System.out);//$NON-NLS-1$

            // Now evaluate the script, getting the result
            Object o = script.execute(jc);
            if (o != null)
            {
                str = o.toString();
            }
            if (vars != null && varName.length() > 0) {// vars will be null on TestPlan
View Full Code Here

Examples of org.apache.commons.jexl.Script

            throws BSFException {
        if (expr == null) {
            return null;
        }
        try {
            Script jExpr = null;
            if (expr instanceof File) {
                jExpr = ScriptFactory.createScript((File) expr);
            } else if (expr instanceof URL) {
                jExpr = ScriptFactory.createScript((URL) expr);
            } else {
                jExpr = ScriptFactory.createScript((String) expr);
            }
            return jExpr.execute(jc);
        } catch (Exception e) {
            // TODO Better messages
            throw new BSFException(e.getMessage());
        }
    }
View Full Code Here

Examples of org.apache.commons.jexl.Script

            throws BSFException {
        if (script == null) {
            return;
        }
        try {
            Script jExpr = null;
            if (script instanceof File) {
                jExpr = ScriptFactory.createScript((File) script);
            } else if (script instanceof URL) {
                jExpr = ScriptFactory.createScript((URL) script);
            } else {
                jExpr = ScriptFactory.createScript((String) script);
            }
            jExpr.execute(jc);
        } catch (Exception e) {
            throw new BSFException(e.getMessage());
        }
    }
View Full Code Here

Examples of org.apache.commons.jexl2.Script

   
    this.modifiedQuery = q.toString();
   
    Boolean result = null;
    if (rewritten) {
      Script script = engine.createScript(this.modifiedQuery);
      try {
        result = (Boolean) script.execute(ctx);
      } catch (Exception e) {
        log.error("Error evaluating script: " + this.modifiedQuery + " against event" + eventFields.toString(), e);
      }
    } else {
      Expression expr = engine.createExpression(this.modifiedQuery);
View Full Code Here

Examples of org.apache.commons.scxml2.model.Script

        // Marker to indicate generated document
        writer.writeComment(XMLNS_COMMONS_SCXML);

        // Write global script if defined
        if (scxml.getGlobalScript() != null) {
            Script s = scxml.getGlobalScript();
            writer.writeStartElement(XMLNS_SCXML, ELEM_SCRIPT);
            writer.writeCData(s.getScript());
            writer.writeEndElement();
        }

        // Children
        writeDatamodel(writer, scxml.getDatamodel());
View Full Code Here

Examples of org.apache.ecs.html.Script

     * @param url A String.
     * @return A TemplatePageAttributesEx (self).
     */
    public TemplatePageAttributes setScript(String url)
    {
        data.getPage().getHead().addElement(new Script().setSrc(url)
                .setType("text/javascript").setLanguage("JavaScript"));
        return this;
    }
View Full Code Here

Examples of org.apache.ecs.xhtml.script

          link l = new link(extension.getStyleURL(), "stylesheet", "text/css");
          doc.appendHead(l);         
        }
        if (extension.getScriptURL() != null)
        {
          script jslink = new script();
          jslink.setLanguage("javascript");
          jslink.setSrc(extension.getScriptURL());
          doc.appendHead(jslink);
        }
        doc.output(w);
      }
      w.flush();
View Full Code Here

Examples of org.apache.flex.forks.batik.svggen.font.table.Script

        GsubTable gsub = (GsubTable) font.getTable(Table.GSUB);
        SingleSubst initialSubst = null;
        SingleSubst medialSubst = null;
        SingleSubst terminalSubst = null;
        if (gsub != null) {
            Script s = gsub.getScriptList().findScript(SCRIPT_TAG_ARAB);
            if (s != null) {
                LangSys ls = s.getDefaultLangSys();
                if (ls != null) {
                    Feature init = gsub.getFeatureList().findFeature(ls, FEATURE_TAG_INIT);
                    Feature medi = gsub.getFeatureList().findFeature(ls, FEATURE_TAG_MEDI);
                    Feature fina = gsub.getFeatureList().findFeature(ls, FEATURE_TAG_FINA);
                   
View Full Code Here

Examples of org.axsl.i18n.Script

     */
    public Baseline computeAutoBaseline(final FoContext context) {
        final FObj parent = this.effectiveParent(context);
        if (this.isBlockLevelFo()
                || parent == null) {
            final Script script = this.traitScript(context);
            if (script.equals("auto")) {
                final DtWritingMode writingMode = this.traitWritingMode(context);
                if (writingMode.isHorizontal()) {
                    return Baseline.ALPHABETIC;
                } else {
                    return Baseline.CENTRAL;
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.