/** * Returns the directory for the selected instance that is on the local * system. * @param instanceName name of the instance * @return File for the local file system location of the instance directory * @throws IOException */ protected File getLocalInstanceDir(String instance) throws IOException { /* * Pass the node directory parent and the node directory name explicitly * or else InstanceDirs will not work as we want if there are multiple * nodes registered on this node. * * If the configuration recorded an explicit directory for the node, * then use it. Otherwise, use the default node directory of * ${installDir}/glassfish/nodes/${nodeName}. */ String nodeDir = node.getNodeDirAbsolute(); final File nodeDirFile = (nodeDir != null ? new File(nodeDir) : defaultLocalNodeDirFile()); InstanceDirs instanceDirs = new InstanceDirs(nodeDirFile.toString(), node.getName(), instance); return instanceDirs.getInstanceDir(); }
/** * Returns the directory for the selected instance that is on the local * system. * @param instanceName name of the instance * @return File for the local file system location of the instance directory * @throws IOException */ File getLocalInstanceDir(String instance) throws IOException { /* * Pass the node directory parent and the node directory name explicitly * or else InstanceDirs will not work as we want if there are multiple * nodes registered on this node. * * If the configuration recorded an explicit directory for the node, * then use it. Otherwise, use the default node directory of * ${installDir}/glassfish/nodes/${nodeName}. */ String nodeDir = node.getNodeDirAbsolute(); final File nodeDirFile = (nodeDir != null ? new File(nodeDir) : defaultLocalNodeDirFile()); InstanceDirs instanceDirs = new InstanceDirs(nodeDirFile.toString(), node.getName(), instance); return instanceDirs.getInstanceDir(); }
nodedir = node.getNodeDirAbsolute(); nodeHost = node.getNodeHost(); } else {
nodedir = node.getNodeDirAbsolute(); nodeHost = node.getNodeHost(); } else {
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; }
nodeDir = theNode.getNodeDirAbsolute(); installDir = theNode.getInstallDir();
nodeDir = theNode.getNodeDirAbsolute(); installDir = theNode.getInstallDir();
nodedir = theNode.getNodeDirAbsolute(); deleteInstanceFilesystem(ctx); report = ctx.getActionReport();
nodedir = theNode.getNodeDirAbsolute(); deleteInstanceFilesystem(context); report = context.getActionReport();