Package org.apache.jackrabbit.vault.vlt.meta

Examples of org.apache.jackrabbit.vault.vlt.meta.VltEntry


        loadPaths();
        return path;
    }

    public void update(VltFile file) {
        VltEntry e = file.getEntry();
        if (e == null) {
            BinEntry old = (BinEntry) entries.remove(file.getName());
            if (old != null) {
                try {
                    this.file.delete(old.block);
View Full Code Here


                file.open();
                Iterator<Block> iter = file.blocks();
                while (iter.hasNext()) {
                    Block blk = iter.next();
                    if (blk instanceof EntryBlock) {
                        VltEntry e = new BinEntry(this, (EntryBlock) blk);
                        entries.put(e.getName(), e);
                    }
                }
            }
            return entries.values();
        } catch (IOException e) {
View Full Code Here

        if (file == null) {
            return;
        }
        PrintStream out = dir.getContext().getStdout();

        VltEntry e = file.getEntry();
        out.printf("  Path: %s%n", dir.getContext().getCwdRelativePath(file.getPath()));
        out.printf("Status: %s%n", file.getStatus().name().toLowerCase());
        if (e != null) {
            RepositoryAddress root = dir.getContext().getMountpoint();
            RepositoryAddress addr = root.resolve(e.getAggregatePath());
            addr = addr.resolve(e.getRepoRelPath());
            out.printf("   URL: %s%n", addr.toString());
            print(out, "  Work", e.work());
            print(out, "  Base", e.base());
            print(out, "  Mine", e.mine());
            print(out, "Theirs", e.theirs());
        }
        out.println();
    }
View Full Code Here

    public String getAggregatePath() throws VltException {
        VltDirectory parent = getParent();
        VltEntries es = parent.getEntries();
        if (es != null) {
            VltEntry e = es.getEntry(dir.getName());
            if (e != null) {
                return e.getAggregatePath();
            }
        } else {
            // fallback if the parent is not controllable. check the
            // aggregate path of the .content.xml
            VltEntry e = entries == null ? null : entries.getEntry(Constants.DOT_CONTENT_XML);
            if (e != null) {
                return e.getAggregatePath();
            }
        }
        return null;
    }
View Full Code Here

        File[] localFiles = localDir.listFiles();
        if (localFiles != null) {
            for (File localFile : localFiles) {
                if (!isIgnored(localFile)) {
                    String name = localFile.getName();
                    VltEntry entry = entries.getEntry(name);
                    VltFile file = new VltFile(dir, name, entry);
                    files.put(name, file);
                }
            }
        }
View Full Code Here

        handler.endDocument();
        dirty = false;
    }

    public void update(VltFile file) {
        VltEntry e = file.getEntry();
        if (e == null) {
            entries.remove(file.getName());
            dirty = true;
        } else {
            putEntry(e);
View Full Code Here

        return entries.get(localName);
    }

    public VltEntry update(String localName, String aggregatePath, String repoRelPath) {
        XmlEntry e = new XmlEntry(localName, aggregatePath, repoRelPath);
        VltEntry old = entries.remove(localName);
        if (old != null) {
            e.put(old.work());
            e.put(old.base());
            e.put(old.mine());
            e.put(old.theirs());
        }
        putEntry(e);
        return e;
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.vault.vlt.meta.VltEntry

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.