Package org.apache.jackrabbit.vault.fs.api

Examples of org.apache.jackrabbit.vault.fs.api.ImportInfo


        }
    }

    private void commit(Session session, TxInfo info, LinkedList<TxInfo> skipList) throws RepositoryException, IOException {
        try {
            ImportInfo imp = null;
            if (skipList.isEmpty()) {
                if (info == cpTxInfo) {
                    // don't need to import again, just set import info
                    log.debug("skipping last checkpoint info {}", info.path);
                    imp = cpImportInfo;
                } else {
                    imp = commit(session, info);
                    if (imp != null) {
                        nodesToCheckin.addAll(imp.getToVersion());
                        memberships.putAll(imp.getMemberships());
                        autoSave.modified(imp.numModified());
                    }
                }
            } else if (log.isDebugEnabled()) {
                StringBuilder skips = new StringBuilder();
                for (TxInfo i: skipList) {
View Full Code Here


            throws RepositoryException {
        if (fullCoverage && !recursive) {
            // todo: allow smarter removal
            throw new RepositoryException("Unable to remove content since aggregation has children and recursive is not set.");
        }
        ImportInfo info = new ImportInfoImpl();
        info.onDeleted(node.getPath());
        Node parent = node.getParent();
        if (getAclManagement().isACLNode(node)) {
            getAclManagement().clearACL(parent);
        } else {
            node.remove();
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public ImportInfo remove(Node node, boolean recursive, boolean trySave) throws RepositoryException {
        ImportInfo info = new ImportInfoImpl();
        info.onDeleted(node.getPath());
        Node parent = node.getParent();
        node.remove();
        if (trySave) {
            parent.save();
        }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public ImportInfo remove(Node node, boolean recursive, boolean trySave)
            throws RepositoryException {
        ImportInfo info = new ImportInfoImpl();
        info.onDeleted(node.getPath());
        Node parent = node.getParent();
        node.remove();
        if (trySave) {
            parent.save();
        }
View Full Code Here

        }
    }

    private void commit(Session session, TxInfo info, LinkedList<TxInfo> skipList) throws RepositoryException, IOException {
        try {
            ImportInfo imp = null;
            if (skipList.isEmpty()) {
                if (info == cpTxInfo) {
                    // don't need to import again, just set import info
                    log.debug("skipping last checkpoint info {}", info.path);
                    imp = cpImportInfo;
                } else {
                    imp = commit(session, info);
                    if (imp != null) {
                        nodesToCheckin.addAll(imp.getToVersion());
                        memberships.putAll(imp.getMemberships());
                        autoSave.modified(imp.numModified());
                    }
                }
            } else if (log.isDebugEnabled()) {
                StringBuilder skips = new StringBuilder();
                for (TxInfo i: skipList) {
View Full Code Here

    public ImportInfo writeAggregate(AggregateImpl node, String reposName,
                                        ArtifactSetImpl artifacts)
            throws RepositoryException, IOException {
        assertMounted();
        if (reposName == null) {
            ImportInfo info;
            for (ArtifactHandler artifactHandler : artifactHandlers) {
                info = artifactHandler.accept(session, node, artifacts);
                if (info != null) {
                    node.invalidate();
                    return info;
                }
            }
        } else {
            ImportInfo info;
            for (ArtifactHandler artifactHandler : artifactHandlers) {
                info = artifactHandler.accept(session, node, reposName, artifacts);
                if (info != null) {
                    node.invalidate();
                    return info;
View Full Code Here

                                String path = parentPath + a.getPlatformPath();
                                infos.put(path, new Info(Type.ADDED, path));
                            }
                        }

                        ImportInfo ret = info.out.close();
                        if (ret != null) {
                            allInfos.merge(ret);
                            if (verbose) {
                                for (Map.Entry e: ret.getModifications().entrySet()) {
                                    log.info("...comitting  {} {}", e.getValue(), e.getKey());
                                }
                            }
                        }
                        // modify parent
                        infos.put(info.parentFile.getPath(), new Info(Type.MODIFIED, info.parentFile.getPath()));

                    } else {
                        // this was a modification
                        ImportInfo ret = info.out.close();
                        if (ret != null) {
                            allInfos.merge(ret);
                        }
                        for (VaultFile file: info.original.values()) {
                            infos.put(file.getPath(), new Info(Type.MODIFIED, file.getPath()));
                            if (verbose) {
                                log.info("...comitting  UPD {}", file.getPath());
                            }
                        }
                        if (verbose && ret != null) {
                            for (Map.Entry e: ret.getModifications().entrySet()) {
                                log.info("...comitting  {} {}", e.getValue(), e.getKey());
                            }
                        }
                    }
                }
View Full Code Here

     * @throws RepositoryException if an error occurs.
     */
    public ImportInfo remove(boolean recursive) throws RepositoryException {
        assertAttached();
        Node node = getNode();
        ImportInfo info = aggregator.remove(node, recursive, true);
        if (parent != null) {
            parent.invalidate();
        }
        return info;
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.vault.fs.api.ImportInfo

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.