public class SvnConnection extends Object implements ScmConnection
| Modifier and Type | Field and Description |
|---|---|
protected String |
addressSvn
full svn path
|
protected org.tmatesoft.svn.core.auth.ISVNAuthenticationManager |
authManager
AuthenticationManager with login and password
|
protected File |
checkoutdir
Temp directory for checkout
|
protected String |
fileName
fileName of modif file
|
protected org.tmatesoft.svn.core.wc.SVNClientManager |
manager
the manager which allows authentication
|
protected String |
pathToLocalRepos
the path to the local repositories
|
protected org.tmatesoft.svn.core.SVNURL |
remoteUrl
url of svn path
|
protected org.tmatesoft.svn.core.internal.wc.DefaultSVNOptions |
svnOption
svn default option
|
protected String |
svnPath
svn path without fileName
|
| Constructor and Description |
|---|
SvnConnection(String address,
String pathToLocalRepos) |
| Modifier and Type | Method and Description |
|---|---|
BrowseResultDto |
browse(BrowseDto dto) |
void |
checkout(File checkoutdir) |
CommitResultDto |
commit(CommitDto dto) |
void |
createCheckoutdir() |
void |
delTempDirectory(File checkoutdir)
Use to delete the checkout temp directory
|
String |
getAddressUnique(String fileName)
Gives a unique address for the given file name
|
ByteArrayOutputStream |
getDiff(String text) |
File |
getDiffs(String path,
String username,
String password,
String revision1,
String revision2) |
File |
getFileContent(String path,
String username,
String password) |
File |
getFileContentAtRevision(String path,
String username,
String password,
String revision) |
String |
getFileName() |
String |
getFilePath(String address,
String repositoryRoot,
String username,
String password) |
String |
getHeadcommiter(String address,
String login,
String password)
Gives the name of the person who made the last commit
|
String |
getHeadRevisionNumber(String path,
String username,
String password) |
org.tmatesoft.svn.core.wc.SVNClientManager |
getManager() |
String |
getPathToLocalRepos() |
String |
getRepositoryId() |
Map<ScmRevision,String> |
getRevisions(String address,
String username,
String password) |
org.tmatesoft.svn.core.internal.wc.DefaultSVNOptions |
getSvnOption() |
String |
getSvnPath() |
String |
getSvnRoot(String username,
String password) |
boolean |
isDifferent(String text) |
void |
listEntries(org.tmatesoft.svn.core.io.SVNRepository repository,
String path,
String address,
BrowseResultDto resultDto)
Makes a list of the files and directories in the repository
|
void |
setPathToLocalRepos(String pathToLocalRepos) |
void |
testConnection() |
void |
updateAuthentication(String login,
String password) |
protected String addressSvn
protected String svnPath
protected String fileName
protected File checkoutdir
protected org.tmatesoft.svn.core.SVNURL remoteUrl
protected org.tmatesoft.svn.core.auth.ISVNAuthenticationManager authManager
protected org.tmatesoft.svn.core.internal.wc.DefaultSVNOptions svnOption
protected String pathToLocalRepos
protected org.tmatesoft.svn.core.wc.SVNClientManager manager
public String getSvnPath()
public org.tmatesoft.svn.core.internal.wc.DefaultSVNOptions getSvnOption()
public String getPathToLocalRepos()
public void setPathToLocalRepos(String pathToLocalRepos)
public org.tmatesoft.svn.core.wc.SVNClientManager getManager()
public BrowseResultDto browse(BrowseDto dto)
browse in interface ScmConnectionpublic CommitResultDto commit(CommitDto dto)
commit in interface ScmConnectionpublic File getFileContent(String path, String username, String password) throws AuthenticationException
getFileContent in interface ScmConnectionAuthenticationExceptionpublic String getHeadRevisionNumber(String path, String username, String password) throws AuthenticationException
getHeadRevisionNumber in interface ScmConnectionAuthenticationExceptionpublic String getRepositoryId()
getRepositoryId in interface ScmConnectionpublic String getFileName()
getFileName in interface ScmConnectionpublic String getFilePath(String address, String repositoryRoot, String username, String password)
getFilePath in interface ScmConnectionpublic Map<ScmRevision,String> getRevisions(String address, String username, String password) throws AuthenticationException
getRevisions in interface ScmConnectionAuthenticationExceptionpublic File getFileContentAtRevision(String path, String username, String password, String revision) throws AuthenticationException
getFileContentAtRevision in interface ScmConnectionAuthenticationExceptionpublic File getDiffs(String path, String username, String password, String revision1, String revision2) throws AuthenticationException
getDiffs in interface ScmConnectionAuthenticationExceptionpublic void testConnection()
throws org.tmatesoft.svn.core.SVNException
org.tmatesoft.svn.core.SVNExceptionpublic boolean isDifferent(String text) throws IOException
IOExceptionpublic ByteArrayOutputStream getDiff(String text) throws IOException
IOExceptionpublic void checkout(File checkoutdir) throws org.tmatesoft.svn.core.SVNException
checkoutdir - the directory where the checkout will be doneorg.tmatesoft.svn.core.SVNException - if the checkout could not be donepublic void createCheckoutdir()
throws IOException
IOExceptionpublic void delTempDirectory(File checkoutdir)
checkoutdir - The dir temp directorypublic String getHeadcommiter(String address, String login, String password) throws org.tmatesoft.svn.core.SVNException
address - the repository's addresslogin - the username to use to connect to the repositorypassword - the password to use to connect to the repositoryorg.tmatesoft.svn.core.SVNException - if there is a problem while accessing the repositorypublic void listEntries(org.tmatesoft.svn.core.io.SVNRepository repository,
String path,
String address,
BrowseResultDto resultDto)
repository - the repository to use to fetch informationpath - the path to the directory (in the repository) to make the list fromaddress - the repository's addressresultDto - the DTO which will contain the files and directories foundCopyright © 2009–2016 CodeLutin. All rights reserved.