Examples of ScriptManager


Examples of org.atomojo.www.util.script.ScriptManager

      // TODO: make the expiration configurable
      client = context.getClientDispatcher();
      if (autoconfList!=null && autoconfList.size()>0) {
         autoConf = autoconfList.get(autoconfList.size()-1);
         applications = new TreeMap<String,AppInfo>();
         this.scriptManager = new ScriptManager(getContext(),client,metadata,autoConf.getUsername(),autoConf.getPassword(),60000);
         this.context.getAttributes().put(ScriptManager.ATTR, scriptManager);
         check();
      } else {
         this.scriptManager = new ScriptManager(getContext(),client,metadata,null,null,60000);
         this.context.getAttributes().put(ScriptManager.ATTR, scriptManager);
         //configureStaticApplications();
      }
     
   }
View Full Code Here

Examples of org.atomojo.www.util.script.ScriptManager

      // TODO: make the expiration configurable
      client = context.getClientDispatcher();
      if (autoconfList!=null && autoconfList.size()>0) {
         autoConf = autoconfList.get(autoconfList.size()-1);
         applications = new TreeMap<String,AppInfo>();
         this.scriptManager = new ScriptManager(getContext(),client,metadata,autoConf.getUsername(),autoConf.getPassword(),60000);
         this.context.getAttributes().put(ScriptManager.ATTR, scriptManager);
         check();
      } else {
         this.scriptManager = new ScriptManager(getContext(),client,metadata,null,null,60000);
         this.context.getAttributes().put(ScriptManager.ATTR, scriptManager);
         configureStaticApplications();
      }
     
   }
View Full Code Here

Examples of org.chromium.sdk.internal.v8native.ScriptManager


public class ScriptImplTestGate {

  public static ScriptManager create(V8ContextFilter contextFilter) {
    return new ScriptManager(contextFilter, null);
  }
View Full Code Here

Examples of org.geoserver.script.ScriptManager

        super.setUp();
        scriptMgr = createScriptMgr();
    }

    ScriptManager createScriptMgr() throws Exception {
        ScriptManager mgr = createNiceMock(ScriptManager.class);
        expect(mgr.getWfsTxRoot()).andReturn(Files.createTempDir()).anyTimes();
        replay(mgr);
        return mgr;
    }
View Full Code Here

Examples of org.geoserver.script.ScriptManager

    }

    protected List<Script> getScripts() {
        List<Script> scripts = new ArrayList<Script>();
        ScriptManager scriptManager = (ScriptManager) GeoServerExtensions.bean("scriptMgr");
        try {
            File[] dirs = { scriptManager.getWpsRoot(), scriptManager.getWfsTxRoot(),
                    scriptManager.getFunctionRoot(), scriptManager.getAppRoot() };
            for (File dir : dirs) {
                File[] files = dir.listFiles();
                for (File file : files) {
                    if (dir.getName().equals("apps")) {
                        if (file.isDirectory()) {
                            File mainFile = scriptManager.findAppMainScript(file);
                            if (mainFile != null) {
                                Script script = new Script(mainFile);
                                scripts.add(script);
                            } else {
                                LOGGER.info("Could not find main app file in " + file.getAbsolutePath());
View Full Code Here

Examples of org.geoserver.script.ScriptManager

        form.add(cancelLink);
    }

    private List<String> getExtensions() {
        List<String> extensions = Lists.newArrayList();
        ScriptManager scriptManager = (ScriptManager) GeoServerExtensions.bean("scriptMgr");
        for (ScriptPlugin plugin : scriptManager.getPlugins()) {
            extensions.add(plugin.getExtension());
        }
        return extensions;
    }
View Full Code Here

Examples of org.geoserver.script.ScriptManager

        }
        return extensions;
    }

    private String getModeFromExtension(String ext) {
        ScriptManager scriptManager = (ScriptManager) GeoServerExtensions.bean("scriptMgr");
        String mode = scriptManager.lookupEditorModeByExtension(ext);
        return mode;
    }
View Full Code Here

Examples of org.geoserver.script.ScriptManager

        form.add(extensionLabel);
        HiddenField extension = new HiddenField("extension", new PropertyModel(scriptModel, "extension"));
        form.add(extension);

        // Content
        ScriptManager scriptManager = (ScriptManager) GeoServerExtensions.bean("scriptMgr");
        String mode = scriptManager.lookupPluginEditorMode(script.getFile());
        CodeMirrorEditor content = new CodeMirrorEditor("contents", mode, new PropertyModel(scriptModel, "contents"));
        content.setRequired(true);
        form.add(content);

        // Dialog
View Full Code Here

Examples of org.geoserver.script.ScriptManager

            return FilenameUtils.getBaseName(file.getName());
        }
    }

    private File findFile(String name, String type, String extension) {
        ScriptManager scriptManager = (ScriptManager) GeoServerExtensions.bean("scriptMgr");
        try {
            if (name.contains(":")) {
                name = name.replace(":",File.separator);
            }
            File f = scriptManager.findScriptFile(name, ScriptType.getByLabel(type), extension);
            return f;
        } catch (IOException ex) {
            LOGGER.warning(String.format(
                    "Error finding file for name = %s, type = %s extension = %s because ", name,
                    type, extension, ex.getMessage()));
View Full Code Here

Examples of org.geoserver.script.ScriptManager

        }
        return "";
    }

    private String findType(File file) {
        ScriptManager scriptManager = (ScriptManager) GeoServerExtensions.bean("scriptMgr");
        return scriptManager.getScriptType(file).getLabel();
    }
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.