private AppserverServiceType getType() { if (selector.isInstance()) return AppserverServiceType.Instance; else return AppserverServiceType.Domain; } }
/** * Creates a selector for choosing the correct set of directories. * @param domainDirParent parent of the domain directory file(s) * @param serverName name of the requested instance or domain * @param nodeDir path to the node directory * @param node name of the node * @return * @throws CommandException * @throws IOException */ public static ServerDirsSelector getInstance( final File domainDirParent, final String serverName, final String nodeDir, final String node) throws CommandException, IOException { final ServerDirsSelector helper = new ServerDirsSelector( domainDirParent, serverName, nodeDir, node); helper.validateDomainOrInstance(); return helper; }
public ServerDirs dirs() { return selectDirs(); }
/** */ @Override protected void validate() throws CommandException { try { super.validate(); // pointless empty method but who knows what the future holds? // The order that you make these calls matters!! selector = ServerDirsSelector.getInstance( userSpecifiedDomainDirParent, userSpecifiedServerName, userSpecifiedNodeDir, userSpecifiedNode); dirs = selector.dirs(); validateServiceName(); } catch (CommandException e) { throw e; } catch (Exception e) { // plenty of RuntimeException possibilities! throw new CommandException(e.getMessage(), e); } }
/** */ @Override protected void validate() throws CommandException { try { super.validate(); // pointless empty method but who knows what the future holds? // The order that you make these calls matters!! selector = ServerDirsSelector.getInstance( userSpecifiedDomainDirParent, userSpecifiedServerName, userSpecifiedNodeDir, userSpecifiedNode); dirs = selector.dirs(); validateServiceName(); } catch (CommandException e) { throw e; } catch (Exception e) { // plenty of RuntimeException possibilities! throw new CommandException(e.getMessage(), e); } }
? nodeDir : nodeDirRoot.getAbsolutePath()); selector = ServerDirsSelector.getInstance(null, serverName, nodeDirToUse, node); } catch (Exception ex) { throw new RuntimeException(ex); final ServerDirs dirs = selector.dirs(); if (dirs == null) { return null;
private AppserverServiceType getType() { if (selector.isInstance()) return AppserverServiceType.Instance; else return AppserverServiceType.Domain; } }
/** * Creates a selector for choosing the correct set of directories. * @param domainDirParent parent of the domain directory file(s) * @param serverName name of the requested instance or domain * @param nodeDir path to the node directory * @param node name of the node * @return * @throws CommandException * @throws IOException */ public static ServerDirsSelector getInstance( final File domainDirParent, final String serverName, final String nodeDir, final String node) throws CommandException, IOException { final ServerDirsSelector helper = new ServerDirsSelector( domainDirParent, serverName, nodeDir, node); helper.validateDomainOrInstance(); return helper; }
public ServerDirs dirs() { return selectDirs(); }
? nodeDir : nodeDirRoot.getAbsolutePath()); selector = ServerDirsSelector.getInstance(null, serverName, nodeDirToUse, node); } catch (Exception ex) { throw new RuntimeException(ex); final ServerDirs dirs = selector.dirs(); if (dirs == null) { return null;
private AppserverServiceType getType() { if (selector.isInstance()) return AppserverServiceType.Instance; else return AppserverServiceType.Domain; } }
/** */ @Override protected void validate() throws CommandException { try { super.validate(); // pointless empty method but who knows what the future holds? if (ok(serviceUser) && !OS.isLinux()) { // serviceUser is only supported on Linux throw new CommandException(strings.get("serviceUser_wrong_os")); } // The order that you make these calls matters!! selector = ServerDirsSelector.getInstance( userSpecifiedDomainDirParent, userSpecifiedServerName, userSpecifiedNodeDir, userSpecifiedNode); dirs = selector.dirs(); validateServiceName(); validateAsadmin(); } catch (CommandException e) { throw e; } catch (Exception e) { // plenty of RuntimeException possibilities! throw new CommandException(e.getMessage(), e); } }
private AppserverServiceType getType() { if (selector.isInstance()) return AppserverServiceType.Instance; else return AppserverServiceType.Domain; } }
/** */ @Override protected void validate() throws CommandException { try { super.validate(); // pointless empty method but who knows what the future holds? if (ok(serviceUser) && !OS.isLinux()) { // serviceUser is only supported on Linux throw new CommandException(strings.get("serviceUser_wrong_os")); } // The order that you make these calls matters!! selector = ServerDirsSelector.getInstance( userSpecifiedDomainDirParent, userSpecifiedServerName, userSpecifiedNodeDir, userSpecifiedNode); dirs = selector.dirs(); validateServiceName(); validateAsadmin(); } catch (CommandException e) { throw e; } catch (Exception e) { // plenty of RuntimeException possibilities! throw new CommandException(e.getMessage(), e); } }
private ServerDirs selectDirs() { if (isInstance()) return instanceDirs.getServerDirs(); else return domainDirs.getServerDirs(); } }
private ServerDirs selectDirs() { if (isInstance()) return instanceDirs.getServerDirs(); else return domainDirs.getServerDirs(); } }