public class SvnPropgetUtils extends java.lang.Object implements ISvnPropgetProcessor
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
binaryFiles |
protected ISvnProcessor |
processor |
Constructor and Description |
---|
SvnPropgetUtils(ISvnProcessor processor)
Invokes propget via the svn propget via the command line.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getBinaryFilename(java.lang.String currentLine,
boolean removeRoot)
Given a string such as: "lib\junit.jar - application/octet-stream" or
"svn:\\host\repo\lib\junit.jar - application/octet-stream" will return
the filename if the mime type is binary (doesn't end with text/*)
Will return the filename with / was a directory seperator.
|
java.util.List |
getBinaryFiles()
Returns the list of binary files in the working directory.
|
protected ProcessUtils |
getFileMimeTypes()
Get the svn:mime-types for all files, latest revision.
|
protected ProcessUtils |
getFileMimeTypes(java.lang.String revision,
java.lang.String filename)
Get the svn:mime-type for a certain file (leave null for all files).
|
protected ISvnProcessor |
getProcessor() |
boolean |
isBinaryFile(java.lang.String revision,
java.lang.String filename)
It was first thought that a the mime-type of a file's previous revision
could be found.
|
protected void |
loadBinaryFiles(ProcessUtils pUtils)
Loads the list of binary files from the input stream equivalent to an svn
propget command.
|
void |
loadBinaryFiles(java.lang.String path)
Loads the list of binary files from the input stream equivalent to an svn
propget command.
|
protected java.util.List binaryFiles
protected ISvnProcessor processor
public SvnPropgetUtils(ISvnProcessor processor)
protected ISvnProcessor getProcessor()
protected ProcessUtils getFileMimeTypes()
protected ProcessUtils getFileMimeTypes(java.lang.String revision, java.lang.String filename)
revision
- revision for which to query;filename
- the filename (or null for all files)public java.util.List getBinaryFiles()
ISvnPropgetProcessor
getBinaryFiles
in interface ISvnPropgetProcessor
public void loadBinaryFiles(java.lang.String path) throws java.io.IOException
loadBinaryFiles
in interface ISvnPropgetProcessor
path
- a file on disk which contains the results of an svn propgetjava.io.IOException
protected void loadBinaryFiles(ProcessUtils pUtils)
stream
- stream equivalent to an svn propget commandpublic boolean isBinaryFile(java.lang.String revision, java.lang.String filename)
ISvnPropgetProcessor
isBinaryFile
in interface ISvnPropgetProcessor
revision
- the revision to queryfilename
- the filenameprotected java.lang.String getBinaryFilename(java.lang.String currentLine, boolean removeRoot)
currentLine
- the line obtained from svn propget svn:mime-typeremoveRoot
- if true, will remove any repository prefix