Class AbstractPatcher
- java.lang.Object
-
- jetbrains.buildServer.vcs.patches.InterruptablePatcherBase
-
- jetbrains.buildServer.vcs.patches.AbstractPatcher
-
- All Implemented Interfaces:
Patcher
- Direct Known Subclasses:
VerifyingPatcher
public abstract class AbstractPatcher extends InterruptablePatcherBase implements Patcher
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractPatcher(DataInputStream input)
protected
AbstractPatcher(LowLevelPatcher input)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
addDirectory(String filePath)
void
applyPatch()
Applies patch.void
close()
Disposes the patcher process.protected abstract void
deleteFile(String filePath, boolean deleteParentDirectoryIfEmpty, boolean isFile)
void
interrupt()
Interrupts patching process.protected void
patchFailed(String message)
protected void
patchSucceeded(String message)
protected abstract void
renameFile(String filePath, String newPath, boolean deleteParentDirectoryIfEmpty, boolean isFile)
protected abstract void
replaceBinary(String filePath, long length, boolean newFile, LowLevelPatcherListener.ReadFileContent content)
protected abstract void
replaceTextUsingBytes(String filePath, long size, byte[] sep, boolean newFile, LowLevelPatcherListener.ReadFileContent content)
protected abstract void
setFileMode(String filePath, String fileMode)
protected abstract void
setTimeStamp(String filePath, long timeStamp)
-
Methods inherited from class jetbrains.buildServer.vcs.patches.InterruptablePatcherBase
checkInterrupted
-
-
-
-
Constructor Detail
-
AbstractPatcher
protected AbstractPatcher(@NotNull DataInputStream input)
-
AbstractPatcher
protected AbstractPatcher(@NotNull LowLevelPatcher input)
-
-
Method Detail
-
replaceTextUsingBytes
protected abstract void replaceTextUsingBytes(@NotNull String filePath, long size, @NotNull byte[] sep, boolean newFile, @NotNull LowLevelPatcherListener.ReadFileContent content) throws IOException
- Throws:
IOException
-
setFileMode
protected abstract void setFileMode(@NotNull String filePath, @NotNull String fileMode) throws IOException
- Throws:
IOException
-
replaceBinary
protected abstract void replaceBinary(@NotNull String filePath, long length, boolean newFile, @NotNull LowLevelPatcherListener.ReadFileContent content) throws IOException
- Throws:
IOException
-
setTimeStamp
protected abstract void setTimeStamp(@NotNull String filePath, long timeStamp) throws IOException
- Throws:
IOException
-
deleteFile
protected abstract void deleteFile(@NotNull String filePath, boolean deleteParentDirectoryIfEmpty, boolean isFile) throws IOException
- Throws:
IOException
-
renameFile
protected abstract void renameFile(@NotNull String filePath, @NotNull String newPath, boolean deleteParentDirectoryIfEmpty, boolean isFile) throws IOException
- Throws:
IOException
-
addDirectory
protected abstract void addDirectory(@NotNull String filePath) throws IOException
- Throws:
IOException
-
applyPatch
public void applyPatch() throws IOException
Description copied from interface:Patcher
Applies patch.- Specified by:
applyPatch
in interfacePatcher
- Throws:
IOException
- some file system operation failed or patch process terminated with see jetbrains.buildServer.vcs.patches.InterruptedPatchException or some problem occurred during the patch process (see jetbrains.buildServer.vcs.patches.UnsuccessfulPatchException).
-
patchFailed
protected void patchFailed(@NotNull String message)
-
patchSucceeded
protected void patchSucceeded(@NotNull String message)
-
close
public void close()
Description copied from interface:Patcher
Disposes the patcher process.
-
interrupt
public void interrupt()
Description copied from interface:Patcher
Interrupts patching process.Patcher.applyPatch()
may throw {see jetbrains.buildServer.vcs.patches.InterruptedPatchException}- Specified by:
interrupt
in interfacePatcher
- Overrides:
interrupt
in classInterruptablePatcherBase
-
-