Role role = Database.queryUnique(Role.class, new Predicate<Role>() {
public boolean test(Role role) {
return role.getName().equals(I18N.get("Administrator"));
}
});
final User administrator = new User();
administrator.setRole(role);
administrator.setRoots(new Folder[] { (Folder) Nodes.getRoot() });
final Window window = new Window(I18N.get("Setup_Administrator"));
window.setClosable(false);
window.setParent(getRoot());