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; }
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; }