/** * Returns just the shell command to be used to fetch a user's groups list. * This is mainly separate to make some tests easier. * @param userName The username that needs to be passed into the command built * @return An appropriate shell command with arguments */ protected String[] getGroupsForUserCommand(String userName) { return Shell.getGroupsForUserCommand(userName); }
/** * Create a ShellCommandExecutor object using the user's name. * * @param userName user's name * @return a ShellCommandExecutor object */ protected ShellCommandExecutor createGroupExecutor(String userName) { return new ShellCommandExecutor( Shell.getGroupsForUserCommand(userName), null, null, 0L); }
String result = ""; try { result = Shell.execCommand(Shell.getGroupsForUserCommand(user)); } catch (ExitCodeException e) {
String result = ""; try { result = Shell.execCommand(Shell.getGroupsForUserCommand(user)); } catch (ExitCodeException e) {
String result = ""; try { result = Shell.execCommand(Shell.getGroupsForUserCommand(user)); } catch (ExitCodeException e) {