@Test public void testUser() throws Exception { User u = autosaveMgr.createUser("u", "u"); u.disable("disabled"); assertTrue(u.isDisabled()); assertFalse(root.hasPendingChanges()); u.disable(null); assertFalse(u.isDisabled()); assertFalse(root.hasPendingChanges()); u.changePassword("t"); assertFalse(root.hasPendingChanges()); u.changePassword("tt", "t"); assertFalse(root.hasPendingChanges()); }
@NotNull @Override public User createUser(@NotNull String userID, @Nullable String password) throws RepositoryException { try { return wrap(dlg.createUser(userID, password)); } finally { autosave(); } }
AutoSaveEnabledManager implements UserManager { @NotNull @Override public User createUser(@NotNull String userID, @Nullable String password) throws RepositoryException { try { return wrap(dlg.createUser(userID, password)); } finally { autosave(); } } }
AutoSaveEnabledManager implements UserManager { @NotNull @Override public User createUser(@NotNull String userID, @Nullable String password) throws RepositoryException { try { return wrap(dlg.createUser(userID, password)); } finally { autosave(); } } AutoSaveEnabledManager(UserManager dlg, Root root); }
AutoSaveEnabledManager implements UserManager { @NotNull @Override public User createUser(@NotNull String userID, @Nullable String password) throws RepositoryException { try { return wrap(dlg.createUser(userID, password)); } finally { autosave(); } } AutoSaveEnabledManager(UserManager dlg, Root root); @Nullable @Override Authorizable getAuthorizable(@NotNull String id); @Nullable @Override T getAuthorizable(@NotNull String id, @NotNull Class<T> authorizableClass); @Nullable @Override Authorizable getAuthorizable(@NotNull Principal principal); @Nullable @Override Authorizable getAuthorizableByPath(@NotNull String path); @NotNull @Override Iterator<Authorizable> findAuthorizables(@NotNull String relPath, @Nullable String value); @NotNull @Override Iterator<Authorizable> findAuthorizables(@NotNull String relPath, @Nullable String value, int searchType); @NotNull @Override Iterator<Authorizable> findAuthorizables(@NotNull Query query); @NotNull @Override User createUser(@NotNull String userID, @Nullable String password); @NotNull @Override User createUser(@NotNull String userID, @Nullable String password, @NotNull Principal principal, @Nullable String intermediatePath); @NotNull @Override User createSystemUser(@NotNull String userID, @Nullable String intermediatePath); @NotNull @Override Group createGroup(@NotNull String groupId); @NotNull @Override Group createGroup(@NotNull Principal principal); @NotNull @Override Group createGroup(@NotNull Principal principal, @Nullable String intermediatePath); @NotNull @Override Group createGroup(@NotNull String groupID, @NotNull Principal principal, @Nullable String intermediatePath); @Override boolean isAutoSave(); @Override void autoSave(boolean enable); }
AutoSaveEnabledManager implements UserManager { @NotNull @Override public User createUser(@NotNull String userID, @Nullable String password) throws RepositoryException { try { return wrap(dlg.createUser(userID, password)); } finally { autosave(); } } AutoSaveEnabledManager(UserManager dlg, Root root); @Nullable @Override Authorizable getAuthorizable(@NotNull String id); @Nullable @Override T getAuthorizable(@NotNull String id, @NotNull Class<T> authorizableClass); @Nullable @Override Authorizable getAuthorizable(@NotNull Principal principal); @Nullable @Override Authorizable getAuthorizableByPath(@NotNull String path); @NotNull @Override Iterator<Authorizable> findAuthorizables(@NotNull String relPath, @Nullable String value); @NotNull @Override Iterator<Authorizable> findAuthorizables(@NotNull String relPath, @Nullable String value, int searchType); @NotNull @Override Iterator<Authorizable> findAuthorizables(@NotNull Query query); @NotNull @Override User createUser(@NotNull String userID, @Nullable String password); @NotNull @Override User createUser(@NotNull String userID, @Nullable String password, @NotNull Principal principal, @Nullable String intermediatePath); @NotNull @Override User createSystemUser(@NotNull String userID, @Nullable String intermediatePath); @NotNull @Override Group createGroup(@NotNull String groupId); @NotNull @Override Group createGroup(@NotNull Principal principal); @NotNull @Override Group createGroup(@NotNull Principal principal, @Nullable String intermediatePath); @NotNull @Override Group createGroup(@NotNull String groupID, @NotNull Principal principal, @Nullable String intermediatePath); @Override boolean isAutoSave(); @Override void autoSave(boolean enable);  }