org.opensolaris.opengrok.history
Class RepositoryFactory

java.lang.Object
  extended by org.opensolaris.opengrok.history.RepositoryFactory

public final class RepositoryFactory
extends java.lang.Object

This is a factory class for the different repositories.


Method Summary
static Repository getRepository(java.io.File file)
          Returns a repository for the given file, or null if no repository was found.
static Repository getRepository(RepositoryInfo info)
          Returns a repository for the given file, or null if no repository was found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRepository

public static Repository getRepository(java.io.File file)
                                throws java.lang.InstantiationException,
                                       java.lang.IllegalAccessException
Returns a repository for the given file, or null if no repository was found.

Parameters:
file - File that might contain a repository
Returns:
Correct repository for the given file
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException

getRepository

public static Repository getRepository(RepositoryInfo info)
                                throws java.lang.InstantiationException,
                                       java.lang.IllegalAccessException
Returns a repository for the given file, or null if no repository was found.

Parameters:
info - Information about the repository
Returns:
Correct repository for the given file
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException