Collection root = DatabaseManager.getCollection(uri + "/db", username, pass); UserManagementService service = (UserManagementService) root.getService("UserManagementService", "1.0"); User admin = service.getUser(SecurityManager.DBA_USER); admin.setPasswordDigest(adminPass); service.updateUser(admin);
	public void restore(boolean showGUI, JFrame parent)		throws XMLDBException, FileNotFoundException, IOException, SAXException {		if (showGUI) {			dialog = new RestoreDialog(parent, "Restoring data ...", false);			dialog.setVisible(true);			Thread restoreThread = new Thread() {				public void run() {					while (!stack.isEmpty()) {						try {							contents = (File) stack.pop();							reader.parse(new InputSource(new FileInputStream(contents)));						} catch (FileNotFoundException e) {							dialog.displayMessage(e.getMessage());						} catch (IOException e) {							dialog.displayMessage(e.getMessage());						} catch (SAXException e) {							dialog.displayMessage(e.getMessage());						}					}					dialog.setVisible(false);				}			};			restoreThread.start();			if(parent == null) {				while (restoreThread.isAlive()) {					synchronized (this) {						try {							wait(20);						} catch (InterruptedException e) {						}					}				}			}		} else {			while(!stack.isEmpty()) {				contents = (File) stack.pop();				String sysId = contents.toURI().toASCIIString();				InputSource is = new InputSource(sysId);				is.setEncoding("UTF-8");				System.out.println("restoring " + sysId);				reader.parse(is);			}		}	}