/** * Returns the information recorded about a particular named user. * * @param name Name of the user whose information is desired. * @return The user object. * @exception NoSuchUserException if the user doesn't exist. * @exception BadRealmException if realm data structures are bad. */ public User getUser(String name) throws NoSuchUserException { FileRealmUser u = (FileRealmUser)userTable.get(name); if (u == null) { String msg = sm.getString("filerealm.nouser", name); throw new NoSuchUserException(msg); } return u; }
"list.file.group.realmcorrupted", "Configured file realm {0} is corrupted.", authRealmName) + " " + e.getLocalizedMessage()); report.setActionExitCode(ActionReport.ExitCode.FAILURE); report.setFailureCause(e); "list.file.group.usernotfound", "Specified file user {0} not found.", fileUserName) + " " + e.getLocalizedMessage()); report.setActionExitCode(ActionReport.ExitCode.FAILURE); report.setFailureCause(e);
_logger.log(Level.WARNING, SecurityLoggerInfo.invalidOperationForRealmError, new Object[] { username, realmName, ex.toString()}); } catch (NoSuchUserException ex){ _logger.log(Level.WARNING, SecurityLoggerInfo.noSuchUserInRealmError, new Object[] { username, realmName, ex.toString()}); } catch (NoSuchRealmException ex) { LoginException lex = new LoginException(ex.toString());
localStrings.getLocalString("delete.file.user.usernotfound", "There is no such existing user {0} in the file realm {1}.", userName, authRealmName) + " " + e.getLocalizedMessage()); report.setActionExitCode(ActionReport.ExitCode.FAILURE); report.setFailureCause(e);
_logger.warning("Realm " + realmName + ": " + ex.toString()); } catch (NoSuchUserException ex){ _logger.warning("Realm " + realmName + ": " + ex.toString()); } catch (NoSuchRealmException ex) { LoginException lex = new LoginException(ex.toString());
/** * Returns the information recorded about a particular named user. * * @param name Name of the user whose information is desired. * @return The user object. * @exception NoSuchUserException if the user doesn't exist. * @exception BadRealmException if realm data structures are bad. */ public User getUser(String name) throws NoSuchUserException { FileRealmUser u = (FileRealmUser)userTable.get(name); if (u == null) { String msg = sm.getString("filerealm.nouser", name); throw new NoSuchUserException(msg); } return u; }
localStrings.getLocalString("delete.file.user.usernotfound", "There is no such existing user {0} in the file realm {1}.", userName, authRealmName) + " " + e.getLocalizedMessage()); report.setActionExitCode(ActionReport.ExitCode.FAILURE); report.setFailureCause(e);
/** * Remove user from file realm. User must exist. * * @param name User name. * @throws NoSuchUserException If user does not exist. * */ public synchronized void removeUser(String name) throws NoSuchUserException, BadRealmException { if (!userTable.containsKey(name)) { String msg = sm.getString("filerealm.nouser", name); throw new NoSuchUserException(msg); } FileRealmUser oldUser = (FileRealmUser)userTable.get(name); userTable.remove(name); reduceGroups(oldUser.getGroups()); }
"list.file.group.usernotfound", "Specified file user {0} not found.", fileUserName) + " " + e.getLocalizedMessage()); report.setActionExitCode(ActionReport.ExitCode.FAILURE); report.setFailureCause(e);
/** * Remove user from file realm. User must exist. * * @param name User name. * @throws NoSuchUserException If user does not exist. * */ public synchronized void removeUser(String name) throws NoSuchUserException, BadRealmException { if (!userTable.containsKey(name)) { String msg = sm.getString("filerealm.nouser", name); throw new NoSuchUserException(msg); } FileRealmUser oldUser = (FileRealmUser)userTable.get(name); userTable.remove(name); reduceGroups(oldUser.getGroups()); }
"list.file.group.realmcorrupted", "Configured file realm {0} is corrupted.", authRealmName) + " " + e.getLocalizedMessage()); report.setActionExitCode(ActionReport.ExitCode.FAILURE); report.setFailureCause(e); "list.file.group.usernotfound", "Specified file user {0} not found.", fileUserName) + " " + e.getLocalizedMessage()); report.setActionExitCode(ActionReport.ExitCode.FAILURE); report.setFailureCause(e);
/** * Returns the name of all the groups that this user belongs to. * @param username Name of the user in this realm whose group listing * is needed. * @return Enumeration of group names (strings). * @exception InvalidOperationException thrown if the realm does not * support this operation - e.g. Certificate realm does not support * this operation. */ public Enumeration getGroupNames(String username) throws NoSuchUserException { FileRealmUser ud = (FileRealmUser)userTable.get(username); if (ud == null) { String msg = sm.getString("filerealm.nouser", username); throw new NoSuchUserException(msg); } String[] groups = ud.getGroups(); groups = addAssignGroups(groups); Vector v = new Vector(); if (groups != null) { for (int i = 0; i < groups.length; i++) { v.add(groups[i]); } } return v.elements(); }
localStrings.getLocalString("delete.file.user.usernotfound", "There is no such existing user {0} in the file realm {1}.", userName, authRealmName) + " " + e.getLocalizedMessage()); report.setActionExitCode(ActionReport.ExitCode.FAILURE); report.setFailureCause(e);
/** * Returns the name of all the groups that this user belongs to. * @param username Name of the user in this realm whose group listing * is needed. * @return Enumeration of group names (strings). * @exception InvalidOperationException thrown if the realm does not * support this operation - e.g. Certificate realm does not support * this operation. */ public Enumeration getGroupNames(String username) throws NoSuchUserException { FileRealmUser ud = (FileRealmUser)userTable.get(username); if (ud == null) { String msg = sm.getString("filerealm.nouser", username); throw new NoSuchUserException(msg); } String[] groups = ud.getGroups(); groups = addAssignGroups(groups); Vector v = new Vector(); if (groups != null) { for (int i = 0; i < groups.length; i++) { v.add(groups[i]); } } return v.elements(); }
/** * Returns the information recorded about a particular named user. * * @param name Name of the user whose information is desired. * @return The user object. * @exception NoSuchUserException if the user doesn't exist. * @exception BadRealmException if realm data structures are bad. */ @Override public User getUser(String name) throws NoSuchUserException { FileRealmHelper.User u = helper.getUser(name); if (u == null) { String msg = sm.getString("filerealm.nouser", name); throw new NoSuchUserException(msg); } return new FileRealmUser(u, null); }
if (!userTable.containsKey(name)) { String msg = sm.getString("filerealm.nouser", name); throw new NoSuchUserException(msg);
if (!userTable.containsKey(name)) { String msg = sm.getString("filerealm.nouser", name); throw new NoSuchUserException(msg);