|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.drools.resource.util.SvnUtil
public class SvnUtil
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.
| 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 |
|---|
public SvnUtil()
| Method Detail |
|---|
public static ByteArrayOutputStream getFileContentsFromSvn(String url, String svnUsername, String svnPassword, long version) throws org.tmatesoft.svn.core.SVNException
svnUrl - -
URLsvnUsername - -
usernamesvnPassword - -
passwordruleVersion - -
tag or trunk SVN folder, which represents the subdirectory
that contains the DRL.drlName - -
DRL file name
org.tmatesoft.svn.core.SVNExceptionpublic static List getRepositoryBeanList(RepositoryBean criteriaBean, String username, String password, String repositoryUrl) throws RuntimeException
criteriaBean -
org.tmatesoft.svn.core.SVNException
RuntimeExceptionpublic static String writeFile(ByteArrayOutputStream baos)
baos -
public static ByteArrayOutputStream getByteArrayOutputFromFile(File file) throws IOException
IOExceptionpublic static void setupLibrary()
public static boolean authenticate(String username, String password, String repositoryUrl) throws RuntimeException
criteriaBean -
org.tmatesoft.svn.core.SVNException
RuntimeException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||