Examples of TreeBasedPrincipal


Examples of org.apache.jackrabbit.oak.spi.security.principal.TreeBasedPrincipal

     * @see org.apache.jackrabbit.api.security.user.Authorizable#getPrincipal()
     */
    @Override
    public Principal getPrincipal() throws RepositoryException {
        String principalName = getPrincipalName();
        return new TreeBasedPrincipal(principalName, getTree(), getUserManager().getNamePathMapper());

    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.principal.TreeBasedPrincipal

                return principalName;
            }
        });

        if (tree != null) {
            return (isGroup(tree)) ? new TreeBasedGroup(tree) : new TreeBasedPrincipal(tree, pathMapper);
        } else {
            return null;
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.principal.TreeBasedPrincipal

    public Set<? extends Principal> getPrincipals(String userID) {
        Set<Principal> principals;
        Tree userTree = userProvider.getAuthorizable(userID, Type.USER);
        if (userTree != null) {
            principals = new HashSet<Principal>();
            Principal userPrincipal = new TreeBasedPrincipal(userTree, pathMapper);
            principals.add(userPrincipal);
            principals.addAll(getGroupMembership(userPrincipal));
            if (userProvider.isAdminUser(userTree)) {
                principals.add(AdminPrincipal.INSTANCE);
            }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.principal.TreeBasedPrincipal

                throw new IllegalArgumentException("null tree.");
            }
            if (userProvider.isAuthorizableType(tree, Type.GROUP)) {
                return new TreeBasedGroup(tree);
            } else {
                return new TreeBasedPrincipal(tree, pathMapper);
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.principal.TreeBasedPrincipal

                    Tree tree = userProvider.getAuthorizableByPath(oakPath);
                    if (tree != null) {
                        if (isGroup(tree)) {
                            return new TreeBasedGroup(tree);
                        } else {
                            return new TreeBasedPrincipal(tree, pathMapper);
                        }
                    }
                    return null;
                }
            });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.