当前位置: 首页>>代码示例>>Java>>正文


Java DAVRepositoryFactory类代码示例

本文整理汇总了Java中org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory的典型用法代码示例。如果您正苦于以下问题:Java DAVRepositoryFactory类的具体用法?Java DAVRepositoryFactory怎么用?Java DAVRepositoryFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DAVRepositoryFactory类属于org.tmatesoft.svn.core.internal.io.dav包,在下文中一共展示了DAVRepositoryFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
private void init() {
    logger.info("Creating MySVNClient for svn " + svn_url + ", username " + username + ", password " + password.replaceAll(".", "\\*"));

    DAVRepositoryFactory.setup( );
    SVNURL url;
    try {
        url = SVNURL.parseURIDecoded(svn_url);
        repository = SVNRepositoryFactory.create( url );

        ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager( username , password );
        repository.setAuthenticationManager( authManager );
    } catch (SVNException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:17,代码来源:MySVNClient.java

示例2: setupLibrary

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
public static void setupLibrary(String url) {
	// For using over http:// and https://
	if (url.startsWith("http://") || url.startsWith("https://")) {
		DAVRepositoryFactory.setup();
	}

	// For using over http:// and https://
	if (url.startsWith("svn")) {
		SVNRepositoryFactoryImpl.setup();
	}

	// For using over file:///
	if (url.startsWith("file://")) {
		FSRepositoryFactory.setup();
	}
}
 
开发者ID:AgarwalNeha1,项目名称:gluu,代码行数:17,代码来源:SvnHelper.java

示例3: initialize

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
/**
 * Initializes the library to work with a repository either via svn:// (and
 * svn+ssh://) or via http:// (and https://)
 */
private static void initialize()
{
    if ( initialized )
    {
        return;
    }

    /*
     * for DAV (over http and https)
     */
    DAVRepositoryFactory.setup();

    /*
    * for svn (over svn and svn+ssh)
    */
    SVNRepositoryFactoryImpl.setup();

    /*
     * for file
     */
    FSRepositoryFactory.setup();
    initialized = true;
}
 
开发者ID:olamy,项目名称:maven-scm-provider-svnjava,代码行数:28,代码来源:SvnJavaScmProvider.java

示例4: Svn

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
Svn() {
  super("SVN-Thread");
  DAVRepositoryFactory.setup();
  clientManager = SVNClientManager.newInstance();
  clientManager.setCanceller(this);
  updateClient = clientManager.getUpdateClient();
  statusClient = clientManager.getStatusClient();
  logClient = clientManager.getLogClient();
  wcClient = clientManager.getWCClient();
  updateClient.setIgnoreExternals(false);

  syncList = new LinkedList<TileName>();

  // externals stuff
  updateClient.setExternalsHandler(this);

  checkURL();
}
 
开发者ID:open744,项目名称:terramaster,代码行数:19,代码来源:Svn.java

示例5: createRepository

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
/**
 * Set up repository. This method also determines the head revision of the
 * repository.
 * 
 * @throws ConQATException
 *             if setup fails.
 */
protected SVNRepository createRepository() throws ConQATException {
	DAVRepositoryFactory.setup();
	FSRepositoryFactory.setup();
	
	try {
		SVNRepository repository = SVNRepositoryFactory.create(SVNURL
				.parseURIEncoded(url));

		ISVNAuthenticationManager authManager;
		if (userName != null) {
			authManager = SVNWCUtil.createDefaultAuthenticationManager(
					userName, password);
		} else {
			authManager = SVNWCUtil.createDefaultAuthenticationManager();
		}
		repository.setAuthenticationManager(authManager);

		return repository;

	} catch (SVNException e) {
		throw new ConQATException(e);
	}
}
 
开发者ID:vimaier,项目名称:conqat,代码行数:31,代码来源:SVNProcessorBase.java

示例6: SVNClientImpl

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
@Autowired
public SVNClientImpl(SVNEventDao svnEventDao, EnvService envService, TransactionService transactionService) {
    this.svnEventDao = svnEventDao;
    this.transactionService = transactionService;
    // Spooling directory
    File spoolDirectory = envService.getWorkingDir("svn", "spooling");
    logger.info("[svn] Using Spooling directory at {}", spoolDirectory.getAbsolutePath());
    // Custom logger
    SVNDebugLog.setDefaultLog(new SVNClientLogger());
    // Repository factories
    SVNRepositoryFactoryImpl.setup();
    DAVRepositoryFactory.setup(
            // Using spooling
            new DefaultHTTPConnectionFactory(
                    spoolDirectory,
                    true,
                    null)
    );
}
 
开发者ID:nemerosa,项目名称:ontrack,代码行数:20,代码来源:SVNClientImpl.java

示例7: setupLibrary

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
/**
 * Initializes the library to work with a repository via
 * different protocols.
 */
private static void setupLibrary() {
    /*
     * For using over http:// and https://
     */
    DAVRepositoryFactory.setup();
    /*
     * For using over svn:// and svn+xxx://
     */
    SVNRepositoryFactoryImpl.setup();

    /*
     * For using over file:///
     */
    FSRepositoryFactory.setup();
}
 
开发者ID:jcrcano,项目名称:DrakkarKeel,代码行数:20,代码来源:SVNController.java

示例8: iniciaRepositorio

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
public static void iniciaRepositorio(String url) {

        String[] partes = url.split(":");

        if (partes.length > 1) {
            if (partes[0].equals("http") || partes[0].equals("https")) {
                DAVRepositoryFactory.setup();
            } else if (partes[0].equals("file")) {
                FSRepositoryFactory.setup();
            } else {
                SVNRepositoryFactoryImpl.setup();
            }
        } else {
            throw new IndexOutOfBoundsException("URL inválida.");
        }
    }
 
开发者ID:gems-uff,项目名称:oceano,代码行数:17,代码来源:Subversion.java

示例9: initRepositoryFactory

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
public synchronized void initRepositoryFactory(final String repositoryUrl) {
    if (repositoryUrl.matches("^file://.*$") && !FSRepositoryInitialized) {
        System.out.println("----------------> Initializing FSRepositoryFactory");
        FSRepositoryFactory.setup();
        FSRepositoryInitialized = true;

    } else if (repositoryUrl.matches("^https?://.*$") && !DAVRepositoryInitialized) {
        System.out.println("----------------> Initializing DAVRepositoryFactory");
        DAVRepositoryFactory.setup();
        DAVRepositoryInitialized = true;

    } else if (repositoryUrl.matches("^svn(\\+.+)?://.*$") && !SVNRepositoryInitialized) {
        System.out.println("----------------> Initializing SVNRepositoryFactory");
        SVNRepositoryFactoryImpl.setup();
        DAVRepositoryInitialized = true;
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:18,代码来源:SVN_By_SVNKit.java

示例10: setUpClass

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
@BeforeClass
public static void setUpClass() throws Exception {
    System.out.println("ESTABELECENDO O SVN");
    /*
     * Para uso sobre http:// e https://
     */
    DAVRepositoryFactory.setup();
    /*
     * Para uso sobre svn:// e svn+xxx://
     */
    SVNRepositoryFactoryImpl.setup();
    /*
     * Para uso sobre  file:///
     */
    FSRepositoryFactory.setup();
    System.out.println("SVN ESTABELECIDO");
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:18,代码来源:TesteSvnKit.java

示例11: SourceControlManager

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
public SourceControlManager( Application csapApp, StandardPBEStringEncryptor encryptor ) {

		logger.info( "Initializing DAVRepository for use by svn" );
		DAVRepositoryFactory.setup();
		this.csapApp = csapApp;
		this.encryptor = encryptor;

	}
 
开发者ID:csap-platform,项目名称:csap-core,代码行数:9,代码来源:SourceControlManager.java

示例12: checkoutTest

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
public void checkoutTest() throws SVNException {
    String checkoutPath = "svn://localhost";
    String username = "integration";
    String password = "integration";
    String checkoutRootPath = new File("/home/jeremie/Developpement/checkoutsvn").getAbsolutePath();

    DAVRepositoryFactory.setup();

    final SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(checkoutPath));
    repository.setAuthenticationManager(SVNWCUtil.createDefaultAuthenticationManager(username, password));

    final SVNClientManager clientManager = SVNClientManager.newInstance(null, repository.getAuthenticationManager());
    final SVNUpdateClient updateClient = clientManager.getUpdateClient();

    updateClient.setIgnoreExternals(false);

    final SVNNodeKind nodeKind = repository.checkPath("", -1);

    if (nodeKind == SVNNodeKind.NONE) {
        System.err.println("There is no entry at '" + checkoutPath + "'.");
        System.exit(1);
    } else if (nodeKind == SVNNodeKind.FILE) {
        System.err.println("The entry at '" + checkoutPath + "' is a file while a directory was expected.");
        System.exit(1);
    }
    System.out.println("*** CHECKOUT SVN Trunk/Branches ***");
    System.out.println("Checkout source: " + checkoutPath);
    System.out.println("Checkout destination: " + checkoutRootPath);
    System.out.println("...");
    try {
        traverse(updateClient, repository, checkoutPath, checkoutRootPath, "", true);
    } catch (final Exception e) {
        System.err.println("ERROR : " + e.getMessage());
        e.printStackTrace(System.err);
        System.exit(-1);
    }
    System.out.println("");
    System.out.println("Repository latest revision: " + repository.getLatestRevision());
}
 
开发者ID:klask-io,项目名称:klask-io,代码行数:40,代码来源:TestCheckOut.java

示例13: checkout

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
protected String checkout(RemoteSubversionApplicationRepository repo, File directory, String applicationName) 
throws ApplicationInvalidException {
    try {
        DAVRepositoryFactory.setup();
        SVNClientManager clientManager = SVNClientManager.newInstance(SVNWCUtil.createDefaultOptions(false),
            repo.url.username, repo.url.password);
        SVNURL catalogueDirSvn = repo.url.url.appendPath(applicationName, false);
        int revision = (int) clientManager.getUpdateClient().doCheckout(catalogueDirSvn, directory, 
            SVNRevision.HEAD, SVNRevision.HEAD, SVNDepth.INFINITY, false);
        return Integer.toString(revision);
    }
    catch (SVNException e) { throw new ApplicationInvalidException(e);  }
}
 
开发者ID:onestopconcept,项目名称:onestop-endpoints,代码行数:14,代码来源:PublisherServlet.java

示例14: setupLibrary

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
private static void setupLibrary() {
	/*
	 * For using over http:// and https://
	 */
	DAVRepositoryFactory.setup();
	/*
	 * For using over svn:// and svn+xxx://
	 */
	SVNRepositoryFactoryImpl.setup();

	/*
	 * For using over file:///
	 */
	FSRepositoryFactory.setup();
}
 
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:16,代码来源:DisplayFile.java

示例15: getRepository

import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; //导入依赖的package包/类
private SVNRepository getRepository(String url) throws SVNException {
    DAVRepositoryFactory.setup();
    SVNURL svnUrl = SVNURL.parseURIEncoded(url);
    SVNRepository repository = SVNRepositoryFactory.create(svnUrl, null);
    ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager();
    repository.setAuthenticationManager(authManager);

    return repository;
}
 
开发者ID:Galiaf47,项目名称:forcepm,代码行数:10,代码来源:PackageBuilder.java


注:本文中的org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。