@Test(expected = RepositoryException.class) public void testAuthorizableByUnresolvablePath() throws Exception { NamePathMapper mapper = new NamePathMapperImpl(new LocalNameMapper(root, ImmutableMap.of("a","internal"))); UserManagerImpl um = new UserManagerImpl(root, new PartialValueFactory(mapper), getSecurityProvider()); um.getAuthorizableByPath(getTestUser().getPath()); }
@Nullable @Override public Authorizable getAuthorizableByPath(@NotNull String path) throws RepositoryException { String oakPath = namePathMapper.getOakPath(path); if (oakPath == null) { throw new RepositoryException("Invalid path " + path); } return getAuthorizableByOakPath(oakPath); }
UserManagerImpl implements UserManager { @Nullable @Override public Authorizable getAuthorizableByPath(@NotNull String path) throws RepositoryException { String oakPath = namePathMapper.getOakPath(path); if (oakPath == null) { throw new RepositoryException("Invalid path " + path); } return getAuthorizableByOakPath(oakPath); } }
UserManagerImpl implements UserManager { @Nullable @Override public Authorizable getAuthorizableByPath(@NotNull String path) throws RepositoryException { String oakPath = namePathMapper.getOakPath(path); if (oakPath == null) { throw new RepositoryException("Invalid path " + path); } return getAuthorizableByOakPath(oakPath); } UserManagerImpl(@NotNull Root root,
                           @NotNull PartialValueFactory valueFactory,
                           @NotNull SecurityProvider securityProvider); }
UserManagerImpl implements UserManager { @Nullable @Override public Authorizable getAuthorizableByPath(@NotNull String path) throws RepositoryException { String oakPath = namePathMapper.getOakPath(path); if (oakPath == null) { throw new RepositoryException("Invalid path " + path); } return getAuthorizableByOakPath(oakPath); } UserManagerImpl(@NotNull Root root,
                           @NotNull PartialValueFactory valueFactory,
                           @NotNull SecurityProvider securityProvider); @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 final 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); @Nullable Authorizable getAuthorizable(@Nullable Tree tree); }
UserManagerImpl implements UserManager { @Nullable @Override public Authorizable getAuthorizableByPath(@NotNull String path) throws RepositoryException { String oakPath = namePathMapper.getOakPath(path); if (oakPath == null) { throw new RepositoryException("Invalid path " + path); } return getAuthorizableByOakPath(oakPath); } UserManagerImpl(@NotNull Root root,
                           @NotNull PartialValueFactory valueFactory,
                           @NotNull SecurityProvider securityProvider); @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 final 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); @Nullable Authorizable getAuthorizable(@Nullable Tree tree);  }