Package org.evolizer.model.resources.entities.fs

Examples of org.evolizer.model.resources.entities.fs.Directory


            String branch) throws SVNImporterException {
        if (toPath.compareTo(copyPath) == 0) {
            //Kinda dirty
            return;
        }
        Directory copyDir = fDirectories.get(copyPath);
        /*
         * I check if I'm adding contents directly to the folder I'm copying from.
         * In that case I need to be careful not to run into ConcurrentModification exceptions
         *
         */
 
View Full Code Here


     * @return The Directory created, or the one found (if it exists already).
     * @see org.evolizer.model.resources.entities.fs.Directory
     * @see org.evolizer.versioncontrol.svn.importer.mapper.SVNModelMapper.createDirectory
     */
    private Directory internalCreateDirectory(String fullPath) {
        Directory directory = fDirectories.get(fullPath);
        if (directory == null) {
            directory = new Directory(fullPath, null);
            fCachedRoot = directory; // I cache the deepest, non saved parent.
            Directory parent = null;
            if (!fullPath.equals("/")) {
                String parentPath = getParentDirectoryPath(fullPath);
                parent = fDirectories.get(parentPath);
                if (parent == null) {
                    parent = internalCreateDirectory(parentPath);
                }
                directory.setParentDirectory(parent); // SourceUnit -> Directory
                parent.add(directory); // Directory -> SourceUnit
            }
            fDirectories.put(fullPath, directory);
            LOGGER.debug(NLS.bind(MapperMessages.SVNModelMapper_createdDirectory, fullPath));
        }
        return directory;
View Full Code Here

     *            The full path of the Directory to be created.
     * @return The Directory created, or the one found (if it exists already).
     * @see org.evolizer.model.resources.entities.fs.Directory
     */
    public Directory createDirectory(String fullPath) {
        Directory dir = internalCreateDirectory(fullPath);
        if (fCachedRoot != null) {
            /*
             * Thanks to cascading I just need to add to the
             * file cache only the "deepest" non saved parent.
             * In fact, all its children will
View Full Code Here

    public SVNVersionedFile createFile(String fullPath) {
        SVNVersionedFile file = fFiles.get(fullPath);
        if (file == null) {
            file = new SVNVersionedFile(fullPath, null);
            String parentPath = getParentDirectoryPath(fullPath);
            Directory parent = fDirectories.get(parentPath);
            if (parent == null) {
                parent = createDirectory(parentPath);
            }
            file.setParentDirectory(parent); // SourceUnit -> Directory
            parent.add(file); // Directory -> SourceUnit
            if (fCachedRoot == null) {
                fFilesCache.add(file);
            }
            fFiles.put(fullPath, file);
            LOGGER.debug(NLS.bind(MapperMessages.SVNModelMapper_createdFile, fullPath));
View Full Code Here

            Transaction changeSet,
            Date date,
            String message,
            String author,
            String branch) {
        Directory directory = fDirectories.get(fullPath);
        if (directory != null) {
            for (File unit : directory.getChildren()) {
                if (unit instanceof SVNVersionedFile) {
                    try {
                        createRevision(revNum, (SVNVersionedFile) unit, changeSet, this.createModificationReport(
                                date,
                                message,
View Full Code Here

     * @param path
     *            The release repository path of the contents to be removed.
     * @see org.evolizer.versioncontrol.svn.model.entities.SVNRelease
     */
    public void removeFromRelease(SVNRelease release, String path) {
        Directory directory = fDirectories.get(path);
        // Check if the content to be removed is a Directory
        if (directory != null) {
            // If so, I need to dig down into the directory structure and remove all the content I find

            List<Directory> toRemove = new ArrayList<Directory>();
View Full Code Here

     * @param path
     *            The branch repository path of the contents to be removed.
     * @see org.evolizer.versioncontrol.cvs.model.entities.Branch
     */
    public void removeFromBranch(Branch branch, String path) {
        Directory directory = fDirectories.get(path);
        // Check if the content to be removed is a Directory
        if (directory != null) {
            // If so, I need to dig down into the directory structure and remove all the content I find
            removeDirContentFromBranch(directory, branch);
//            fDirectories.remove(path);
View Full Code Here

            String releasePath,
            String replacementPath,
            long replacementRevisionNum,
            long releaseRevisionNum) throws SVNImporterException {
        // I check whether a directory with the replacementPath (copy path of SVN) exists.
        Directory directory = fDirectories.get(replacementPath);
        if (directory != null) {
            // If it exists I iterate on its children
            replaceDirContent(
                    directory,
                    changeSet,
View Full Code Here

            String branchPath,
            String replacementPath,
            long replacementRevisionNum,
            long branchRevisionNum) throws SVNImporterException {
        // I check whether a directory with the replacementPath (copy path of SVN) exists.
        Directory directory = fDirectories.get(replacementPath);
        if (directory != null) {
            // If it exists I iterate on its children
            replaceDirContent(
                    directory,
                    changeSet,
View Full Code Here

         * Trying to free up a bit of space.
         * In fact I don't need to keep all the dirs and files
         * associated to the release, as they won't be used anymore.
         *
         */
        Directory dir = fDirectories.get(rel.getUrl());
        if (dir != null) {
            recurseDelete(fDirectories.get(rel.getUrl()));
        }
        for (Revision tmp : rel.getReleaseRevisions()) {
            fFiles.remove(tmp.getFile().getPath());
View Full Code Here

TOP

Related Classes of org.evolizer.model.resources.entities.fs.Directory

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.