|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjetbrains.buildServer.vcs.AbstractPatchBuilder
jetbrains.buildServer.vcs.PatchBuilderFileNamesCorrector
public class PatchBuilderFileNamesCorrector
Service class, helps to build patches and do not map full file path to relative path in agent working direcotory
| Constructor Summary | |
|---|---|
PatchBuilderFileNamesCorrector(PatchBuilder original)
Creates corrector instance. |
|
| Method Summary | |
|---|---|
void |
changeOrCreateBinaryFile(java.io.File file,
java.lang.String fileMode,
java.io.InputStream input,
long length)
Invoke this method if some binary file content has been changed or binary file has been created in the next version as compared with the previous one. |
void |
changeOrCreateTextFile(java.io.File localFile,
java.lang.String fileMode,
java.io.InputStream input,
long length,
byte[] lineSeparator)
Invoke this method if some text file content has been changed or text file has been created in the next version as compared with the previous one. |
void |
createBinaryFile(java.io.File file,
java.lang.String fileMode,
java.io.InputStream input,
long length)
Invoke this method if some binary file content has been created in the next version as compared with the previous one. |
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 |
createTextFile(java.io.File file,
java.lang.String fileMode,
java.io.InputStream input,
long length,
byte[] lineSeparator)
Invoke this method if some text file 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 |
setWorkingMode_Default()
Corrector does nothing with parthes. |
void |
setWorkingMode_WithCheckoutRules(CheckoutRules checkoutRules)
File path is full for vcs root. |
void |
setWorkingMode_WithIncludeRule(IncludeRule includeRule)
'From' part of specified include rule is already cut from file path. |
| Methods inherited from class jetbrains.buildServer.vcs.AbstractPatchBuilder |
|---|
getPathInCurrentWorkingDirectory, setWorkingDirectory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PatchBuilderFileNamesCorrector(PatchBuilder original)
original - patch builder to delegate activity to.| Method Detail |
|---|
public void deleteFile(java.io.File file,
boolean deleteParentDirectoryIfEmpty)
throws java.io.IOException
PatchBuilderBase
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.
java.io.IOException - thrown if patch collecting process failed.
public void setLastModified(java.io.File currentRelativeFile,
long time)
throws java.io.IOException
PatchBuilderBase
currentRelativeFile - relative filetime - last moified timestamp
java.io.IOException - in case of error
public void deleteDirectory(java.io.File file,
boolean deleteParentDirectoryIfEmpty)
throws java.io.IOException
PatchBuilderBase
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.
java.io.IOException - thrown if patch collecting process failed.
public void changeOrCreateTextFile(java.io.File localFile,
java.lang.String fileMode,
java.io.InputStream input,
long length,
byte[] lineSeparator)
throws java.io.IOException
PatchBuilder
localFile - file relative to the current working directoryfileMode - file mode in the linux style. If it doesn't matter for you set it to null.
Set this parameter to not null if its value changes something, for example, pass "ugo+x" if you want the file to be executable
and null otherwise. It is performance issue because set file mode will create a lot of processes on the Linux.input - input stream containing the file content. This stream is guaranteed to be utilized within the call.
So it can be safely closed/destroyed right after the invocation.length - length of the content.lineSeparator - text content line separator. Set null if you want to use system dependant separators. Use "changeOrCreateBinaryFile"
if you want file to keep existing separators.
java.io.IOException - thrown if patch collecting process failed.
public void changeOrCreateBinaryFile(java.io.File file,
java.lang.String fileMode,
java.io.InputStream input,
long length)
throws java.io.IOException
PatchBuilder
file - file relative to the current working directory.fileMode - file mode in the linux style. If it doesn't matter for you set it to null.
Set this parameter to not null if its value changes something, for example, pass "ugo+x" if you want the file to be executable
and null otherwise. It is performance issue because set file mode will create a lot of processes on the Linux.input - input stream containing the file content. This stream is guaranteed to be utilized within the call.
So it can be safely closed/destroyed right after the invocation.length - length of the content.
java.io.IOException - thrown if patch collecting process failed.
public void createDirectory(java.io.File file)
throws java.io.IOException
PatchBuilderBase
file - file relative to the current working directory.
java.io.IOException - thrown if patch collecting process failed.
public void createBinaryFile(java.io.File file,
java.lang.String fileMode,
java.io.InputStream input,
long length)
throws java.io.IOException
PatchBuilder
file - file relative to the current working directory.fileMode - file mode in the linux style. If it doesn't matter for you set it to null.
Set this parameter to not null if its value changes something, for example, pass "ugo+x" if you want the file to be executable
and null otherwise. It is performance issue because set file mode will create a lot of processes on the Linux.input - input stream containing the file content. This stream is guaranteed to be utilized within the call.
So it can be safely closed/destroyed right after the invocation.length - length of the content.
java.io.IOException - thrown if patch collecting process failed.
public void createTextFile(java.io.File file,
java.lang.String fileMode,
java.io.InputStream input,
long length,
byte[] lineSeparator)
throws java.io.IOException
PatchBuilder
file - file relative to the current working directoryfileMode - file mode in the linux style. If it doesn't matter for you set it to null.
Set this parameter to not null if its value changes something, for example, pass "ugo+x" if you want the file to be executable
and null otherwise. It is performance issue because set file mode will create a lot of processes on the Linux.input - input stream containing the file content. This stream is guaranteed to be utilized within the call.
So it can be safely closed/destroyed right after the invocation.length - length of the content.lineSeparator - text content line separator. Set null if you want to use system dependant separators. Use "createBinaryFile"
if you want file to keep existing separators.
java.io.IOException - thrown if patch collecting process failed.
public void renameFile(java.io.File file,
java.io.File newFile,
boolean deleteParentDirectoryIfEmpty)
throws java.io.IOException
PatchBuilderBase
file - file relative to the current working directory.newFile - new file locationdeleteParentDirectoryIfEmpty - pass true if you want patcher to delete parent
directory if it becomes empty after the deletion.
java.io.IOException - thrown if patch collecting process failed.
public void renameDirectory(java.io.File file,
java.io.File newFile,
boolean deleteParentDirectoryIfEmpty)
throws java.io.IOException
PatchBuilderBase
file - directory relative to the current working directory.newFile - new directory locationdeleteParentDirectoryIfEmpty - pass true if you want patcher to delete parent
directory if it becomes empty after the deletion. @throws IOException
java.io.IOException - thrown if patch collecting process failed.
public void setWorkingMode_WithIncludeRule(@NotNull
IncludeRule includeRule)
includeRule - current processing include rule
public void setWorkingMode_WithCheckoutRules(@NotNull
CheckoutRules checkoutRules)
checkoutRules - current processing checkout rulespublic void setWorkingMode_Default()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||