Examples of ParameterDef


Examples of gri.tasks.ParameterDef

        public RequestTaskDef() {
            this(false);
        }
       
        protected void setInputs() {
          ParameterDef script = new ParameterDef(SCRIPT, Types.STRING, "Text of script to execute");
            ParameterDef jobout = new ParameterDef(STDOUT_FILE, Types.STRING, "Name of the file for standard output");
            ParameterDef joberr = new ParameterDef(STDERR_FILE, Types.STRING, "Name of the file for standard error");
            ParameterDef remoteWorkdir = new ParameterDef(REMOTE_WORKDIR, Types.STRING, "Directory on remote computer where script will run");
            ParameterDef localWorkdir = new ParameterDef(LOCAL_WORKDIR, Types.FILE, "Directory on local computer where output will be stored");
           
            script.setDisplayName("Script");
            jobout.setDisplayName("Standard Output File");
            joberr.setDisplayName("Standard Error File");
            remoteWorkdir.setDisplayName("Remote Working Directory");
            localWorkdir.setDisplayName("Local Working Directory");
                       
            jobout.setDefaultValue("stdout.txt");
            joberr.setDefaultValue("stderr.txt");
            localWorkdir.setDefaultValue(new File("."));
           
            addInput(script);
            addInput(jobout);
            addInput(joberr);
            addInput(localWorkdir);
View Full Code Here

Examples of gri.tasks.ParameterDef

            addInput(remoteWorkdir);
        }
       
        protected void setOutputs() {
            //ParameterDef exitCode = new ParameterDef("exitcode", Types.INTEGER, "Exit code returned by program");
            ParameterDef jobout = new ParameterDef(STDOUT_FILE, Types.FILE, "File containing standard output from the script");
            ParameterDef joberr = new ParameterDef(STDERR_FILE, Types.FILE, "File containing standard error from the script");
            ParameterDef script = new ParameterDef(SCRIPT, Types.FILE, "File containing the script that was executed");
           
            DataType FILE_LIST = Types.createListType(List.class, Types.FILE);
            ParameterDef outputFiles = new ParameterDef("outputFiles", FILE_LIST, "Output files");
           
            //exitCode.setDisplayName("Exit Code");
            jobout.setDisplayName("Standard Output File");
            joberr.setDisplayName("Standard Error File");
            script.setDisplayName("Script File");
            outputFiles.setDisplayName("Output Files");
           
            addOutput(script);
            addOutput(jobout);
            addOutput(joberr);
            //addOutput(exitCode);
View Full Code Here

Examples of gri.tasks.ParameterDef

      TaskDef taskDef = job.getTaskDef();
      ParameterDef [] params = (ParameterDef [])taskDef.getOutputs().toArray(
            new ParameterDef[0]);
     
        for (int i=0; i<params.length; i++) {
            ParameterDef paramDef = params[i];
            Object value = outputs.get(paramDef.getName());
           
            System.out.println(value + " (" + paramDef.getDataType() + ")");
        }

        //display outputs:
        JFrame frame = new JFrame("Outputs");
       
View Full Code Here

Examples of gri.tasks.ParameterDef

    protected void update() {
        clear();
        if (paramDefs == null)
            return;
       
        ParameterDef paramDef;
        for (int i=0; i<paramDefs.length; i++) {
            paramDef = paramDefs[i];
           
            //if (this.gapWidth > 0 && i != 0)
            //    this.add(Box.createVerticalStrut(this.gapWidth));
           
            ParamPanel panel = new ParamPanel(paramDef, widgets[i]);
            this.add(panel);
            AppStyles.applyStyle(panel, "ParameterPanel.ParamPanel");
           
            if (paramDef.hasDefaultValue())
                widgets[i].setValue(paramDef.getDefaultValue());
           
        }
       
        //this.add(Box.createVerticalGlue());
    }
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.