Examples of PathFactory


Examples of org.jboss.dna.graph.property.PathFactory

    public PathNode createNode( ExecutionContext context,
                                String pathToNewNode,
                                Map<Name, Property> properties,
                                NodeConflictBehavior conflictBehavior ) {
        PathFactory pathFactory = context.getValueFactories().getPathFactory();
        Path newPath = pathFactory.create(pathToNewNode);

        return createNode(context, getNode(newPath.getParent()), newPath.getLastSegment().getName(), properties, conflictBehavior);
    }
View Full Code Here

Examples of org.jboss.dna.graph.property.PathFactory

        String sourcePathStr = matcher.group(2);
        if (reposPathStr == null || sourcePathStr == null) return null;
        reposPathStr = reposPathStr.trim();
        sourcePathStr = sourcePathStr.trim();
        if (reposPathStr.length() == 0 || sourcePathStr.length() == 0) return null;
        PathFactory pathFactory = context.getValueFactories().getPathFactory();
        Path repositoryPath = pathFactory.create(reposPathStr);
        Path sourcePath = pathFactory.create(sourcePathStr);

        // Grab the exceptions ...
        List<Path> exceptions = new LinkedList<Path>();
        while (matcher.find()) {
            String exceptionStr = matcher.group(1);
            Path exception = pathFactory.create(exceptionStr);
            exceptions.add(exception);
        }
        return new PathRule(repositoryPath, sourcePath, exceptions);
    }
View Full Code Here

Examples of org.modeshape.jcr.value.PathFactory

                         boolean removeExisting )
        throws PathNotFoundException, ItemExistsException, VersionException, ConstraintViolationException,
        UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException {
        checkNotProtected();

        PathFactory pathFactory = session.pathFactory();
        Path relPathAsPath = pathFactory.create(relPath);
        if (relPathAsPath.isAbsolute()) throw new RepositoryException(JcrI18n.invalidRelativePath.text(relPath));
        Path actualPath = pathFactory.create(path(), relPathAsPath).getCanonicalPath();

        versionManager().restoreAtAbsPath(session.stringFactory().create(actualPath), version, removeExisting, false);
    }
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.