Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.NodeId


                }
            });
        }

        private NodeId calcRemoveNodeId(ItemId itemId) throws MalformedPathException {
            NodeId nodeId = (NodeId) itemId;
            Path p = itemId.getPath();
            if (p != null) {
                removedNodeIds.add(itemId);
                int index = p.getNameElement().getNormalizedIndex();
                if (index > Path.INDEX_DEFAULT) {
                    Path.Element[] elems = p.getElements();
                    PathBuilder pb = new PathBuilder();
                    for (int i = 0; i <= elems.length - 2; i++) {
                        pb.addLast(elems[i]);
                    }
                    pb.addLast(p.getNameElement().getName(), index - 1);

                    NodeId prevSibling = idFactory.createNodeId(itemId.getUniqueID(), pb.getPath());
                    if (removedNodeIds.contains(prevSibling)) {
                        nodeId = prevSibling;
                    }
                }
            }
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

        /**
         * @inheritDoc
         * @see OperationVisitor#visit(Move)
         */
        public void visit(Move operation) throws LockException, ConstraintViolationException, AccessDeniedException, ItemExistsException, UnsupportedRepositoryOperationException, VersionException, RepositoryException {
            NodeId moveId = operation.getSourceId();
            NodeId destParentId = operation.getDestinationParentId();

            if (batch == null) {
                service.move(sessionInfo, moveId, destParentId, operation.getDestinationName());
            } else {
                batch.move(moveId, destParentId, operation.getDestinationName());
View Full Code Here

        /**
         * @inheritDoc
         * @see OperationVisitor#visit(Update)
         */
        public void visit(Update operation) throws NoSuchWorkspaceException, AccessDeniedException, LockException, InvalidItemStateException, RepositoryException {
            NodeId nId = operation.getNodeId();
            service.update(sessionInfo, nId, operation.getSourceWorkspaceName());
        }
View Full Code Here

        /**
         * @inheritDoc
         * @see OperationVisitor#visit(ReorderNodes)
         */
        public void visit(ReorderNodes operation) throws RepositoryException {
            NodeId parentId = operation.getParentId();
            NodeId insertId = operation.getInsertId();
            NodeId beforeId = operation.getBeforeId();
            batch.reorderNodes(parentId, insertId, beforeId);
        }
View Full Code Here

        /**
         * @inheritDoc
         * @see OperationVisitor#visit(Checkin)
         */
        public void visit(Checkin operation) throws UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException {
            NodeId newId = service.checkin(sessionInfo, operation.getNodeId());
            operation.setNewVersionId(newId);
        }
View Full Code Here

        /**
         * @inheritDoc
         * @see OperationVisitor#visit(Checkpoint)
         */
        public void visit(Checkpoint operation) throws UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException {
            NodeId newId = service.checkpoint(sessionInfo, operation.getNodeId());
            operation.setNewVersionId(newId);
        }
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.