Package org.apache.jackrabbit.vault.fs.spi

Examples of org.apache.jackrabbit.vault.fs.spi.ProgressTracker


        // init tracker
        if (opts.getListener() == null) {
            tracker = null;
        } else {
            if (tracker == null) {
                tracker = new ProgressTracker();
            }
            tracker.setListener(opts.getListener());
        }

        // check format version
View Full Code Here


    public void setVerbose(ProgressTrackerListener out) {
        if (out == null) {
            tracker = null;
        } else {
            if (tracker == null) {
                tracker = new ProgressTracker();
            }
            tracker.setListener(out);
        }
    }
View Full Code Here

        // init tracker
        if (opts.getListener() == null) {
            tracker = null;
        } else {
            if (tracker == null) {
                tracker = new ProgressTracker();
            }
            tracker.setListener(opts.getListener());
        }

        // check format version
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void dumpCoverage(javax.jcr.Node rootNode, ProgressTrackerListener listener)
            throws RepositoryException {
        ProgressTracker tracker = new ProgressTracker(listener);
        log.debug("Starting coverage dump at / (skipJcrContent=false)");
        dumpCoverage(rootNode, tracker, false);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void dumpCoverage(Session session, ProgressTrackerListener listener, boolean skipJcrContent)
            throws RepositoryException {
        ProgressTracker tracker = new ProgressTracker(listener);
        // get common ancestor
        Tree<PathFilterSet> tree = new Tree<PathFilterSet>();
        for (PathFilterSet set: filterSets) {
            tree.put(set.getRoot(), set);
        }
View Full Code Here

            metaInf = new DefaultMetaInf();
        }
        JarExporter exporter = new JarExporter(out);
        exporter.open();
        exporter.setProperties(metaInf.getProperties());
        ProgressTracker tracker = null;
        if (opts.getListener() != null) {
            tracker = new ProgressTracker();
            exporter.setVerbose(opts.getListener());
        }

        // merge
        MetaInf inf = opts.getMetaInf();
        ZipFile zip = new ZipFile(src.getFile(), ZipFile.OPEN_READ);
        if (opts.getPostProcessor() == null) {
            // no post processor, we keep all files except the properties
            Enumeration e = zip.entries();
            while (e.hasMoreElements()) {
                ZipEntry entry = (ZipEntry) e.nextElement();
                String path = entry.getName();
                if (!path.equals(Constants.META_DIR + "/" + Constants.PROPERTIES_XML)) {
                    exporter.write(zip, entry);
                }
            }
        } else {
            Set<String> keep = new HashSet<String>();
            keep.add(Constants.META_DIR + "/");
            keep.add(Constants.META_DIR + "/" + Constants.NODETYPES_CND);
            keep.add(Constants.META_DIR + "/" + Constants.CONFIG_XML);
            keep.add(Constants.META_DIR + "/" + Constants.FILTER_XML);
            Enumeration e = zip.entries();
            while (e.hasMoreElements()) {
                ZipEntry entry = (ZipEntry) e.nextElement();
                String path = entry.getName();
                if (!path.startsWith(Constants.META_DIR + "/") || keep.contains(path)) {
                    exporter.write(zip, entry);
                }
            }
        }
        zip.close();

        // write updated properties
        ByteArrayOutputStream tmpOut = new ByteArrayOutputStream();
        inf.getProperties().storeToXML(tmpOut, "FileVault Package Properties", "utf-8");
        exporter.writeFile(new ByteArrayInputStream(tmpOut.toByteArray()), Constants.META_DIR + "/" + Constants.PROPERTIES_XML);
        if (tracker != null) {
            tracker.track("A", Constants.META_DIR + "/" + Constants.PROPERTIES_XML);
        }

        if (opts.getPostProcessor() != null) {
            opts.getPostProcessor().process(exporter);
        }
View Full Code Here

        // init tracker
        if (opts.getListener() == null) {
            tracker = null;
        } else {
            if (tracker == null) {
                tracker = new ProgressTracker();
            }
            tracker.setListener(opts.getListener());
        }

        // check format version
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.vault.fs.spi.ProgressTracker

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.