Package gri.gridp.modules

Examples of gri.gridp.modules.ScriptEnvironment


  public Object read(Element elem) {
    return readScript(elem);
  }

  public void writeScript(Script script, Element elem) {
    ScriptEnvironment env = script.getEnvironment();

    //os:
    String os = env.getOperatingSystem();
    if (os != null && !os.equals(ScriptEnvironment.UNKNOWN_OS))
      elem.setAttribute("os", os);

    //shell:
    String shell = env.getShell();
    if (shell != null && !shell.equals(ScriptEnvironment.UNKNOWN_SHELL))
      elem.setAttribute("shell", shell);

    //script:
    elem.addContent(new CDATA(script.getText()));
View Full Code Here


  }

  public Script readScript(Element element) {
    Script s = new Script();
    ScriptEnvironment e = s.getEnvironment();

    Attribute a;
    //os:
    a = element.getAttribute("os");
    if (a != null)
      e.setOperatingSystem(a.getValue());

    //shell:
    a = element.getAttribute("shell");
    if (a != null)
      e.setShell(a.getValue());

    //script:
    s.setText(element.getValue());

    return s;
View Full Code Here

TOP

Related Classes of gri.gridp.modules.ScriptEnvironment

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.