@Test public void testCollisions() throws Exception { ConfigurationParameters config = ConfigurationParameters.of(UserConstants.PARAM_AUTHORIZABLE_NODE_NAME, (AuthorizableNodeName) authorizableId -> "aaa"); UserProvider up = new UserProvider(root, config); try { Tree u1 = up.createUser("a", null); assertEquals("aaa", u1.getName()); Tree u2 = up.createUser("b", null); assertEquals("aaa1", u2.getName()); Tree u3 = up.createUser("c", null); assertEquals("aaa2", u3.getName()); Tree u4 = up.createUser("d", null); assertEquals("aaa3", u4.getName()); } finally { root.refresh(); } }
@NotNull Tree createUser(@NotNull String userID, @Nullable String intermediateJcrPath) throws RepositoryException { return createAuthorizableNode(userID, NT_REP_USER, intermediateJcrPath); }
UserProvider extends AuthorizableBaseProvider { @NotNull Tree createUser(@NotNull String userID, @Nullable String intermediateJcrPath) throws RepositoryException { return createAuthorizableNode(userID, NT_REP_USER, intermediateJcrPath); } }
UserProvider extends AuthorizableBaseProvider { @NotNull Tree createUser(@NotNull String userID, @Nullable String intermediateJcrPath) throws RepositoryException { return createAuthorizableNode(userID, NT_REP_USER, intermediateJcrPath); } UserProvider(@NotNull Root root, @NotNull ConfigurationParameters config); }
UserProvider extends AuthorizableBaseProvider { @NotNull Tree createUser(@NotNull String userID, @Nullable String intermediateJcrPath) throws RepositoryException { return createAuthorizableNode(userID, NT_REP_USER, intermediateJcrPath); } UserProvider(@NotNull Root root, @NotNull ConfigurationParameters config);  }
UserProvider extends AuthorizableBaseProvider { @NotNull Tree createUser(@NotNull String userID, @Nullable String intermediateJcrPath) throws RepositoryException { return createAuthorizableNode(userID, NT_REP_USER, intermediateJcrPath); } UserProvider(@NotNull Root root, @NotNull ConfigurationParameters config);   }