JHotDraw 6.0b1

org.jhotdraw.util
Class StandardVersionControlStrategy

java.lang.Object
  extended by org.jhotdraw.util.StandardVersionControlStrategy
All Implemented Interfaces:
VersionControlStrategy

public class StandardVersionControlStrategy
extends java.lang.Object
implements VersionControlStrategy


Constructor Summary
StandardVersionControlStrategy(VersionRequester newVersionRequester)
           
 
Method Summary
 void assertCompatibleVersion()
          Define a strategy how to select those versions of JHotDraw with which they are compatible.
protected  VersionRequester getVersionRequester()
           
protected  void handleIncompatibleVersions()
          This method is called in open() if an incompatible version has been encountered.
protected  boolean isCompatibleVersion(java.lang.String compareVersionString)
          Subclasses can override this method to specify an algorithms that determines how version strings are compared and which version strings can be regarded as compatible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardVersionControlStrategy

public StandardVersionControlStrategy(VersionRequester newVersionRequester)
Method Detail

assertCompatibleVersion

public void assertCompatibleVersion()
Define a strategy how to select those versions of JHotDraw with which they are compatible.

Specified by:
assertCompatibleVersion in interface VersionControlStrategy

handleIncompatibleVersions

protected void handleIncompatibleVersions()
This method is called in open() if an incompatible version has been encountered. Applications can override this method to provide customized exception handling for this case. In the default implementation, a JHotDrawRuntimeException is thrown.


isCompatibleVersion

protected boolean isCompatibleVersion(java.lang.String compareVersionString)
Subclasses can override this method to specify an algorithms that determines how version strings are compared and which version strings can be regarded as compatible. For example, a subclass may choose that all versions 5.x of JHotDraw are compatible with the application, so only the first digit in the version number is considered significant. In the default implementation, all versions that are equal or greater than the expected version are compatible.

Parameters:
compareVersionString - application version to compare with JHotDraw's version

getVersionRequester

protected VersionRequester getVersionRequester()

JHotDraw 6.0b1