Package org.apache.jackrabbit.oak.jcr

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


        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);
                }
                if (sessionDelegate.getLockManager().isLocked(absPath)) {
                    throw new LockException("Node at " + absPath + " is locked");
View Full Code Here


    @Nonnull
    public Iterator<VersionDelegate> getAllVersions()
            throws RepositoryException {
        SortedMap<Calendar, String> versions = new TreeMap<Calendar, String>();
        for (Iterator<NodeDelegate> it = getChildren(); it.hasNext(); ) {
            NodeDelegate n = it.next();
            String primaryType = n.getProperty(JcrConstants.JCR_PRIMARYTYPE).getValue().getString();
            if (primaryType.equals(VersionConstants.NT_VERSION)) {
                PropertyDelegate created = n.getProperty(JcrConstants.JCR_CREATED);
                if (created != null) {
                    versions.put(created.getValue().getDate(), n.getName());
                }
            }
        }
        final Tree thisTree = getTree();
        return Iterators.transform(versions.values().iterator(), new Function<String, VersionDelegate>() {
View Full Code Here

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

    public Node storeAsNode(String absPath) throws RepositoryException {
        manager.ensureIsAlive();
        SessionDelegate sessionDelegate = manager.getSessionDelegate();
        String oakPath = sessionDelegate.getOakPath(absPath);
        String parent = PathUtils.getParentPath(oakPath);
        NodeDelegate parentDelegate = sessionDelegate.getNode(parent);
        if (parentDelegate == null) {
            throw new PathNotFoundException("The specified path does not exist: " + parent);
        }
        Node parentNode = new NodeImpl<NodeDelegate>(parentDelegate);
        if (!parentNode.isCheckedOut()) {
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.