Package org.apache.jackrabbit.oak.jcr

Examples of org.apache.jackrabbit.oak.jcr.NodeImpl


        return privileges.values().toArray(new Privilege[privileges.size()]);
    }

    @Override
    public Privilege getPrivilege(String privilegeName) throws RepositoryException {
        NodeImpl privilegeRoot = getPrivilegeRoot();
        if (privilegeRoot.hasNode(privilegeName)) {
            return getPrivilege(privilegeRoot.getNode(privilegeName), new HashMap<String, Privilege>(1));
        } else {
            throw new AccessControlException("No such privilege " + privilegeName);
        }
    }
View Full Code Here


     */
    @Override
    public Authorizable getAuthorizable(String id) throws RepositoryException {
        Authorizable authorizable = null;
        try {
            NodeImpl node = (NodeImpl) sessionContext.getSession().getNodeByIdentifier(buildIdentifier(id));
            authorizable = getAuthorizable(node);
        } catch (ItemNotFoundException e) {
            log.debug("No authorizable with ID " + id);
        }
        return authorizable;
View Full Code Here

        Session session = sessionContext.getSession();
        Authorizable authorizable = null;
        if (principal instanceof ItemBasedPrincipal) {
            String authPath = ((ItemBasedPrincipal) principal).getPath();
            if (session.nodeExists(authPath)) {
                NodeImpl n = (NodeImpl) session.getNode(authPath);
                authorizable = getAuthorizable(n);
            }
        } else {
            // another Principal implementation.
            String name = principal.getName();
View Full Code Here

    @Override
    public User createUser(String userID, String password, Principal principal, String intermediatePath) throws RepositoryException {
        checkValidID(userID);

        NodeImpl userNode = nodeCreator.createUserNode(userID, intermediatePath);
        setPrincipal(userNode, principal);
        setPassword(userNode, password, true);

        User user = new UserImpl(userNode, this);
        onCreate(user, password);

        log.debug("User created: " + userID + "; " + userNode.getPath());
        return user;
    }
View Full Code Here

    @Override
    public Group createGroup(String groupID, Principal principal, String intermediatePath) throws RepositoryException {
        checkValidID(groupID);

        NodeImpl groupNode = nodeCreator.createGroupNode(groupID, intermediatePath);
        setPrincipal(groupNode, principal);

        Group group = new GroupImpl(groupNode, this);
        onCreate(group);

        log.debug("Group created: " + groupID + "; " + groupNode.getPath());
        return group;
    }
View Full Code Here

    }

    @CheckForNull
    NodeImpl getNode(String path) {
        NodeDelegate d = sessionDelegate.getNode(path);
        return d == null ? null : new NodeImpl(d);
    }
View Full Code Here

            @Override
            public NodeImpl next() {
                if (current == null) {
                    throw new NoSuchElementException();
                }
                NodeImpl n = current;
                fetch();
                return n;
            }

            @Override
View Full Code Here

    }

    private Node getNodeTypes(Root root) throws RepositoryException {
        Tree types = root.getTree(PATH);
        if (types != null) {
            return new NodeImpl(new NodeDelegate(sd, types));
        } else {
            throw new RepositoryException("Node type registry not found");
        }
    }
View Full Code Here

    }

    @CheckForNull
    NodeImpl getNode(String path) {
        NodeDelegate d = sessionDelegate.getNode(path);
        return d == null ? null : new NodeImpl(d);
    }
View Full Code Here

            @Override
            public NodeImpl next() {
                if (current == null) {
                    throw new NoSuchElementException();
                }
                NodeImpl n = current;
                fetch();
                return n;
            }

            @Override
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.jcr.NodeImpl

Copyright © 2018 www.massapicom. 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.