Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.NodeId


        /**
         * @inheritDoc
         * @see OperationVisitor#visit(Restore)
         */
        public void visit(Restore operation) throws VersionException, PathNotFoundException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException {
            NodeId nId = operation.getNodeId();
            if (nId == null) {
                service.restore(sessionInfo, operation.getVersionIds(), operation.removeExisting());
            } else {
                NodeId targetId;
                Path relPath = operation.getRelativePath();
                if (relPath != null) {
                    targetId = idFactory.createNodeId(nId, relPath);
                } else {
                    targetId = nId;
                }
                NodeId versionId = operation.getVersionIds()[0];
                service.restore(sessionInfo, targetId, versionId, operation.removeExisting());
            }
        }
View Full Code Here


        /**
         * @inheritDoc
         * @see OperationVisitor#visit(Merge)
         */
        public void visit(Merge operation) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException {
            NodeId nId = operation.getNodeId();
            Iterator failed;
            if (operation.isActivityMerge()) {
                failed = service.mergeActivity(sessionInfo, nId);
            } else {
                failed = service.merge(sessionInfo, nId, operation.getSourceWorkspaceName(), operation.bestEffort(), operation.isShallow());
View Full Code Here

        /**
         * @inheritDoc
         * @see OperationVisitor#visit(ResolveMergeConflict)
         */
        public void visit(ResolveMergeConflict operation) throws VersionException, InvalidItemStateException, UnsupportedRepositoryOperationException, RepositoryException {
            NodeId nId = operation.getNodeId();
            NodeId[] mergedFailedIds = operation.getMergeFailedIds();
            NodeId[] predecessorIds = operation.getPredecessorIds();
            service.resolveMergeConflict(sessionInfo, nId, mergedFailedIds, predecessorIds);
        }
View Full Code Here

        /**
         * @inheritDoc
         * @see OperationVisitor#visit(AddLabel)
         */
        public void visit(AddLabel operation) throws VersionException, RepositoryException {
            NodeId vhId = operation.getVersionHistoryId();
            NodeId vId = operation.getVersionId();
            service.addVersionLabel(sessionInfo, vhId, vId, operation.getLabel(), operation.moveLabel());
        }
View Full Code Here

        /**
         * @inheritDoc
         * @see OperationVisitor#visit(RemoveLabel)
         */
        public void visit(RemoveLabel operation) throws VersionException, RepositoryException {
            NodeId vhId = operation.getVersionHistoryId();
            NodeId vId = operation.getVersionId();
            service.removeVersionLabel(sessionInfo, vhId, vId, operation.getLabel());
        }
View Full Code Here

        /**
         * @inheritDoc
         * @see OperationVisitor#visit(RemoveVersion)
         */
        public void visit(RemoveVersion operation) throws VersionException, AccessDeniedException, ReferentialIntegrityException, RepositoryException {
            NodeId versionId = (NodeId) operation.getRemoveId();
            NodeState vhState = operation.getParentState();
            service.removeVersion(sessionInfo, (NodeId) vhState.getWorkspaceId(), versionId);
        }
View Full Code Here

        /**
         * @see OperationVisitor#visit(CreateActivity)
         */
        public void visit(CreateActivity operation) throws RepositoryException {
            NodeId activityId = service.createActivity(sessionInfo, operation.getTitle());
            operation.setNewActivityId(activityId);
        }
View Full Code Here

        /**
         * @see OperationVisitor#visit(CreateConfiguration)
         */
        public void visit(CreateConfiguration operation) throws RepositoryException {
            NodeId configId = service.createConfiguration(sessionInfo, operation.getNodeId(), operation.getBaselineId());
            operation.setNewConfigurationId(configId);
        }
View Full Code Here

                    if (v != null) {
                        score = v.getDouble();
                    }
                    scores.put(s, score);
                } else if (jcrPath.equals(names[i])) {
                    NodeId id = null;
                    if (v != null) {
                        id = idFactory.createNodeId((String) null, v.getPath());
                    }
                    nodeIds.put(s, id);
                }
View Full Code Here

            }
        }
    }

    public NodeId getNodeId(Name selectorName) {
        NodeId id = nodeIds.get(selectorName);
        if (id == null) {
            if (nodeIds.size() == 1) {
                return nodeIds.values().iterator().next();
            } else {
                throw new IllegalArgumentException(selectorName + " is not a valid selectorName");
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.