public void doEdit(@FormGroup("nodeInfo") Group nodeInfo, @FormGroup("nodeParameterInfo") Group nodeParameterInfo,
@Param("pageIndex") int pageIndex, @Param("searchKey") String searchKey,
@FormField(name = "formNodeError", group = "nodeInfo") CustomErrors err, Navigator nav)
throws Exception {
Node node = new Node();
NodeParameter parameter = new NodeParameter();
nodeInfo.setProperties(node);
nodeParameterInfo.setProperties(parameter);
if (parameter.getDownloadPort() == null || parameter.getDownloadPort() == 0) {
parameter.setDownloadPort(node.getPort().intValue() + 1);
}
if (parameter.getMbeanPort() == null || parameter.getMbeanPort() == 0) {
parameter.setMbeanPort(node.getPort().intValue() + 2);
}
Long autoKeeperclusterId = nodeParameterInfo.getField("autoKeeperclusterId").getLongValue();
if (autoKeeperclusterId != null && autoKeeperclusterId > 0) {
AutoKeeperCluster autoKeeperCluster = autoKeeperClusterService.findAutoKeeperClusterById(autoKeeperclusterId);
parameter.setZkCluster(autoKeeperCluster);
}
node.setParameters(parameter);
try {
nodeService.modify(node);