jetbrains.buildServer.vcs.patches
Interface PatchBuilderBase

All Known Subinterfaces:
PatchBuilder
All Known Implementing Classes:
AbstractPatchBuilder, PatchBuilderAdapter, PatchBuilderFileNamesCorrector

public interface PatchBuilderBase

Author:
Eugene Petrenko Created: 19.02.2010 15:38:26

Method Summary
 void createDirectory(java.io.File file)
          Invoke this method if some directory has been created in the next version as compared with the previous one.
 void deleteDirectory(java.io.File file, boolean deleteParentDirectoryIfEmpty)
          Invoke this method if some directory has been deleted in the next version as compared with the previous one.
 void deleteFile(java.io.File file, boolean deleteParentDirectoryIfEmpty)
          Invoke this method if some file has been deleted in the next version as compared with the previous one.
 void renameDirectory(java.io.File file, java.io.File newFile, boolean deleteParentDirectoryIfEmpty)
          Invoke this method if some directory has been renamed in the next version as compared with the previous one.
 void renameFile(java.io.File file, java.io.File newFile, boolean deleteParentDirectoryIfEmpty)
          Invoke this method if some file has been renamed in the next version as compared with the previous one.
 void setLastModified(java.io.File currentRelativeFile, long time)
          Set last modified timstamp for file
 void setWorkingDirectory(java.io.File workingDir, boolean createDirectory)
          Allows you to switch on to the specified directory keeping old content of this directory.
 

Method Detail

deleteFile

void deleteFile(java.io.File file,
                boolean deleteParentDirectoryIfEmpty)
                throws java.io.IOException
Invoke this method if some file has been deleted in the next version as compared with the previous one.

Parameters:
file - file relative to the current working directory.
deleteParentDirectoryIfEmpty - pass true if you want patcher to delete parent directory if it became empty after the deletion.
Throws:
java.io.IOException - thrown if patch collecting process failed.

deleteDirectory

void deleteDirectory(java.io.File file,
                     boolean deleteParentDirectoryIfEmpty)
                     throws java.io.IOException
Invoke this method if some directory has been deleted in the next version as compared with the previous one.

Parameters:
file - directory relative to the current working directory.
deleteParentDirectoryIfEmpty - pass true if you want patcher to delete parent directory if it became empty after the deletion.
Throws:
java.io.IOException - thrown if patch collecting process failed.

createDirectory

void createDirectory(java.io.File file)
                     throws java.io.IOException
Invoke this method if some directory has been created in the next version as compared with the previous one.

Parameters:
file - file relative to the current working directory.
Throws:
java.io.IOException - thrown if patch collecting process failed.

renameFile

void renameFile(java.io.File file,
                java.io.File newFile,
                boolean deleteParentDirectoryIfEmpty)
                throws java.io.IOException
Invoke this method if some file has been renamed in the next version as compared with the previous one.

Parameters:
file - file relative to the current working directory.
newFile - new file location
deleteParentDirectoryIfEmpty - pass true if you want patcher to delete parent directory if it becomes empty after the deletion.
Throws:
java.io.IOException - thrown if patch collecting process failed.

renameDirectory

void renameDirectory(java.io.File file,
                     java.io.File newFile,
                     boolean deleteParentDirectoryIfEmpty)
                     throws java.io.IOException
Invoke this method if some directory has been renamed in the next version as compared with the previous one.

Parameters:
file - directory relative to the current working directory.
newFile - new directory location
deleteParentDirectoryIfEmpty - pass true if you want patcher to delete parent directory if it becomes empty after the deletion. @throws IOException
Throws:
java.io.IOException - thrown if patch collecting process failed.

setWorkingDirectory

void setWorkingDirectory(java.io.File workingDir,
                         boolean createDirectory)
                         throws java.io.IOException
Allows you to switch on to the specified directory keeping old content of this directory.

Parameters:
workingDir - new working directory. Path relative to the initial directory, not to the current one.
createDirectory - if directory should be created on file system if specified directory is absent.
Throws:
java.io.IOException - thrown if patch collecting process failed.

setLastModified

void setLastModified(java.io.File currentRelativeFile,
                     long time)
                     throws java.io.IOException
Set last modified timstamp for file

Parameters:
currentRelativeFile - relative file
time - last moified timestamp
Throws:
java.io.IOException - in case of error