Package org.apache.jackrabbit.oak.jcr.state

Examples of org.apache.jackrabbit.oak.jcr.state.TransientNodeState


    static boolean exist(SessionContext<SessionImpl> sessionContext, Path path) {
        return getNodeState(sessionContext, path) != null;
    }

    static Node create(SessionContext<SessionImpl> sessionContext, Path path) throws PathNotFoundException {
        TransientNodeState state = getNodeState(sessionContext, path);
        if (state == null) {
            throw new PathNotFoundException(path.toJcrPath());
        }

        return new NodeImpl(sessionContext, state);
View Full Code Here


     */
    @Override
    public Node addNode(String relPath) throws RepositoryException {
        checkStatus();
        Path newPath = path().concat(relPath);
        TransientNodeState parentState = getNodeState(sessionContext, newPath.getParent());
        TransientNodeState childState = parentState.addNode(newPath.getName());
        return create(sessionContext, childState);
    }
View Full Code Here

    @Override
    public void move(String srcAbsPath, String destAbsPath) throws RepositoryException {
        checkIsAlive();
        Path sourcePath = Path.create(sessionContext.getWorkspaceName(), srcAbsPath);
        TransientNodeState sourceParent = nodeStateProvider.getNodeState(sourcePath.getParent());
        if (sourceParent == null) {
            throw new PathNotFoundException(srcAbsPath);
        }

        sourceParent.move(sourcePath.getName(), Path.create(sessionContext.getWorkspaceName(), destAbsPath));
    }
View Full Code Here

    private final PropertyState state;

    static Property create(SessionContext<SessionImpl> sessionContext, Path path) throws PathNotFoundException,
            ItemNotFoundException {

        TransientNodeState parentState = getNodeState(sessionContext, path.getParent());
        if (parentState == null) {
            throw new PathNotFoundException(path.toJcrPath());
        }

        String name = path.getName();
        PropertyState state = parentState.getPropertyState(name);
        return new PropertyImpl(sessionContext, parentState, state);
    }
View Full Code Here

    static Property create(SessionContext<SessionImpl> sessionContext, TransientNodeState parentState, PropertyState state) {
        return new PropertyImpl(sessionContext, parentState, state);
    }

    public static boolean exist(SessionContext<SessionImpl> sessionContext, Path path) {
        TransientNodeState parentState = getNodeState(sessionContext, path.getParent());
        return parentState != null && parentState.hasProperty(path.getName());
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.jcr.state.TransientNodeState

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.