public static String getInstallDirUnixStyle(Node node) { String installDir = node.getInstallDir(); if (installDir == null) return null; return installDir.replaceAll("\\\\", "/"); }
public static String getInstallDirUnixStyle(Node node) { String installDir= node.getInstallDir(); if (installDir == null) return null; return installDir.replaceAll("\\\\","/"); }
public static String getNodeDirAbsolute(Node node) { // If nodedir is relative make it absolute relative to installRoot String nodeDir = node.getNodeDir(); if (nodeDir == null || nodeDir.length() == 0) return null; File nodeDirFile = new File(nodeDir); if (nodeDirFile.isAbsolute()) { return nodeDir; } // node-dir is relative. Make it absolute. We root it under the // GlassFish root install directory. String installDir = node.getInstallDir(); File installRootFile = new File(installDir, "glassfish"); File absoluteNodeDirFile = new File(installRootFile, nodeDir); return absoluteNodeDirFile.getPath(); }
public static String getNodeDirAbsolute(Node node) { // If nodedir is relative make it absolute relative to installRoot String nodeDir= node.getNodeDir(); if (nodeDir == null || nodeDir.length() == 0) return null; File nodeDirFile = new File(nodeDir); if (nodeDirFile.isAbsolute()) { return nodeDir; } // node-dir is relative. Make it absolute. We root it under the // GlassFish root install directory. String installDir= node.getInstallDir(); File installRootFile = new File(installDir, "glassfish"); File absoluteNodeDirFile = new File(installRootFile, nodeDir); return absoluteNodeDirFile.getPath(); }
File defaultLocalNodeDirFile() { /* * The "nodes" directory we want to use is a child of * the install directory. * * The installDir field contains the installation directory which the * administrator specified, if s/he specified one, when the target node * was first created. It is null if the administrator did not specify * an installation directory for the node. In that case we should * use the DAS's install directory (because this method applies in the * local instance case). */ String installDir = node.getInstallDir(); final File nodeParentDir = ( installDir == null ? serverContext.getInstallRoot() : new File(installDir, "glassfish")); return new File(nodeParentDir, "nodes"); } }
protected File defaultLocalNodeDirFile() { /* * The "nodes" directory we want to use is a child of * the install directory. * * The installDir field contains the installation directory which the * administrator specified, if s/he specified one, when the target node * was first created. It is null if the administrator did not specify * an installation directory for the node. In that case we should * use the DAS's install directory (because this method applies in the * local instance case). */ String installDir = node.getInstallDir(); String nodeName = node.getName(); final File nodeParentDir = ( installDir == null ? serverContext.getInstallRoot() : new File(installDir, "glassfish")); return new File(nodeParentDir, "nodes"); }
String nodeType = n.getType(); String host = n.getNodeHost(); String installDir = n.getInstallDir();
String nodeType = n.getType(); String host = n.getNodeHost(); String installDir = n.getInstallDir();
private void setupSupplemental(AdminCommandContext context, final Server instance) { if (clusterName != null) { InstanceRegisterInstanceCommandParameters cp = new InstanceRegisterInstanceCommandParameters(); context.getActionReport(). setResultType(InstanceRegisterInstanceCommandParameters.class, cp); Node instNode = domain.getNodeNamed(node); cp.config = instance.getConfigRef(); cp.nodehost = instNode.getNodeHost(); cp.nodedir = instNode.getNodeDir(); cp.installdir = instNode.getInstallDir(); List<SystemProperty> spList = instance.getSystemProperty(); if (spList != null) { Properties p = new Properties(); for (SystemProperty sp : spList) { p.put(sp.getName(), sp.getValue()); } cp.systemProperties = p; } } }
private void setupSupplemental(AdminCommandContext context, final Server instance) { if (clusterName != null) { InstanceRegisterInstanceCommandParameters cp = new InstanceRegisterInstanceCommandParameters(); context.getActionReport(). setResultType(InstanceRegisterInstanceCommandParameters.class, cp); Node instNode = domain.getNodeNamed(node); cp.config = instance.getConfigRef(); cp.nodehost = instNode.getNodeHost(); cp.nodedir = instNode.getNodeDir(); cp.installdir = instNode.getInstallDir(); List<SystemProperty> spList = instance.getSystemProperty(); if (spList != null) { Properties p = new Properties(); for (SystemProperty sp : spList) { p.put(sp.getName(), sp.getValue()); } cp.systemProperties = p; } } }
String badparam = null; String configNodedir = node.getNodeDir(); String configInstalldir = node.getInstallDir();
theNode.getInstallDir(), nodeUtils.getGlassFishVersionOnNode(theNode)); } else {
installdir = node.getInstallDir();
installdir = node.getInstallDir();
info.add(NodeUtils.PARAM_SSHKEYFILE, sshAuth.getKeyfile()); info.add(NodeUtils.PARAM_INSTALLDIR, node.getInstallDir()); info.add(NodeUtils.PARAM_SSHPORT, sshC.getSshPort()); info.add(NodeUtils.PARAM_SSHUSER, sshAuth.getUserName());
info.add(NodeUtils.PARAM_SSHKEYFILE, sshAuth.getKeyfile()); info.add(NodeUtils.PARAM_INSTALLDIR, node.getInstallDir()); info.add(NodeUtils.PARAM_REMOTEPORT, sshC.getSshPort()); info.add(NodeUtils.PARAM_REMOTEUSER, sshAuth.getUserName());
validateHostname("nodehost", nodehost, value); value = node.getInstallDir(); validatePathSimple("installdir", installdir, value);
void validate(Node node) throws CommandValidationException { // Put node values into parameter map and validate ParameterMap map = new ParameterMap(); map.add("DEFAULT", node.getName()); map.add(NodeUtils.PARAM_INSTALLDIR, node.getInstallDir()); map.add(NodeUtils.PARAM_NODEHOST, node.getNodeHost()); map.add(NodeUtils.PARAM_NODEDIR, node.getNodeDirAbsolute()); SshConnector sshc = node.getSshConnector(); if (sshc != null) { map.add(NodeUtils.PARAM_SSHPORT, sshc.getSshPort()); SshAuth ssha = sshc.getSshAuth(); map.add(NodeUtils.PARAM_SSHUSER, ssha.getUserName()); map.add(NodeUtils.PARAM_SSHKEYFILE, ssha.getKeyfile()); map.add(NodeUtils.PARAM_SSHPASSWORD, ssha.getPassword()); map.add(NodeUtils.PARAM_SSHKEYPASSPHRASE, ssha.getKeyPassphrase()); map.add(NodeUtils.PARAM_TYPE,"SSH"); } validate(map); return; }
void validate(Node node) throws CommandValidationException { // Put node values into parameter map and validate ParameterMap map = new ParameterMap(); map.add("DEFAULT", node.getName()); map.add(NodeUtils.PARAM_INSTALLDIR, node.getInstallDir()); map.add(NodeUtils.PARAM_NODEHOST, node.getNodeHost()); map.add(NodeUtils.PARAM_NODEDIR, node.getNodeDirAbsolute()); SshConnector sshc = node.getSshConnector(); if (sshc != null) { map.add(NodeUtils.PARAM_REMOTEPORT, sshc.getSshPort()); SshAuth ssha = sshc.getSshAuth(); map.add(NodeUtils.PARAM_REMOTEUSER, ssha.getUserName()); map.add(NodeUtils.PARAM_SSHKEYFILE, ssha.getKeyfile()); map.add(NodeUtils.PARAM_REMOTEPASSWORD, ssha.getPassword()); map.add(NodeUtils.PARAM_SSHKEYPASSPHRASE, ssha.getKeyPassphrase()); map.add(NodeUtils.PARAM_TYPE, node.getType()); } validate(map); return; }
validateHostname("nodehost", nodehost, value); value = node.getInstallDir(); validatePathSimple("installdir", installdir, value);