public Object run(ConfigBeanProxy param) throws PropertyVetoException, TransactionFailure {
// get the transaction
Transaction t = Transaction.getTransaction(param);
if (t!=null) {
Nodes nodes = ((Domain)param).getNodes();
Node node = nodes.getNode(nodeName);
Node writeableNode = t.enroll(node);
if (windowsdomain != null)
writeableNode.setWindowsDomain(windowsdomain);
if (nodedir != null)
writeableNode.setNodeDir(nodedir);
if (nodehost != null)
writeableNode.setNodeHost(nodehost);
if (installdir != null)
writeableNode.setInstallDir(installdir);
if (type != null)
writeableNode.setType(type);
if (sshport != null || sshnodehost != null ||sshuser != null || sshkeyfile != null){
SshConnector sshC = writeableNode.getSshConnector();
if (sshC == null) {
sshC =writeableNode.createChild(SshConnector.class);
}else
sshC = t.enroll(sshC);
if (sshport != null)
sshC.setSshPort(sshport);
if(sshnodehost != null)
sshC.setSshHost(sshnodehost);
if (sshuser != null || sshkeyfile != null || sshpassword != null || sshkeypassphrase != null ) {
SshAuth sshA = sshC.getSshAuth();
if (sshA == null) {
sshA = sshC.createChild(SshAuth.class);
} else
sshA = t.enroll(sshA);
if (sshuser != null)
sshA.setUserName(sshuser);
if (sshkeyfile != null)
sshA.setKeyfile(sshkeyfile);
if(sshpassword != null)
sshA.setPassword(sshpassword);
if(sshkeypassphrase != null)
sshA.setKeyPassphrase(sshkeypassphrase);
sshC.setSshAuth(sshA);
}
writeableNode.setSshConnector(sshC);
}
}
return Boolean.TRUE;