Esempio n. 1
0
 /**
  * Returns the parameters to pass when running the script.
  *
  * @return See above.
  */
 public Map<String, RType> getValueToPass() {
   Map<String, RType> map = new HashMap<String, RType>();
   if (inputs == null) return map;
   Iterator<Entry<String, ParamData>> i = inputs.entrySet().iterator();
   ParamData p;
   Entry<String, ParamData> entry;
   RType type;
   while (i.hasNext()) {
     entry = i.next();
     p = entry.getValue();
     type = p.getValueToPassAsRType();
     if (type != null) map.put(entry.getKey(), type);
   }
   return map;
 }
Esempio n. 2
0
 /**
  * Returns <code>true</code> if all the required values are populated, <code>false</code>
  * otherwise.
  *
  * @return See above
  */
 public boolean allRequiredValuesPopulated() {
   if (inputs == null) return true;
   Iterator<Entry<String, ParamData>> i = inputs.entrySet().iterator();
   ParamData p;
   Entry<String, ParamData> entry;
   RType type;
   while (i.hasNext()) {
     entry = i.next();
     p = entry.getValue();
     if (!p.isOptional()) {
       type = p.getValueToPassAsRType();
       if (type == null) return false;
     }
   }
   return true;
 }