站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

SvnUtil (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.resource.util
Class SvnUtil

java.lang.Object
  extended by org.drools.resource.util.SvnUtil

public class SvnUtil
extends Object

Subversion utility class that uses JavaSVN to get rules and rule lists from Subversion via http. It is assumed that you have a working SVN Repository that is URL enabled. This class does support credentials, so the repository doesn't have to be setup with anonymous access, although that's the easiest to get working.

Author:
James Williams

Constructor Summary
SvnUtil()
           
 
Method Summary
static boolean authenticate(String username, String password, String repositoryUrl)
          authenticate a subversion user for access to a particular URL.
static ByteArrayOutputStream getByteArrayOutputFromFile(File file)
           
static ByteArrayOutputStream getFileContentsFromSvn(String url, String svnUsername, String svnPassword, long version)
          Get a DRL file's contents from Subversion.
static List getRepositoryBeanList(RepositoryBean criteriaBean, String username, String password, String repositoryUrl)
          Get a list of rule repository resources from subversion.
static void setupLibrary()
           
static String writeFile(ByteArrayOutputStream baos)
          Write the DRL file out to a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SvnUtil

public SvnUtil()
Method Detail

getFileContentsFromSvn

public static ByteArrayOutputStream getFileContentsFromSvn(String url,
                                                           String svnUsername,
                                                           String svnPassword,
                                                           long version)
                                                    throws org.tmatesoft.svn.core.SVNException
Get a DRL file's contents from Subversion.

Parameters:
svnUrl - - URL
svnUsername - - username
svnPassword - - password
ruleVersion - - tag or trunk SVN folder, which represents the subdirectory that contains the DRL.
drlName - - DRL file name
Returns:
Throws:
org.tmatesoft.svn.core.SVNException

getRepositoryBeanList

public static List getRepositoryBeanList(RepositoryBean criteriaBean,
                                         String username,
                                         String password,
                                         String repositoryUrl)
                                  throws RuntimeException
Get a list of rule repository resources from subversion.

Parameters:
criteriaBean -
Returns:
Throws:
org.tmatesoft.svn.core.SVNException
RuntimeException

writeFile

public static String writeFile(ByteArrayOutputStream baos)
Write the DRL file out to a String.

Parameters:
baos -
Returns:

getByteArrayOutputFromFile

public static ByteArrayOutputStream getByteArrayOutputFromFile(File file)
                                                        throws IOException
Throws:
IOException

setupLibrary

public static void setupLibrary()

authenticate

public static boolean authenticate(String username,
                                   String password,
                                   String repositoryUrl)
                            throws RuntimeException
authenticate a subversion user for access to a particular URL.

Parameters:
criteriaBean -
Returns:
Throws:
org.tmatesoft.svn.core.SVNException
RuntimeException


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.