org.tigris.subversion.svnclientadapter
Class SVNClientAdapterFactory

java.lang.Object
  extended by org.tigris.subversion.svnclientadapter.SVNClientAdapterFactory

public abstract class SVNClientAdapterFactory
extends java.lang.Object

Abstract Factory for SVNClientAdapter. Real factories should extend this class and register themselves with the method #registerAdapterFactory

Author:
C?dric Chabanois cchabanois@ifrance.com, Panagiotis Korros pkorros@bigfoot.com

Constructor Summary
SVNClientAdapterFactory()
           
 
Method Summary
static ISVNClientAdapter createSVNClient(java.lang.String clientType)
          creates a new ISVNClientAdapter.
protected abstract  ISVNClientAdapter createSVNClientImpl()
          Real Factories should implement these methods.
protected abstract  java.lang.String getClientType()
           
static java.lang.String getPreferredSVNClientType()
           
static boolean isSVNClientAvailable(java.lang.String clientType)
          tells if the given clientType is available or not
protected static void registerAdapterFactory(SVNClientAdapterFactory factory)
          Extenders should register themselves with this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVNClientAdapterFactory

public SVNClientAdapterFactory()
Method Detail

createSVNClientImpl

protected abstract ISVNClientAdapter createSVNClientImpl()
Real Factories should implement these methods.


getClientType

protected abstract java.lang.String getClientType()

createSVNClient

public static ISVNClientAdapter createSVNClient(java.lang.String clientType)
creates a new ISVNClientAdapter. You can create a javahl client or a command line client.

Parameters:
clientType -
Returns:
the client adapter that was requested or null if that client adapter is not available or doesn't exist.

isSVNClientAvailable

public static boolean isSVNClientAvailable(java.lang.String clientType)
tells if the given clientType is available or not

Parameters:
clientType -
Returns:
true if the given clientType is available

getPreferredSVNClientType

public static java.lang.String getPreferredSVNClientType()
                                                  throws SVNClientException
Returns:
the best svn client interface
Throws:
SVNClientException

registerAdapterFactory

protected static void registerAdapterFactory(SVNClientAdapterFactory factory)
                                      throws SVNClientException
Extenders should register themselves with this method. First registered factory will be considered as the preferred one

Throws:
SVNClientException - when factory with specified type is already registered.