String projectName = sandboxWorkItem.getField("projectName").getValueAsString();
String buildRevision = sandboxWorkItem.getField("buildRevision").getValueAsString();
String devPath = sandboxWorkItem.getField("developmentPath").getValueAsString();
boolean isSubsandbox = sandboxWorkItem.getField("isSubsandbox").getBoolean();
SandboxInfo sandbox;
if (!isSubsandbox) {
sandbox = new SandboxInfo(sandboxName,server,projectName,buildRevision, devPath);
} else {
String parentSandbox = sandboxWorkItem.getField("parentSandbox").getValueAsString();
sandbox = new SandboxInfo(sandboxesByPath.get(parentSandbox), sandboxName, projectName, buildRevision, devPath);
}
sandboxesByPath.put(sandboxName, sandbox);
tempSandboxes.add(sandbox);
}
sandboxesByPath.clear();