Trinary autostart = ev.getAutostart();
String user = ev.getUser();
if ( ! validate_user("Register", ev) ) return; // necessary messages emitted in here
DuccId id = null;
try {
id = newId();
} catch ( Exception e ) {
logger.error(methodName, null, e);
ev.setReply(new ServiceReplyEvent(false, "Internal error; unable to generate id", endpoint, -1));
return;
}
logger.debug(methodName, id, "Unique:", id.getUnique());
String logdir = props.getProperty(UiOption.LogDirectory.pname());
if ( !logdir.endsWith("/") ) {
logdir = logdir + "/";
}
logdir = logdir + "S-" + id.toString();
props.put(UiOption.LogDirectory.pname(), logdir);
DuccProperties meta = new DuccProperties();
meta.setProperty("user", user);
meta.setProperty("instances", ""+instances);
meta.setProperty("endpoint", endpoint);
meta.setProperty("numeric_id", id.toString());
meta.setProperty("uuid", id.getUnique());
if ( autostart == Trinary.True ) {
meta.setProperty("autostart", "true");
} else {
meta.setProperty("autostart", "false");
}