Ejemplo n.º 1
0
 public static ParameterScript unserializeParameterScript(Properties properties) {
   ParameterScript result = new ParameterScript();
   result.setName(properties.getProperty("name"));
   result.setActive(properties.getProperty("isActive").equals("true"));
   result.setDescription(properties.getProperty("description"));
   result.setScript(properties.getProperty("script"));
   result.setType(Type.valueOf(properties.getProperty("type")));
   result.setConnectorType(ScriptConnectorType.valueOf((String) properties.get("connectorType")));
   return result;
 }
Ejemplo n.º 2
0
 public static Properties serialize(ParameterScript script) {
   Properties properties = new Properties();
   properties.put("name", script.getName());
   properties.put("isActive", String.valueOf(script.isActive()));
   properties.put("description", script.getDescription());
   properties.put("script", script.getScript());
   properties.put("type", script.getType().toString());
   properties.put("connectorType", script.getConnectorType().name());
   return properties;
 }