Package org.exist.xmldb

Examples of org.exist.xmldb.UserManagementService.updateAccount()


                            break;
                        }
                        System.out.println(EOL + "entered passwords differ. Try again...");
                    }
                    user.setPassword(p1);
                    mgtService.updateAccount(user);
                    properties.setProperty("password", p1);
                } catch (final Exception e) {
                    System.err.println("ERROR: " + e.getMessage());
                }
            } else if (args[0].equalsIgnoreCase("chmod")) {
View Full Code Here


        final Account dba  = mgmt.getAccount(SecurityManager.DBA_USER);
        if (dba == null) {
            throw new XMLDBException(ErrorCodes.PERMISSION_DENIED, "'"+SecurityManager.DBA_USER+"' account can't be found.");
        }
        dba.setPassword(adminPassword);
        mgmt.updateAccount(dba);

        return adminPassword;
    }
}
View Full Code Here

            ums.addAccount(user);
            ums.getAccount(userName);
            user.addGroup(group2);

            ums.updateAccount(user);

            /*** RESTART THE SERVER ***/
            stopServer();
            startServer();
            /**************************/
 
View Full Code Here

                final UserManagementService service =
                        (UserManagementService) root.getService("UserManagementService", "1.0");
                final Account admin = service.getAccount("admin");
                admin.setPassword(adminPass);
                System.out.println("Setting admin user password...");
                service.updateAccount(admin);
                root = DatabaseManager.getCollection(URI, "admin", adminPass);
            }
            final XQueryService query = (XQueryService) root.getService("XQueryService", "1.0");
            return query;
        } catch (final Exception e) {
View Full Code Here

                }
      } else {
                user.setGroups(oldUser.getGroups());
            }

      ums.updateAccount(user);
  } catch(final XMLDBException xe) {
      logger.error("Failed to update user " + userName, xe);
      throw new XPathException(this, "Failed to update user " + userName, xe);
        } finally {
            if (null != collection) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.