net.sf.statsvn.util
Class SvnStartupUtils

java.lang.Object
  extended by net.sf.statsvn.util.SvnStartupUtils
All Implemented Interfaces:
ISvnVersionProcessor
Direct Known Subclasses:
SvnKitVersion

public class SvnStartupUtils
extends java.lang.Object
implements ISvnVersionProcessor

Utility class that verifies if the correct version of subversion is used.

 

Field Summary
protected  ISvnProcessor processor
           
static java.lang.String SVN_MINIMUM_VERSION
           
static java.lang.String SVN_MINIMUM_VERSION_DIFF_PER_REV
           
 
Constructor Summary
SvnStartupUtils(ISvnProcessor processor)
          Invokes various calls needed during StatSVN's startup, including the svn version command line.
 
Method Summary
 boolean checkDiffPerRevPossible(java.lang.String version)
          Verifies that the given version supports one diff per revision (version>=1.4.0)
 java.lang.String checkSvnVersionSufficient()
          Verifies that the current revision of SVN is SVN_MINIMUM_VERSION
protected  ISvnProcessor getProcessor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SVN_MINIMUM_VERSION

public static final java.lang.String SVN_MINIMUM_VERSION
See Also:
Constant Field Values

SVN_MINIMUM_VERSION_DIFF_PER_REV

public static final java.lang.String SVN_MINIMUM_VERSION_DIFF_PER_REV
See Also:
Constant Field Values

processor

protected ISvnProcessor processor
Constructor Detail

SvnStartupUtils

public SvnStartupUtils(ISvnProcessor processor)
Invokes various calls needed during StatSVN's startup, including the svn version command line.

Method Detail

getProcessor

protected ISvnProcessor getProcessor()

checkSvnVersionSufficient

public java.lang.String checkSvnVersionSufficient()
                                           throws SvnVersionMismatchException
Description copied from interface: ISvnVersionProcessor
Verifies that the current revision of SVN is SVN_MINIMUM_VERSION

Specified by:
checkSvnVersionSufficient in interface ISvnVersionProcessor
Throws:
SvnVersionMismatchException - if SVN executable not found or version less than SVN_MINIMUM_VERSION
Returns:
the version string

checkDiffPerRevPossible

public boolean checkDiffPerRevPossible(java.lang.String version)
Description copied from interface: ISvnVersionProcessor
Verifies that the given version supports one diff per revision (version>=1.4.0)

Specified by:
checkDiffPerRevPossible in interface ISvnVersionProcessor
Parameters:
version - the current version
Returns:
true if one can do an svn diff per revision