Package org.apache.jackrabbit.oak.jcr

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


        return new RowIteratorAdapter(it);
    }

    @CheckForNull
    NodeImpl getNode(String path) {
        NodeDelegate d = sessionDelegate.getNode(path);
        return d == null ? null : new NodeImpl(d);
    }
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

    }

    @Override
    public Version checkin(String absPath) throws RepositoryException {
        String oakPath = sessionDelegate.getOakPathOrThrowNotFound(absPath);
        NodeDelegate nodeDelegate = sessionDelegate.getNode(oakPath);
        return TODO.dummyImplementation().returnValue(
                new VersionImpl(nodeDelegate));
    }
View Full Code Here

        return new RowIteratorAdapter(rowIterator);
    }

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

        SessionDelegate sessionDelegate = manager.getSessionDelegate();
        String oakPath = sessionDelegate.getOakPathOrThrow(absPath);
        // TODO query nodes should be of type nt:query
        String parent = PathUtils.getParentPath(oakPath);
        String nodeName = PathUtils.getName(oakPath);
        NodeDelegate parentNode = sessionDelegate.getNode(parent);
        ValueFactoryImpl vf = sessionDelegate.getValueFactory();
        if (parentNode == null) {
            throw new PathNotFoundException("The specified path does not exist: " + parent);
        }
        NodeDelegate node = parentNode.addChild(nodeName);
        if (node == null) {
            throw new ItemExistsException("Node already exists: " + absPath);
        }
        node.setProperty("statement", vf.getCoreValue(vf.createValue(statement)));
        node.setProperty("language", vf.getCoreValue(vf.createValue(language)));
        NodeImpl n = new NodeImpl(node);
        n.setPrimaryType(NodeType.NT_QUERY);
        storedQueryPath = oakPath;
        return n;
    }
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

        final SessionDelegate sessionDelegate = versionManagerDelegate.getSessionDelegate();
        return sessionDelegate.perform(new SessionOperation<Boolean>() {
            @Override
            public Boolean perform() throws RepositoryException {
                String oakPath = sessionDelegate.getOakPathOrThrowNotFound(absPath);
                NodeDelegate nodeDelegate = sessionDelegate.getNode(oakPath);
                if (nodeDelegate == null) {
                    throw new PathNotFoundException(absPath);
                }
                return versionManagerDelegate.isCheckedOut(nodeDelegate);
            }
View Full Code Here

        final SessionDelegate sessionDelegate = versionManagerDelegate.getSessionDelegate();
        return sessionDelegate.perform(new SessionOperation<VersionHistory>() {
            @Override
            public VersionHistory perform() throws RepositoryException {
                String oakPath = sessionDelegate.getOakPathOrThrowNotFound(absPath);
                NodeDelegate nodeDelegate = sessionDelegate.getNode(oakPath);
                if (nodeDelegate == null) {
                    throw new PathNotFoundException(absPath);
                }
                return new VersionHistoryImpl(
                        versionManagerDelegate.getVersionHistory(nodeDelegate));
View Full Code Here

        final SessionDelegate sessionDelegate = versionManagerDelegate.getSessionDelegate();
        return sessionDelegate.perform(new SessionOperation<Version>() {
            @Override
            public Version perform() throws RepositoryException {
                String oakPath = sessionDelegate.getOakPathOrThrowNotFound(absPath);
                NodeDelegate nodeDelegate = sessionDelegate.getNode(oakPath);
                if (nodeDelegate == null) {
                    throw new PathNotFoundException(absPath);
                }
                return new VersionImpl(
                        versionManagerDelegate.getBaseVersion(nodeDelegate));
View Full Code Here

        final SessionDelegate sessionDelegate = versionManagerDelegate.getSessionDelegate();
        sessionDelegate.perform(new SessionOperation<Void>() {
            @Override
            public Void perform() throws RepositoryException {
                String oakPath = sessionDelegate.getOakPathOrThrowNotFound(absPath);
                NodeDelegate nodeDelegate = sessionDelegate.getNode(oakPath);
                if (nodeDelegate == null) {
                    throw new PathNotFoundException(absPath);
                }
                if (sessionDelegate.getLockManager().isLocked(absPath)) {
                    throw new LockException("Node at " + absPath + " is locked");
View Full Code Here

TOP

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

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.