Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.NodeId


                l = new ArrayList<NodeId>(predecessorIds.length);
                l.addAll(Arrays.asList(predecessorIds));
                Property predecessors = node.getProperty(resolver.getJCRName(NameConstants.JCR_PREDECESSORS));
                for (Value value : predecessors.getValues()) {
                    NodeId vId = idFactory.createNodeId(value.getString());
                    l.remove(vId);
                }
                cancel = l.isEmpty();
                if (cancel) {
                    node.cancelMerge(version);
View Full Code Here


    NodeId buildNodeId(NodeId parentId, MultiStatusResponse response,
                       String workspaceName, NamePathResolver resolver) throws RepositoryException {
        IdURICache cache = getCache(workspaceName);
       
        NodeId nodeId;
        DavPropertySet propSet = response.getProperties(DavServletResponse.SC_OK);

        String uniqueID = service.getUniqueID(propSet);
        if (uniqueID != null) {
            nodeId = service.getIdFactory().createNodeId(uniqueID);
View Full Code Here

                return (NodeId) id;
            }
        }

        // retrieve parentId from cache or by recursive calls
        NodeId parentId;
        if (isSameURI(uri, getRootItemUri(sessionInfo.getWorkspaceName()))) {
            parentId = null;
        } else {
            String parentUri = Text.getRelativeParent(uri, 1, true);
            parentId = getNodeId(parentUri, sessionInfo);
View Full Code Here

        // separate parent uri and property JCRName
        String parentUri = Text.getRelativeParent(uri, 1, true);
        // make sure propName is unescaped
        String propName = Text.unescape(Text.getName(uri, true));
        // retrieve parent node id
        NodeId parentId = getNodeId(parentUri, sessionInfo);
        // build property id
        try {
            Name name = service.getNamePathResolver(sessionInfo).getQName(propName);
            PropertyId propertyId = service.getIdFactory().createPropertyId(parentId, name);
            cache.add(uri, propertyId);
View Full Code Here

        /**
         * @see IdentifierResolver#getPath(String)
         */
        public Path getPath(String identifier) throws MalformedPathException {
            try {
                NodeId id = getIdFactory().fromJcrIdentifier(identifier);
                return getHierarchyManager().getNodeEntry(id).getPath();
            } catch (RepositoryException e) {
                throw new MalformedPathException("Invalid identifier '" + identifier + "'.");
            }
        }
View Full Code Here

        /**
         * @see IdentifierResolver#checkFormat(String)
         */
        public void checkFormat(String identifier) throws MalformedPathException {
            try {
                NodeId id = getIdFactory().fromJcrIdentifier(identifier);
            } catch (Exception e) {
                throw new MalformedPathException("Invalid identifier '" + identifier + "'.");
            }
        }
View Full Code Here

        /**
         * @inheritDoc
         * @see OperationVisitor#visit(AddNode)
         */
        public void visit(AddNode operation) throws RepositoryException {
            NodeId parentId = operation.getParentId();
            batch.addNode(parentId, operation.getNodeName(), operation.getNodeTypeName(), operation.getUuid());
        }
View Full Code Here

        /**
         * @inheritDoc
         * @see OperationVisitor#visit(AddProperty)
         */
        public void visit(AddProperty operation) throws RepositoryException {
            NodeId parentId = operation.getParentId();
            Name propertyName = operation.getPropertyName();
            if (operation.isMultiValued()) {
                batch.addProperty(parentId, propertyName, operation.getValues());
            } else {
                QValue value = operation.getValues()[0];
View Full Code Here

        /**
         * @inheritDoc
         * @see OperationVisitor#visit(Clone)
         */
        public void visit(Clone operation) throws NoSuchWorkspaceException, LockException, ConstraintViolationException, AccessDeniedException, ItemExistsException, UnsupportedRepositoryOperationException, VersionException, RepositoryException {
            NodeId nId = operation.getNodeId();
            NodeId destParentId = operation.getDestinationParentId();
            service.clone(sessionInfo, operation.getWorkspaceName(), nId, destParentId, operation.getDestinationName(), operation.isRemoveExisting());
        }
View Full Code Here

        /**
         * @inheritDoc
         * @see OperationVisitor#visit(Copy)
         */
        public void visit(Copy operation) throws NoSuchWorkspaceException, LockException, ConstraintViolationException, AccessDeniedException, ItemExistsException, UnsupportedRepositoryOperationException, VersionException, RepositoryException {
            NodeId nId = operation.getNodeId();
            NodeId destParentId = operation.getDestinationParentId();
            service.copy(sessionInfo, operation.getWorkspaceName(), nId, destParentId, operation.getDestinationName());
        }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.spi.NodeId

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.