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

VcsFileSystem (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.modules.vcscore
Class VcsFileSystem

java.lang.Object
  extended byorg.openide.filesystems.FileSystem
      extended byorg.openide.filesystems.AbstractFileSystem
          extended byorg.netbeans.modules.vcscore.VcsFileSystem
All Implemented Interfaces:
AbstractFileSystem.Change, AbstractFileSystem.Info, AbstractFileSystem.List, CommandExecutionContext, EventListener, FileObjectExistence, FilesModificationSupport, FileSystem.HtmlStatus, FileSystem.Status, Serializable, TurboListener, VariableInputDialog.FilePromptDocumentListener, org.netbeans.modules.vcscore.objectintegrity.VcsOISActivator, org.netbeans.modules.vcscore.search.VcsSearchTypeFileSystem, org.netbeans.modules.vcscore.util.virtuals.VirtualsRefreshing

public abstract class VcsFileSystem
extends AbstractFileSystem
implements VariableInputDialog.FilePromptDocumentListener, org.netbeans.modules.vcscore.search.VcsSearchTypeFileSystem, org.netbeans.modules.vcscore.util.virtuals.VirtualsRefreshing, AbstractFileSystem.List, AbstractFileSystem.Info, AbstractFileSystem.Change, FileSystem.Status, CommandExecutionContext, FileObjectExistence, org.netbeans.modules.vcscore.objectintegrity.VcsOISActivator, Serializable, FileSystem.HtmlStatus, TurboListener, FilesModificationSupport

Generic VCS filesystem.

See Also:
Serialized Form

Nested Class Summary
static interface VcsFileSystem.IgnoreListSupport
          Profile entry point to plug-in specifics ignore list implementation (here commands CMD_CREATE_FOLDER_IGNORE_LIST, CMD_CREATE_INITIAL_IGNORE_LIST).
 
Nested classes inherited from class org.openide.filesystems.AbstractFileSystem
AbstractFileSystem.Attr, AbstractFileSystem.Change, AbstractFileSystem.Info, AbstractFileSystem.List, AbstractFileSystem.Transfer
 
Nested classes inherited from class org.openide.filesystems.FileSystem
FileSystem.AtomicAction, FileSystem.Environment, FileSystem.HtmlStatus, FileSystem.Status
 
Field Summary
protected  boolean deserialized
           
static String PROP_ANNOTATION_PATTERN
           
static String PROP_ANNOTATION_TYPES
           
static String PROP_CALL_EDIT
           
static String PROP_CALL_EDIT_PROMPT
           
static String PROP_CALL_LOCK
           
static String PROP_CALL_LOCK_PROMPT
           
static String PROP_COMMAND_NOTIFICATION
           
static String PROP_COMMANDS
           
static String PROP_CREATE_BACKUP_FILES
           
static String PROP_CREATE_RUNTIME_COMMANDS
           
static String PROP_CREATE_VERSIONING_EXPLORER
           
static String PROP_DEBUG
           
static String PROP_EXPERT_MODE
           
static String PROP_FILE_FILTER
           
protected static String PROP_NOT_MODIFIABLE_STATUSES
           
static String PROP_PASSWORD
           
static String PROP_PROCESS_UNIMPORTANT_FILES
           
static String PROP_PROMPT_FOR_VARS_FOR_EACH_FILE
           
static String PROP_REMEMBER_PASSWORD
           
protected static String PROP_USE_UNIX_SHELL
           
static String PROP_VARIABLES
           
static String PROP_VCS_REFRESH_TIME
           
protected  boolean ready
           
protected static int REFRESH_TIME
           
protected  int refreshTimeToSet
           
protected  Image statusIconDefault
          The default icon badge, that is used when no icon can be obtained from statusIconMap.
protected  FileStatusProvider statusProvider
           
static String VAR_CTRL_DOWN_IN_ACTION
          If Expert mode is off..
static String VAR_ENVIRONMENT_PREFIX
          This is a prefix, for environment variable.
static String VAR_ENVIRONMENT_REMOVE_PREFIX
          This is a prefix, for environment variable, that should be removed from the command environment.
static String VAR_EXPERT_MODE
          The test on this variable can be performed in the exec string to decide what options to use or what to ask the user for.
static String VAR_FALSE
           
static String VAR_FS_DISPLAY_NAME
          This variable can contain the display name, which is prepended to the root path of the file system to create the display name.
static String VAR_FS_DISPLAY_NAME_ANNOTATION
          This variable can contain the whole annotation of file system display name.
static String VAR_FS_SYSTEM_NAME_ANNOTATION
          This variable can contain the whole annotation of file system system name.
static String VAR_LOCKER_USER_NAME
          The user name of current user, that locks files.
static String VAR_QUOTING
          The value of this variable is used to surround file names.
static String VAR_STATUS_SCHEDULED_ADD
           
static String VAR_STATUS_SCHEDULED_REMOVE
           
static String VAR_TRUE
           
static String VAR_VCS_TYPE
          The unique type of VCS that is provided.
protected  Hashtable variablesByName
           
static String VCS_FILESYSTEM_ICON_BASE
           
static String VCS_PROVIDER_ATTRIBUTE
           
 
Fields inherited from class org.openide.filesystems.AbstractFileSystem
attr, change, info, list, transfer
 
Fields inherited from class org.openide.filesystems.FileSystem
PROP_DISPLAY_NAME, PROP_HIDDEN, PROP_READ_ONLY, PROP_ROOT, PROP_SYSTEM_NAME, PROP_VALID
 
Fields inherited from interface org.netbeans.modules.vcscore.search.VcsSearchTypeFileSystem
VCS_SEARCH_TYPE_ATTRIBUTE
 
Constructor Summary
VcsFileSystem()
          Create a new VCS filesystem.
 
Method Summary
 void activate(org.netbeans.modules.vcscore.objectintegrity.VcsObjectIntegritySupport objectIntegritySupport)
           
 void addEnvironmentVar(String key, String value)
           
 void addFilesStructureModificationListener(ChangeListener chl)
           
 void addRevisionListener(RevisionListener listener)
           
 Image annotateIcon(Image icon, int iconType, Set files)
           
 String annotateName(String name, Set files)
          Annotate the set of files with additional version control attributes.
 String annotateNameHtml(String name, Set files)
           
protected  void callDeleteCommand(String name, boolean isDir)
          When a file or folder was deleted, a command DELETE_FILE or DELETE_DIR is called.
 void checkForModifications(String path)
          Should be called when the modification in a file or folder is expected and its content should be refreshed.
 void checkForModifications(String path, boolean recursively, boolean refreshData, boolean refreshFolders)
          Should be called when the modification in a file or folder is expected and its content should be refreshed.
protected  boolean checkVirtual(String name)
          This method is called from AbstractFileObject.isVirtual.
protected  void checkVirtualFiles(Collection foSet)
          Perform the check of whether the file is or is not still virtual.
 String[] children(String name)
           
protected  String computeDisplayName()
           
protected  String computeSystemName(File rootFile)
          Compute the system name of this file system for a given root directory.
protected  void createBackupFile(String name)
           
 void createData(String name)
          Create new data file.
 void createFolder(String name)
           
protected  Reference createReference(FileObject fo)
          Creates Reference.
protected  void createVersioningFileSystem()
           
 void debug(String msg)
          Print a debug output.
 void debugClear()
          Clear the debug output.
 void debugErr(String msg)
          Print an error output.
 void delete(String name)
          Delete working file.
protected  boolean deleteFile(File file, String name)
           
 void disableRefresh()
           
 void doVirtualsRefresh(FileObject fo)
          Do the refresh of a folder.
 void enableRefresh()
           
 void filePromptDocumentCleanup(JTextArea ta, int promptNum, Object docIdentif)
          Allows some cleanup of the document which the user is asked for.
 FileObject findExistingResource(String name)
          Find the existing resource on this file system.
 FileObject findFileObject(String fullName)
          Find the file object from a file path.
protected  void fireFilesStructureModified(File file)
           
 void fireRevisionsChanged(RevisionEvent event)
           
 boolean folder(String name)
          Test if the file is folder or contains data.
protected  String g(String s)
           
protected  String g(String s, Object obj)
           
protected  String g(String s, Object obj1, Object obj2)
           
protected  String g(String s, Object obj1, Object obj2, Object obj3)
           
 SystemAction[] getActions()
          Get the VCS actions.
 SystemAction[] getActions(Set fos)
          Get the VCS actions on a collection of FileObjects.
 String getAnnotationPattern()
           
 boolean getAskIfDownloadRecursively()
           
 int getAutoRefresh()
          Get the mode of auto refresh.
protected  String getBackupExtension()
           
 String getBundleProperty(String s)
           
 String getBundleProperty(String s, Object obj)
           
abstract  File getCacheFileName(File folder, String folderPath)
          Get the full file path where cache information should be stored.
abstract  String getCacheFileName(String path)
          Get the full file path where cache information should be stored.
 String getCacheIdStr()
          Get the cache identification.
 VcsCommand getCommand(String name)
          Deprecated. Retained for compatibility reasons only to be able to use the old VCS "API" for commands execution. Use #getCommandSupport() instead.
 CommandsTree getCommands()
          Get the commands.
protected  InputOutput getCommandsIO()
           
 CommandsPool getCommandsPool()
          Deprecated. For compatibility only
 VcsCommandsProvider getCommandsProvider()
           
 CommandSupport getCommandSupport(String name)
          Get a command support by it's name.
 int getCustomRefreshTime()
           
 boolean getDebug()
           
 String getDisplayName()
          Get a human presentable name of the file system
 boolean getDoAutoRefresh(String path)
          Get whether to perform the auto-refresh in the given directory path.
 String[] getEnvironmentVars()
          Get the environment variables and their values in the form: "VAR1=Value1", "VAR2=Value2", etc.
 Enumeration getExistingFiles()
          Returns all existing files in the file system.
 Enumeration getExistingFolders()
          Returns all existing files in the file system (both folders and data).
 File getFile(String name)
          Get file representation for given string name.
 FilenameFilter getFileFilter()
          Get the filename filter of this file system.
protected  FileReference getFileReference(String name)
          Utility method that find the fileobject reference and if it exists, retypes it to FileReference.
 String getFSRoot()
          Return the working directory of the file system.
 Map getGenericStatusTranslation()
          Get the map of generic file status names (that are defined in FileStatusInfo class) as keys and translated file status names (that are provided in the possibleFileStatusInfos set) as values.
 VcsFileSystem.IgnoreListSupport getIgnoreListSupport()
           
 int[] getMultiFileAnnotationTypes()
           
 int getNumberOfFinishedCmdsToCollect()
           
 int getNumDoAutoRefresh(String path)
          Get the number of command calls after which perform the auto-refresh command in the given path.
 String getPassword()
           
 String getPasswordDescription()
          Get the description of the password, typically the name of the service that requests the password.
 String[] getPossibleFileStatuses()
          It should return all possible VCS states in which the files in the filesystem can reside.
 Map getPossibleFileStatusInfoMap()
          Get the map of possible pairs of status name and corresponding FileStatusInfo object.
 Set getPossibleFileStatusInfos()
          Get the set of all possible FileStatusInfo objects.
 String getPreferredSystemName()
          Get a preferred system name of the filesystem.
 String getRelativeMountPoint()
           
 File getRootDirectory()
          Get the root directory of the file system.
 String[] getStates(DataObject dobj)
          Get states of all important files inside the DataObject.
 FileSystem.Status getStatus()
           
 String getStatus(FileObject fo)
           
static RequestProcessor getStatusChangeRequestProcessor()
          Get a special request processor, that is used to refresh the file status.
 FileStatusProvider getStatusProvider()
          Get the provider of file status attributes.
 String[] getUserLocalParamsLabels()
           
 String[] getUserParams()
           
 String[] getUserParamsLabels()
           
 Vector getVariables()
          If this is FileSystem, take it from there! If not, get abolute paths.
 Hashtable getVariablesAsHashtable()
           
 VariableValueAdjustment getVarValueAdjustment()
          Get the variable value adjustment utility object.
protected  VcsActionSupporter getVcsActionSupporter()
           
protected  VcsAttributes getVcsAttributes()
           
 VcsFactory getVcsFactory()
          Gets the default factory DefaultVcsFactory.
protected  AbstractFileSystem.Info getVcsInfo()
           
protected  AbstractFileSystem.List getVcsList()
           
protected  int getVcsRefreshTime()
          Get the number of milliseconds between automatic refreshes of the directory structure.
 VersioningFileSystem getVersioningFileSystem()
           
 int getVFSMessageLength()
           
 boolean getVFSShowDeadFiles()
           
 boolean getVFSShowLocalFiles()
           
 boolean getVFSShowMessage()
           
 boolean getVFSShowUnimportantFiles()
           
protected  void init()
          Perform some initialization job.
 String initCacheIdStr()
          Initialize the identification of cache used.
 InputStream inputStream(String name)
          Get input stream to a file.
 boolean isAcceptUserParams()
           
 boolean isCallEditFilesOn()
           
 boolean isCommandNotification()
           
 boolean isCreateBackupFiles()
           
protected  boolean isCreateBackupFilesSet()
           
 boolean isCreateRuntimeCommands()
           
protected  boolean isCreateVersioningSystem()
           
 boolean isEnabledEditFiles()
           
 boolean isEnabledLockFiles()
           
 boolean isExpertMode()
           
 boolean isHideShadowFiles()
          Whether to hide files, which does not exist locally.
 boolean isImportant(String name)
          Returns true when the given file is sharable.
 boolean isLockFilesOn()
           
 boolean isOffLine()
           
 boolean isProcessUnimportantFiles()
           
 boolean isPromptForEditOn()
           
 boolean isPromptForLockOn()
           
 boolean isPromptForVarsForEachFile()
          Whether to prompt the user for variables for each selected file.
 boolean isReadOnly()
           
 boolean isRememberPassword()
           
 boolean isShowDeadFiles()
           
 boolean isUseUnixShell()
           
 Date lastModified(String name)
          Get last modification time.
 void lock(String name)
          Run the LOCK command to lock the file.
static boolean lockerMatch(String lockerAttribute, String lockerUserName)
          Test whether the current user has locked file with given locker attribute.
 void lockFilesToBeModified(String path, boolean recursively)
          Lock the files so that they can not be modified in the IDE.
 void markUnimportant(String name)
           
 String mimeType(String name)
           
protected  void notifyFSAdded()
          Notifies this file system that it has been added to the repository.
protected  void notifyFSRemoved()
          Notifies this file system that it has been removed from the repository.
 OutputStream outputStream(String name)
          Get output stream to a file.
 boolean readOnly(String name)
          Test whether this file can be written to or not.
 void refreshExistingFolders()
          Instruct FS to refrest folders, XXX asynchronous operation.
protected  void refreshExistingFolders(String name)
           
 void removeFilesStructureModificationListener(ChangeListener chl)
           
 void removeNumDoAutoRefresh(String path)
          Remove the number of command calls after which perform the auto-refresh command in the given path.
 boolean removeRevisionListener(RevisionListener listener)
           
protected  void removeVersioningFileSystem()
           
 void rename(String oldName, String newName)
          Rename a file.
 void setAcceptUserParams(boolean acceptUserParams)
           
protected  void setAdditionalFileFilter(FilenameFilter additionalFileFilter)
          The subclasses can define their own filename filter.
 void setAdjustedSystemName(String name)
          Modified to never throw PropertyVetoException by the name adjustment.
 void setAnnotationPattern(String annotationPattern)
           
 void setAskIfDownloadRecursively(boolean ask)
           
 void setAutoRefresh(int newAuto)
          Set the mode of auto refresh.
 void setCallEditFilesOn(boolean edit)
           
 void setCommandNotification(boolean commandNotification)
           
 void setCommands(CommandsTree root)
          Set the tree structure of commands.
 void setCreateBackupFiles(boolean createBackupFiles)
           
protected  void setCreateRuntimeCommands(boolean createRuntimeCommands)
           
protected  void setCreateVersioningSystem(boolean createVersioningSystem)
           
 void setCustomRefreshTime(int time)
           
 void setDebug(boolean debug)
           
 void setEnvironmentVar(String key, String value)
           
 void setExpertMode(boolean expertMode)
           
 void setHideShadowFiles(boolean hideShadowFiles)
          Set whether to hide files, which does not exist locally.
 void setIgnoreListSupport(VcsFileSystem.IgnoreListSupport support)
           
 void setLockFilesOn(boolean lock)
           
protected  void setMissingFileStatus(String missingFileStatus)
           
protected  void setMissingFolderStatus(String missingFolderStatus)
           
 void setMultiFileAnnotationTypes(int[] multiFileAnnotationTypes)
           
protected  void setNotMissingableFileStatuses(Collection notMissingableFileStatuses)
           
protected  void setNotMissingableFolderStatuses(Collection notMissingableFolderStatuses)
           
protected  void setNotModifiableStatuses(Collection notModifiableStatuses)
          VCS specifics set of statuses that does not undergo automatic transtition to [modified] on file edit.
 void setNumberOfFinishedCmdsToCollect(int numberOfFinishedCmdsToCollect)
           
 void setNumDoAutoRefresh(int numDoAutoRefresh, String path)
          Set how many times I call a command after which the auto-refresh is executed in the given path.
 void setOffLine(boolean offLine)
           
 void setPassword(String password)
           
protected  void setPossibleFileStatusInfos(Set fileStatusInfos, Map genericStatusTranslation)
          Set a set of all possible FileStatusInfo objects.
 void setPreferredSystemName(String preferredSystemName)
          Set a preferred system name of the filesystem.
 void setProcessUnimportantFiles(boolean processUnimportantFiles)
           
 void setPromptForEditOn(boolean prompt)
           
 void setPromptForLockOn(boolean prompt)
           
 void setPromptForVarsForEachFile(boolean promptForVarsForEachFile)
          Set whether to prompt the user for variables for each selected file.
 void setReadOnly(boolean flag)
          Set whether the file system should be read only.
 void setRefreshTimeToSet()
           
 void setRelativeMountPoint(String module)
           
 void setRememberPassword(boolean remember)
           
 void setRootDirectory(File r)
          Set the root directory of the file system.
protected  void setRootDirectory(File r, boolean forceToSet)
          Set the root directory of the file system.
 void setShowDeadFiles(boolean showDeadFiles)
           
 void setUserLocalParamsLabels(String[] labels)
           
 void setUserParams(String[] userParams)
           
 void setUserParamsLabels(String[] labels)
           
protected  void setUseUnixShell(boolean unixShell)
           
 void setVariables(Vector variables)
          Set the file system's variables.
protected  void setVcsRefreshTime(int ms)
          Set the number of milliseconds between automatic refreshes of the directory structure.
 void setVFSMessageLength(int newVal)
           
 void setVFSShowDeadFiles(boolean newVal)
           
 void setVFSShowLocalFiles(boolean newVal)
           
 void setVFSShowMessage(boolean newVal)
           
 void setVFSShowUnimportantFiles(boolean newVal)
           
 void setZeroRefreshTime()
           
protected  boolean shouldLock(String name)
          Whether the LOCK command should be performed for this file.
 long size(String name)
          Get the size of a file.
 void statusChanged(String name)
          Fire status chnage information of a file.
 void statusChanged(String path, boolean recursively)
          Perform refresh of status information on all children of a directory
static String substractRootDir(String rDir, String module)
           
 void turboChanged(TurboEvent e)
          Does nothing to mark the file as unimportant.
 void unlock(String name)
          Call the UNLOCK command to unlock the file.
 void unlockFilesToBeModified(String path, boolean recursively)
          Unlock the files that were previously locked by lockFilesToBeModified(java.lang.String, boolean) method.
 void variableChanged(String name)
          Notify the filesystem, that an variable has changed and should be saved.
protected  void warnDirectoriesDoNotExists()
           
 
Methods inherited from class org.openide.filesystems.AbstractFileSystem
canRead, canWrite, existingFileObjects, find, findReference, findResource, getRefreshTime, getRoot, markImportant, refresh, refreshResource, refreshRoot, setRefreshTime
 
Methods inherited from class org.openide.filesystems.FileSystem
addFileChangeListener, addFileStatusListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, fireFileStatusChanged, firePropertyChange, fireVetoableChange, getCapability, getSystemName, isDefault, isHidden, isPersistent, isValid, prepareEnvironment, removeFileChangeListener, removeFileStatusListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, runAtomicAction, setCapability, setHidden, setSystemName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VCS_PROVIDER_ATTRIBUTE

public static final String VCS_PROVIDER_ATTRIBUTE
See Also:
Constant Field Values

VCS_FILESYSTEM_ICON_BASE

public static final String VCS_FILESYSTEM_ICON_BASE
See Also:
Constant Field Values

PROP_VARIABLES

public static final String PROP_VARIABLES
See Also:
Constant Field Values

PROP_COMMANDS

public static final String PROP_COMMANDS
See Also:
Constant Field Values

PROP_DEBUG

public static final String PROP_DEBUG
See Also:
Constant Field Values

PROP_CALL_EDIT

public static final String PROP_CALL_EDIT
See Also:
Constant Field Values

PROP_CALL_EDIT_PROMPT

public static final String PROP_CALL_EDIT_PROMPT
See Also:
Constant Field Values

PROP_CALL_LOCK

public static final String PROP_CALL_LOCK
See Also:
Constant Field Values

PROP_CALL_LOCK_PROMPT

public static final String PROP_CALL_LOCK_PROMPT
See Also:
Constant Field Values

PROP_EXPERT_MODE

public static final String PROP_EXPERT_MODE
See Also:
Constant Field Values

PROP_PROCESS_UNIMPORTANT_FILES

public static final String PROP_PROCESS_UNIMPORTANT_FILES
See Also:
Constant Field Values

PROP_ANNOTATION_PATTERN

public static final String PROP_ANNOTATION_PATTERN
See Also:
Constant Field Values

PROP_ANNOTATION_TYPES

public static final String PROP_ANNOTATION_TYPES
See Also:
Constant Field Values

PROP_COMMAND_NOTIFICATION

public static final String PROP_COMMAND_NOTIFICATION
See Also:
Constant Field Values

PROP_PASSWORD

public static final String PROP_PASSWORD
See Also:
Constant Field Values

PROP_REMEMBER_PASSWORD

public static final String PROP_REMEMBER_PASSWORD
See Also:
Constant Field Values

PROP_CREATE_RUNTIME_COMMANDS

public static final String PROP_CREATE_RUNTIME_COMMANDS
See Also:
Constant Field Values

PROP_CREATE_VERSIONING_EXPLORER

public static final String PROP_CREATE_VERSIONING_EXPLORER
See Also:
Constant Field Values

PROP_CREATE_BACKUP_FILES

public static final String PROP_CREATE_BACKUP_FILES
See Also:
Constant Field Values

PROP_PROMPT_FOR_VARS_FOR_EACH_FILE

public static final String PROP_PROMPT_FOR_VARS_FOR_EACH_FILE
See Also:
Constant Field Values

PROP_VCS_REFRESH_TIME

public static final String PROP_VCS_REFRESH_TIME
See Also:
Constant Field Values

PROP_FILE_FILTER

public static final String PROP_FILE_FILTER
See Also:
Constant Field Values

PROP_USE_UNIX_SHELL

protected static final String PROP_USE_UNIX_SHELL
See Also:
Constant Field Values

PROP_NOT_MODIFIABLE_STATUSES

protected static final String PROP_NOT_MODIFIABLE_STATUSES
See Also:
Constant Field Values

VAR_TRUE

public static final String VAR_TRUE
See Also:
Constant Field Values

VAR_FALSE

public static final String VAR_FALSE
See Also:
Constant Field Values

VAR_QUOTING

public static final String VAR_QUOTING
The value of this variable is used to surround file names.

See Also:
Constant Field Values

VAR_EXPERT_MODE

public static final String VAR_EXPERT_MODE
The test on this variable can be performed in the exec string to decide what options to use or what to ask the user for. When the expert mode is on, this variable is non empty.

See Also:
Constant Field Values

VAR_CTRL_DOWN_IN_ACTION

public static final String VAR_CTRL_DOWN_IN_ACTION
If Expert mode is off.. this variable carries information that CTrl was pressed down when displaying the Vcsaction = user requested to have the advanced options displayed..

See Also:
Constant Field Values

VAR_FS_DISPLAY_NAME

public static final String VAR_FS_DISPLAY_NAME
This variable can contain the display name, which is prepended to the root path of the file system to create the display name.

See Also:
Constant Field Values

VAR_FS_DISPLAY_NAME_ANNOTATION

public static final String VAR_FS_DISPLAY_NAME_ANNOTATION
This variable can contain the whole annotation of file system display name.

See Also:
Constant Field Values

VAR_FS_SYSTEM_NAME_ANNOTATION

public static final String VAR_FS_SYSTEM_NAME_ANNOTATION
This variable can contain the whole annotation of file system system name.

See Also:
Constant Field Values

VAR_ENVIRONMENT_PREFIX

public static final String VAR_ENVIRONMENT_PREFIX
This is a prefix, for environment variable. If a variable name starts with this prefix, it is considered as an environment variable, and its value is added to the process environment.

See Also:
Constant Field Values

VAR_ENVIRONMENT_REMOVE_PREFIX

public static final String VAR_ENVIRONMENT_REMOVE_PREFIX
This is a prefix, for environment variable, that should be removed from the command environment. If a variable name starts with this prefix, variable of this name is removed from the list of environment variables. It's value is ignored.

See Also:
Constant Field Values

VAR_STATUS_SCHEDULED_ADD

public static final String VAR_STATUS_SCHEDULED_ADD
See Also:
Constant Field Values

VAR_STATUS_SCHEDULED_REMOVE

public static final String VAR_STATUS_SCHEDULED_REMOVE
See Also:
Constant Field Values

VAR_VCS_TYPE

public static final String VAR_VCS_TYPE
The unique type of VCS that is provided.

See Also:
Constant Field Values

VAR_LOCKER_USER_NAME

public static final String VAR_LOCKER_USER_NAME
The user name of current user, that locks files. It's supposed that LOCK command will lock files with that user name. If empty, System.getProperty("user.name") is used instead.

See Also:
Constant Field Values

REFRESH_TIME

protected static final int REFRESH_TIME
See Also:
Constant Field Values

refreshTimeToSet

protected volatile int refreshTimeToSet

variablesByName

protected Hashtable variablesByName

statusProvider

protected transient FileStatusProvider statusProvider

statusIconDefault

protected transient Image statusIconDefault
The default icon badge, that is used when no icon can be obtained from statusIconMap.


ready

protected boolean ready

deserialized

protected transient boolean deserialized
Constructor Detail

VcsFileSystem

public VcsFileSystem()
Create a new VCS filesystem.

Method Detail

isLockFilesOn

public boolean isLockFilesOn()

setLockFilesOn

public void setLockFilesOn(boolean lock)

isPromptForLockOn

public boolean isPromptForLockOn()

setPromptForLockOn

public void setPromptForLockOn(boolean prompt)

getAskIfDownloadRecursively

public boolean getAskIfDownloadRecursively()

setAskIfDownloadRecursively

public void setAskIfDownloadRecursively(boolean ask)

isCallEditFilesOn

public boolean isCallEditFilesOn()

setCallEditFilesOn

public void setCallEditFilesOn(boolean edit)

isPromptForEditOn

public boolean isPromptForEditOn()

setPromptForEditOn

public void setPromptForEditOn(boolean prompt)

isUseUnixShell

public boolean isUseUnixShell()

isEnabledLockFiles

public boolean isEnabledLockFiles()

isEnabledEditFiles

public boolean isEnabledEditFiles()

setUseUnixShell

protected void setUseUnixShell(boolean unixShell)

setAcceptUserParams

public void setAcceptUserParams(boolean acceptUserParams)

isAcceptUserParams

public boolean isAcceptUserParams()
Specified by:
isAcceptUserParams in interface CommandExecutionContext

setUserLocalParamsLabels

public void setUserLocalParamsLabels(String[] labels)

getUserLocalParamsLabels

public String[] getUserLocalParamsLabels()
Specified by:
getUserLocalParamsLabels in interface CommandExecutionContext

setUserParamsLabels

public void setUserParamsLabels(String[] labels)

getUserParamsLabels

public String[] getUserParamsLabels()
Specified by:
getUserParamsLabels in interface CommandExecutionContext

setUserParams

public void setUserParams(String[] userParams)
Specified by:
setUserParams in interface CommandExecutionContext

getUserParams

public String[] getUserParams()
Specified by:
getUserParams in interface CommandExecutionContext

setExpertMode

public void setExpertMode(boolean expertMode)

isExpertMode

public boolean isExpertMode()
Specified by:
isExpertMode in interface CommandExecutionContext

setCommandNotification

public void setCommandNotification(boolean commandNotification)
Specified by:
setCommandNotification in interface CommandExecutionContext

isCommandNotification

public boolean isCommandNotification()
Specified by:
isCommandNotification in interface CommandExecutionContext

setPromptForVarsForEachFile

public void setPromptForVarsForEachFile(boolean promptForVarsForEachFile)
Set whether to prompt the user for variables for each selected file. Set the initial default value in the VariableInputDialog.

Specified by:
setPromptForVarsForEachFile in interface CommandExecutionContext

isPromptForVarsForEachFile

public boolean isPromptForVarsForEachFile()
Whether to prompt the user for variables for each selected file. This value will be the default value in the VariableInputDialog and changing the value there will change the value returned.

Specified by:
isPromptForVarsForEachFile in interface CommandExecutionContext

getCommandsPool

public CommandsPool getCommandsPool()
Deprecated. For compatibility only

Get the CommandsPool associated with this filesystem.


setProcessUnimportantFiles

public void setProcessUnimportantFiles(boolean processUnimportantFiles)

isProcessUnimportantFiles

public boolean isProcessUnimportantFiles()

refreshExistingFolders

public void refreshExistingFolders()
Instruct FS to refrest folders, XXX asynchronous operation.


refreshExistingFolders

protected void refreshExistingFolders(String name)

isCreateBackupFilesSet

protected boolean isCreateBackupFilesSet()

isCreateBackupFiles

public boolean isCreateBackupFiles()

setCreateBackupFiles

public void setCreateBackupFiles(boolean createBackupFiles)

setOffLine

public void setOffLine(boolean offLine)

isOffLine

public boolean isOffLine()
Specified by:
isOffLine in interface CommandExecutionContext

getAutoRefresh

public int getAutoRefresh()
Get the mode of auto refresh.


setAutoRefresh

public void setAutoRefresh(int newAuto)
Set the mode of auto refresh.


isHideShadowFiles

public boolean isHideShadowFiles()
Whether to hide files, which does not exist locally.


setHideShadowFiles

public void setHideShadowFiles(boolean hideShadowFiles)
Set whether to hide files, which does not exist locally.


isShowDeadFiles

public boolean isShowDeadFiles()

setShowDeadFiles

public void setShowDeadFiles(boolean showDeadFiles)

getNumberOfFinishedCmdsToCollect

public int getNumberOfFinishedCmdsToCollect()

setNumberOfFinishedCmdsToCollect

public void setNumberOfFinishedCmdsToCollect(int numberOfFinishedCmdsToCollect)

getVFSMessageLength

public int getVFSMessageLength()

setVFSMessageLength

public void setVFSMessageLength(int newVal)

getVFSShowLocalFiles

public boolean getVFSShowLocalFiles()

setVFSShowLocalFiles

public void setVFSShowLocalFiles(boolean newVal)

getVFSShowMessage

public boolean getVFSShowMessage()

setVFSShowMessage

public void setVFSShowMessage(boolean newVal)

getVFSShowUnimportantFiles

public boolean getVFSShowUnimportantFiles()

setVFSShowUnimportantFiles

public void setVFSShowUnimportantFiles(boolean newVal)

getVFSShowDeadFiles

public boolean getVFSShowDeadFiles()

setVFSShowDeadFiles

public void setVFSShowDeadFiles(boolean newVal)

addRevisionListener

public void addRevisionListener(RevisionListener listener)

removeRevisionListener

public boolean removeRevisionListener(RevisionListener listener)

fireRevisionsChanged

public void fireRevisionsChanged(RevisionEvent event)

setNotModifiableStatuses

protected void setNotModifiableStatuses(Collection notModifiableStatuses)
VCS specifics set of statuses that does not undergo automatic transtition to [modified] on file edit. Example: [local], [needs patch]


setMissingFileStatus

protected void setMissingFileStatus(String missingFileStatus)

setMissingFolderStatus

protected void setMissingFolderStatus(String missingFolderStatus)

setNotMissingableFileStatuses

protected void setNotMissingableFileStatuses(Collection notMissingableFileStatuses)

setNotMissingableFolderStatuses

protected void setNotMissingableFolderStatuses(Collection notMissingableFolderStatuses)

getDoAutoRefresh

public boolean getDoAutoRefresh(String path)
Get whether to perform the auto-refresh in the given directory path.

Parameters:
path - The given directory path

setNumDoAutoRefresh

public void setNumDoAutoRefresh(int numDoAutoRefresh,
                                String path)
Set how many times I call a command after which the auto-refresh is executed in the given path.

Parameters:
numDoAutoRefresh - The number of auto-refreshes
path - The given directory path

getNumDoAutoRefresh

public int getNumDoAutoRefresh(String path)
Get the number of command calls after which perform the auto-refresh command in the given path.

Parameters:
path - The given path

removeNumDoAutoRefresh

public void removeNumDoAutoRefresh(String path)
Remove the number of command calls after which perform the auto-refresh command in the given path.

Parameters:
path - The given path

setVcsRefreshTime

protected final void setVcsRefreshTime(int ms)
Set the number of milliseconds between automatic refreshes of the directory structure. Replaces the functionality of setRefreshTime. You should not use setRefreshTime() in subclasses of VcsFileSystem at all! Use this method instead.

Parameters:
ms - number of milliseconds between two refreshes; if <= 0 then refreshing is disabled

getVcsRefreshTime

protected final int getVcsRefreshTime()
Get the number of milliseconds between automatic refreshes of the directory structure. Replaces the functionality of getRefreshTime. You should not use getRefreshTime() in subclasses of VcsFileSystem at all! Use this method instead. By default, automatic refreshing is disabled.

Returns:
the number of milliseconds, or 0 if refreshing is disabled

getExistingFolders

public Enumeration getExistingFolders()
Returns all existing files in the file system (both folders and data). Please note, that the name of this method is misguided. It does not return only existing folders, but also existing files.

Specified by:
getExistingFolders in interface org.netbeans.modules.vcscore.util.virtuals.VirtualsRefreshing

getExistingFiles

public Enumeration getExistingFiles()
Returns all existing files in the file system.

Specified by:
getExistingFiles in interface FileObjectExistence

doVirtualsRefresh

public void doVirtualsRefresh(FileObject fo)
Do the refresh of a folder.

Specified by:
doVirtualsRefresh in interface org.netbeans.modules.vcscore.util.virtuals.VirtualsRefreshing

getFSRoot

public String getFSRoot()
Return the working directory of the file system. To that, relative mountpoints are added later to enable compilation etc.


getRelativeMountPoint

public String getRelativeMountPoint()

setRelativeMountPoint

public void setRelativeMountPoint(String module)
                           throws PropertyVetoException,
                                  IOException
Throws:
PropertyVetoException
IOException

markUnimportant

public void markUnimportant(String name)
Specified by:
markUnimportant in interface AbstractFileSystem.Info

isImportant

public boolean isImportant(String name)
Returns true when the given file is sharable.

Parameters:
name - The file name relative to FS root

getStatusChangeRequestProcessor

public static RequestProcessor getStatusChangeRequestProcessor()
Get a special request processor, that is used to refresh the file status. This is necessary to prevent some kind of deadlocks, that can occure if the default RequestProcessor is used.


statusChanged

public void statusChanged(String path,
                          boolean recursively)
Perform refresh of status information on all children of a directory

Parameters:
path - the directory path

statusChanged

public void statusChanged(String name)
Fire status chnage information of a file. Batch to minimally 200ms chunks.

Parameters:
name - the full file name (path to root)

findExistingResource

public FileObject findExistingResource(String name)
Find the existing resource on this file system. This method is not much efficient, because it collects all existing FileObjects and search them for the desired one.


disableRefresh

public void disableRefresh()

enableRefresh

public void enableRefresh()

setRefreshTimeToSet

public void setRefreshTimeToSet()

setCustomRefreshTime

public void setCustomRefreshTime(int time)

getCustomRefreshTime

public int getCustomRefreshTime()

setZeroRefreshTime

public void setZeroRefreshTime()

getCommandsIO

protected InputOutput getCommandsIO()

debugClear

public void debugClear()
Clear the debug output.


debug

public void debug(String msg)
Print a debug output. If the debug property is true, the message is printed to the Output Window.

Specified by:
debug in interface CommandExecutionContext
Parameters:
msg - The message to print out.

debugErr

public void debugErr(String msg)
Print an error output. Force the message to print to the Output Window. The debug property is not considered.

Specified by:
debugErr in interface CommandExecutionContext
Parameters:
msg - the message to print out.

createReference

protected Reference createReference(FileObject fo)
Creates Reference. In FileSystem, which subclasses AbstractFileSystem, you can overload method createReference(FileObject fo) to achieve another type of Reference (weak, strong etc.)

Parameters:
fo - is FileObject. It`s reference yourequire to get.
Returns:
Reference to FileObject

getFileReference

protected final FileReference getFileReference(String name)
Utility method that find the fileobject reference and if it exists, retypes it to FileReference.

Parameters:
name - pathname of the resource.
Returns:
the FileReference instance if one exists or null

getStatusProvider

public FileStatusProvider getStatusProvider()
Get the provider of file status attributes.


getCacheFileName

public abstract String getCacheFileName(String path)
Get the full file path where cache information should be stored.

Returns:
the cache file path or null, if no disk cache should be used for this path

getCacheFileName

public abstract File getCacheFileName(File folder,
                                      String folderPath)
Get the full file path where cache information should be stored. Consults profile. It takes two parameters to avoid FileObject creations.

Parameters:
folder - subject of search
folderPath - io.file path relative to FS root.

initCacheIdStr

public String initCacheIdStr()
Initialize the identification of cache used. The default implementation returns a unique string each time it is called.

Returns:
the cache identification string

getCacheIdStr

public String getCacheIdStr()
Get the cache identification.


getCommandsProvider

public VcsCommandsProvider getCommandsProvider()
Specified by:
getCommandsProvider in interface CommandExecutionContext

getVcsFactory

public VcsFactory getVcsFactory()
Gets the default factory DefaultVcsFactory. Subclasses may override this to return different instance of VcsFactory.


init

protected void init()
Perform some initialization job. This method is called both when a new instance of this class is created and after deserialization. Subclasses should call super.init().


activate

public void activate(org.netbeans.modules.vcscore.objectintegrity.VcsObjectIntegritySupport objectIntegritySupport)
Specified by:
activate in interface org.netbeans.modules.vcscore.objectintegrity.VcsOISActivator

getVcsList

protected AbstractFileSystem.List getVcsList()

getVcsInfo

protected AbstractFileSystem.Info getVcsInfo()

notifyFSAdded

protected void notifyFSAdded()
Notifies this file system that it has been added to the repository. Since we can not rely on the addNotify() method (see issue #30763), this method was introduced to be notified when this FS is really added. Call super.notifyFSAdded() when you're extending this method. Do not call directly.


notifyFSRemoved

protected void notifyFSRemoved()
Notifies this file system that it has been removed from the repository. Since we can not rely on the removeNotify() method (see issue #30763), this method was introduced to be notified when this FS is really removed. Call super.notifyFSRemoved() when you're extending this method. Do not call directly.


createVersioningFileSystem

protected final void createVersioningFileSystem()

removeVersioningFileSystem

protected final void removeVersioningFileSystem()

setCreateRuntimeCommands

protected void setCreateRuntimeCommands(boolean createRuntimeCommands)

isCreateRuntimeCommands

public boolean isCreateRuntimeCommands()

setCreateVersioningSystem

protected void setCreateVersioningSystem(boolean createVersioningSystem)

isCreateVersioningSystem

protected boolean isCreateVersioningSystem()

getVersioningFileSystem

public VersioningFileSystem getVersioningFileSystem()

getVcsActionSupporter

protected VcsActionSupporter getVcsActionSupporter()

getVcsAttributes

protected VcsAttributes getVcsAttributes()

getPossibleFileStatuses

public String[] getPossibleFileStatuses()
Description copied from interface: org.netbeans.modules.vcscore.search.VcsSearchTypeFileSystem
It should return all possible VCS states in which the files in the filesystem can reside.

Specified by:
getPossibleFileStatuses in interface org.netbeans.modules.vcscore.search.VcsSearchTypeFileSystem

getPossibleFileStatusInfoMap

public Map getPossibleFileStatusInfoMap()
Get the map of possible pairs of status name and corresponding FileStatusInfo object.

Specified by:
getPossibleFileStatusInfoMap in interface CommandExecutionContext

getPossibleFileStatusInfos

public Set getPossibleFileStatusInfos()
Get the set of all possible FileStatusInfo objects.


getGenericStatusTranslation

public Map getGenericStatusTranslation()
Get the map of generic file status names (that are defined in FileStatusInfo class) as keys and translated file status names (that are provided in the possibleFileStatusInfos set) as values.


setPossibleFileStatusInfos

protected final void setPossibleFileStatusInfos(Set fileStatusInfos,
                                                Map genericStatusTranslation)
Set a set of all possible FileStatusInfo objects. Also a translation of generic status names to provided possible status names is supplied.

Parameters:
fileStatusInfos - The set of FileStatusInfo objects
genericStatusTranslation - The map of generic file status names (that are defined in FileStatusInfo class) as keys and translated file status names (that are provided in the fileStatusInfos set) as values.

setDebug

public void setDebug(boolean debug)

getDebug

public boolean getDebug()

getEnvironmentVars

public String[] getEnvironmentVars()
Get the environment variables and their values in the form: "VAR1=Value1", "VAR2=Value2", etc.

Specified by:
getEnvironmentVars in interface CommandExecutionContext

addEnvironmentVar

public void addEnvironmentVar(String key,
                              String value)

setEnvironmentVar

public void setEnvironmentVar(String key,
                              String value)

getVariables

public Vector getVariables()
Description copied from interface: CommandExecutionContext
If this is FileSystem, take it from there! If not, get abolute paths. If the execution context is a filesystem, it may wish to String convertFileToPath(java.io.File file); String convertFileToPath(FileObject file);

Specified by:
getVariables in interface CommandExecutionContext

getVarValueAdjustment

public VariableValueAdjustment getVarValueAdjustment()
Get the variable value adjustment utility object.

Specified by:
getVarValueAdjustment in interface CommandExecutionContext

variableChanged

public void variableChanged(String name)
Notify the filesystem, that an variable has changed and should be saved.

Parameters:
name - the name of a changed variables. If null we suppose, that all variables changed.

setVariables

public void setVariables(Vector variables)
Set the file system's variables.

Specified by:
setVariables in interface CommandExecutionContext
Parameters:
variables - the vector of VcsConfigVariable objects.

substractRootDir

public static String substractRootDir(String rDir,
                                      String module)

getVariablesAsHashtable

public Hashtable getVariablesAsHashtable()
Specified by:
getVariablesAsHashtable in interface CommandExecutionContext

setPassword

public void setPassword(String password)
Specified by:
setPassword in interface CommandExecutionContext

getPassword

public String getPassword()
Specified by:
getPassword in interface CommandExecutionContext

setRememberPassword

public void setRememberPassword(boolean remember)

isRememberPassword

public boolean isRememberPassword()

getPasswordDescription

public String getPasswordDescription()
Get the description of the password, typically the name of the service that requests the password.

This method returns null by default, subclasses are expected to override this method and return meaningful value.

Specified by:
getPasswordDescription in interface CommandExecutionContext
Returns:
The description or null when no description is available.

filePromptDocumentCleanup

public void filePromptDocumentCleanup(JTextArea ta,
                                      int promptNum,
                                      Object docIdentif)
Allows some cleanup of the document which the user is asked for. doc The Document promptNum the order of the document docIdentif some identification that can be set in settting the listener.

Specified by:
filePromptDocumentCleanup in interface VariableInputDialog.FilePromptDocumentListener

warnDirectoriesDoNotExists

protected void warnDirectoriesDoNotExists()

getAnnotationPattern

public String getAnnotationPattern()

setAnnotationPattern

public void setAnnotationPattern(String annotationPattern)
                          throws IllegalArgumentException
Throws:
IllegalArgumentException

getMultiFileAnnotationTypes

public int[] getMultiFileAnnotationTypes()

setMultiFileAnnotationTypes

public void setMultiFileAnnotationTypes(int[] multiFileAnnotationTypes)

getStatus

public FileSystem.Status getStatus()

getStatus

public String getStatus(FileObject fo)

getStates

public String[] getStates(DataObject dobj)
Get states of all important files inside the DataObject. To get the status, wait for the status reader command if necessary.

Specified by:
getStates in interface org.netbeans.modules.vcscore.search.VcsSearchTypeFileSystem
Parameters:
dobj - The DataObject
Returns:
The list of important files states. The order of files is kept unchanged.

annotateIcon

public Image annotateIcon(Image icon,
                          int iconType,
                          Set files)
Specified by:
annotateIcon in interface FileSystem.Status

annotateNameHtml

public String annotateNameHtml(String name,
                               Set files)
Specified by:
annotateNameHtml in interface FileSystem.HtmlStatus

findFileObject

public FileObject findFileObject(String fullName)
Find the file object from a file path.

Parameters:
fullName - the full path to the file
Returns:
the file object of that file

annotateName

public String annotateName(String name,
                           Set files)
Annotate the set of files with additional version control attributes.

Specified by:
annotateName in interface FileSystem.Status
Parameters:
name - the original annotation
files - the files to annotate
Returns:
the annotation string

getActions

public SystemAction[] getActions()
Get the VCS actions.

Returns:
the actions retrieved from VcsFactory.getActions(null)

getActions

public SystemAction[] getActions(Set fos)
Get the VCS actions on a collection of FileObjects.

Parameters:
fos - the collection of FileObjects to act on.
Returns:
the actions retrieved from VcsFactory.getActions(fos)

computeDisplayName

protected String computeDisplayName()

getDisplayName

public final String getDisplayName()
Get a human presentable name of the file system


setRootDirectory

public void setRootDirectory(File r)
                      throws PropertyVetoException,
                             IOException
Set the root directory of the file system. It adds the module name to the parameter.

Parameters:
r - file to set root to plus module name
Throws:
PropertyVetoException - if the value if vetoed by someone else (usually by the Repository)
IOException - if the root does not exists or some other error occured

setRootDirectory

protected final void setRootDirectory(File r,
                                      boolean forceToSet)
                               throws PropertyVetoException,
                                      IOException
Set the root directory of the file system. It adds the module name to the parameter.

Parameters:
r - file to set root to plus module name
Throws:
PropertyVetoException - if the value if vetoed by someone else (usually by the Repository)
IOException - if the root does not exists or some other error occured

setAdjustedSystemName

public void setAdjustedSystemName(String name)
Modified to never throw PropertyVetoException by the name adjustment.


getRootDirectory

public File getRootDirectory()
Get the root directory of the file system.

Returns:
root directory

setReadOnly

public void setReadOnly(boolean flag)
Set whether the file system should be read only.

Parameters:
flag - true if it should

isReadOnly

public boolean isReadOnly()

computeSystemName

protected String computeSystemName(File rootFile)
Compute the system name of this file system for a given root directory.

The default implementation simply returns the filename separated by slashes or looks for special system name annotation variable. This method also assures, that the system name will be unique among mounted filesystems. Thus when this filesystem will be mounted it will not be invalidated.

Parameters:
rootFile - root directory for the filesystem
Returns:
system name for the filesystem
See Also:
FileSystem.setSystemName(java.lang.String)

setPreferredSystemName

public void setPreferredSystemName(String preferredSystemName)
Set a preferred system name of the filesystem. This have higher priority then VAR_FS_SYSTEM_NAME_ANNOTATION.


getPreferredSystemName

public String getPreferredSystemName()
Get a preferred system name of the filesystem. This have higher priority then VAR_FS_SYSTEM_NAME_ANNOTATION.


getFile

public File getFile(String name)
Get file representation for given string name.

Parameters:
name - the name
Returns:
the file

children

public String[] children(String name)
Specified by:
children in interface AbstractFileSystem.List

lockFilesToBeModified

public void lockFilesToBeModified(String path,
                                  boolean recursively)
Lock the files so that they can not be modified in the IDE. This is necessary for commands, that make changes to the processed files. It's crutial, that the file does not get modified twice - externally via the update command and internally (e.g. through the Editor). One MUST call unlockFilesToBeModified(java.lang.String, boolean) after the command finish.

Parameters:
path - The path of the file to be locked or directory in which all files will be locked.
recursively - Whether the files in directories should be locked recursively.

unlockFilesToBeModified

public void unlockFilesToBeModified(String path,
                                    boolean recursively)
Unlock the files that were previously locked by lockFilesToBeModified(java.lang.String, boolean) method. It's necessary to call this method with appropriate arguments after the command finish so that the user can edit the files.


checkForModifications

public void checkForModifications(String path)
Should be called when the modification in a file or folder is expected and its content should be refreshed.

Specified by:
checkForModifications in interface CommandExecutionContext

checkForModifications

public void checkForModifications(String path,
                                  boolean recursively,
                                  boolean refreshData,
                                  boolean refreshFolders)
Should be called when the modification in a file or folder is expected and its content should be refreshed.


addFilesStructureModificationListener

public final void addFilesStructureModificationListener(ChangeListener chl)
Specified by:
addFilesStructureModificationListener in interface FilesModificationSupport

removeFilesStructureModificationListener

public final void removeFilesStructureModificationListener(ChangeListener chl)
Specified by:
removeFilesStructureModificationListener in interface FilesModificationSupport

fireFilesStructureModified

protected final void fireFilesStructureModified(File file)

createFolder

public void createFolder(String name)
                  throws IOException
Specified by:
createFolder in interface AbstractFileSystem.Change
Throws:
IOException

createData

public void createData(String name)
                throws IOException
Create new data file.

Specified by:
createData in interface AbstractFileSystem.Change
Parameters:
name - name of the file
Returns:
the new data file object
Throws:
IOException - if the file cannot be created (e.g. already exists)

rename

public void rename(String oldName,
                   String newName)
            throws IOException
Rename a file.

Specified by:
rename in interface AbstractFileSystem.Change
Parameters:
oldName - old name of the file
newName - new name of the file
Throws:
IOException

delete

public void delete(String name)
            throws IOException
Delete working file. Versioned file must change its status to missing. In all cases a VCS-API DELETE hook is consulted.

Specified by:
delete in interface AbstractFileSystem.Change
Parameters:
name - name of the file
Throws:
IOException - if the file could not be deleted

deleteFile

protected boolean deleteFile(File file,
                             String name)
                      throws IOException
Throws:
IOException

callDeleteCommand

protected void callDeleteCommand(String name,
                                 boolean isDir)
When a file or folder was deleted, a command DELETE_FILE or DELETE_DIR is called. Subclasses can do their own actions here.


lastModified

public Date lastModified(String name)
Get last modification time.

Specified by:
lastModified in interface AbstractFileSystem.Info
Parameters:
name - the file to test
Returns:
the date

folder

public boolean folder(String name)
Test if the file is folder or contains data.

Specified by:
folder in interface AbstractFileSystem.Info
Parameters:
name - name of the file
Returns:
true if the file is folder, false otherwise

readOnly

public boolean readOnly(String name)
Test whether this file can be written to or not. All folders are not read only, they are created before writting into them.

Specified by:
readOnly in interface AbstractFileSystem.Info
Parameters:
name - the file to test
Returns:
true if file is read-only

mimeType

public String mimeType(String name)
Specified by:
mimeType in interface AbstractFileSystem.Info

size

public long size(String name)
Get the size of a file.

Specified by:
size in interface AbstractFileSystem.Info
Parameters:
name - the file to test
Returns:
the size of the file in bytes or zero if the file does not contain data (does not exist or is a folder).

inputStream

public InputStream inputStream(String name)
                        throws FileNotFoundException
Get input stream to a file.

Specified by:
inputStream in interface AbstractFileSystem.Info
Parameters:
name - the file to test
Returns:
an input stream to read the contents of this file
Throws:
FileNotFoundException - if the file does not exists or is invalid

getBackupExtension

protected String getBackupExtension()

createBackupFile

protected void createBackupFile(String name)
                         throws IOException
Throws:
IOException

outputStream

public OutputStream outputStream(String name)
                          throws IOException
Get output stream to a file.

Specified by:
outputStream in interface AbstractFileSystem.Info
Parameters:
name - the file to test
Returns:
output stream to overwrite the contents of this file
Throws:
IOException - if an error occures (the file is invalid, etc.)

lockerMatch

public static boolean lockerMatch(String lockerAttribute,
                                  String lockerUserName)
Test whether the current user has locked file with given locker attribute.

Parameters:
lockerAttribute - The file locker attribute. It can contain more lockers separated by commas.
lockerUserName - The locker user name, or null when the system user name should be taken.
Returns:
Whether there is the locker user name one of the lockers in the locker attribute.

shouldLock

protected boolean shouldLock(String name)
Whether the LOCK command should be performed for this file. This method should check whether the file is already locked.

The default implementation search for the locker status and compare with the user name stored in VAR_LOCKER_USER_NAME variable or user.name system property. The fact, that the locker property can contain more locker user names delimited by commas is taken into account.

Returns:
true if the file is not locked yet and lock command should run.

lock

public void lock(String name)
          throws IOException
Run the LOCK command to lock the file.

Specified by:
lock in interface AbstractFileSystem.Info
Parameters:
name - name of the file
Throws:
IOException

unlock

public void unlock(String name)
Call the UNLOCK command to unlock the file.

Specified by:
unlock in interface AbstractFileSystem.Info
Parameters:
name - name of the file

turboChanged

public void turboChanged(TurboEvent e)
Does nothing to mark the file as unimportant.

Specified by:
turboChanged in interface TurboListener

setCommands

public void setCommands(CommandsTree root)
Set the tree structure of commands.

Parameters:
root - the tree of VcsCommandNode objects.

getCommands

public CommandsTree getCommands()
Get the commands.

Returns:
the root command

getCommand

public VcsCommand getCommand(String name)
Deprecated. Retained for compatibility reasons only to be able to use the old VCS "API" for commands execution. Use #getCommandSupport() instead.

Get a command by its name.

Specified by:
getCommand in interface CommandExecutionContext
Parameters:
name - the name of the command to get
Returns:
the command of the given name or null, when the command is not defined

getCommandSupport

public CommandSupport getCommandSupport(String name)
Get a command support by it's name.

Specified by:
getCommandSupport in interface CommandExecutionContext
Parameters:
name - the name of the command to get
Returns:
the command support of the given name or null, when the command support is not defined

setAdditionalFileFilter

protected final void setAdditionalFileFilter(FilenameFilter additionalFileFilter)
The subclasses can define their own filename filter. This additional filename filter can be set through this method.


getFileFilter

public FilenameFilter getFileFilter()
Get the filename filter of this file system. This file system does not filter these files itself.


checkVirtual

protected boolean checkVirtual(String name)
This method is called from AbstractFileObject.isVirtual. Tests if file really exists or is missing. Some operation on it may be restricted if returns true.

Parameters:
name - of the file
Returns:
true indicates that the file is missing.

checkVirtualFiles

protected final void checkVirtualFiles(Collection foSet)
Perform the check of whether the file is or is not still virtual. This method is called on every file status change with the set of potentially changed files. This method does nothing, subclasses may override it with some meaningfull action (e.g. call setVirtualDataLoader() and invalidate the current DataObject if the setVirtualDataLoader() returns true).

Parameters:
foSet - set of FileObjects whose status was changed

getBundleProperty

public String getBundleProperty(String s)

getBundleProperty

public String getBundleProperty(String s,
                                Object obj)

getIgnoreListSupport

public VcsFileSystem.IgnoreListSupport getIgnoreListSupport()

setIgnoreListSupport

public void setIgnoreListSupport(VcsFileSystem.IgnoreListSupport support)

g

protected String g(String s)

g

protected String g(String s,
                   Object obj)

g

protected String g(String s,
                   Object obj1,
                   Object obj2)

g

protected String g(String s,
                   Object obj1,
                   Object obj2,
                   Object obj3)

 

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