站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

RepositoryFiles (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.modules.vcscore.turbo
Class RepositoryFiles

java.lang.Object
  extended byorg.netbeans.modules.vcscore.turbo.RepositoryFiles

public final class RepositoryFiles
extends Object

Keeps track of all recently known repository files. It's primary storage of such information.

The information persists, it's held by a FolderPropepties attribute.

One prominent client is FileSystem impl that must orchestrate with this class to provide stored files as virtual FileObjects.


Field Summary
static int FILE_MASK
           
static int FOLDER_MASK
           
static Map scheduledRemovals
          Keeps scheduled removals FileObject(folder), Set<String>
 
Method Summary
 void addFileObject(String fileName, int mask)
          Registers new repository file.
 void commitRemoved()
          Must be called from FS.children to assure consistency see #53079.
static RepositoryFiles forFolder(FileObject fo)
          Get RepositoryFiles for given folder.
 boolean isFolder(String fileName)
          Classify given (registered) file.
 void removeFileObject(String fileName)
          Unregisters a repository file.
 Iterator virtualsIterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FOLDER_MASK

public static final int FOLDER_MASK
See Also:
Constant Field Values

FILE_MASK

public static final int FILE_MASK
See Also:
Constant Field Values

scheduledRemovals

public static Map scheduledRemovals
Keeps scheduled removals FileObject(folder), Set<String>

Method Detail

forFolder

public static RepositoryFiles forFolder(FileObject fo)
Get RepositoryFiles for given folder.


addFileObject

public void addFileObject(String fileName,
                          int mask)
Registers new repository file. Client must be sure that just registered file has appeared in repository only. Reverse case i.e. file disappeared from working directory should be probably cought by another mechanisms (complete folder refresh).

Parameters:
fileName -
mask - union of *_MASK constancs

removeFileObject

public void removeFileObject(String fileName)
Unregisters a repository file. The caller must be sure that file really disappered from repository!


commitRemoved

public void commitRemoved()
Must be called from FS.children to assure consistency see #53079.


isFolder

public boolean isFolder(String fileName)
                 throws IllegalStateException
Classify given (registered) file. For unregistered files it fails.

Throws:
IllegalStateException - if given file is not tracked in virtual files it probbaly means that it's uncatched external removal (e.g. empty folder pruning on cvs checkout)

virtualsIterator

public Iterator virtualsIterator()
Returns:
FolderEntry iterator of all known repository files

 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.