|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.statsvn.util.SvnPropgetUtils
public class SvnPropgetUtils
Utilities class that manages calls to svn propget. Used to find binary files.
Field Summary | |
---|---|
protected java.util.List |
binaryFiles
|
protected ISvnProcessor |
processor
|
Constructor Summary | |
---|---|
SvnPropgetUtils(ISvnProcessor processor)
Invokes propget via the svn propget via the command line. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List binaryFiles
protected ISvnProcessor processor
Constructor Detail |
---|
public SvnPropgetUtils(ISvnProcessor processor)
Method Detail |
---|
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
java.io.IOException
path
- a file on disk which contains the results of an svn propgetprotected 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 filename
protected 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |