Package com.zfabrik.svnaccess
Interface ISvnRepository
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
public interface ISvnRepository extends java.io.Closeable
-
-
Field Summary
Fields Modifier and Type Field Description static longHEAD
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexport(java.lang.String path, long revision, java.io.File targetDir)Exports the given directory content to the given target directory.java.lang.StringgetBaseUrl()voidgetContent(java.lang.String path, long pegRevision, long revision, IStreamHandler streamHandler)Retrieves the content of the given SVN URL and calls the given stream handler for the input streamjava.lang.StringgetCRPath()longgetCurrentCRRevision()java.lang.StringgetRepositoryUuid()java.lang.StringgetSvnRootUrl()SvnInfoinfo()returns details about the base path at HEAD revisionSvnInfoinfo(java.lang.String path, long pegRevision)returns details about a single pathintlist(java.lang.String path, long pegRevision, long revision, IDirEntryHandler dirEntryHandler)Retrieves all direct children for the given SVN URL and calls the given resource handler for each childintlog(java.lang.String path, long pegRevision, long revisionFrom, long revisionTo, ISvnLogEntryHandler logEntryHandler)Retrieves all changes for the given SVN URL and the given revision range and calls the given log entry handler for each change.voidsetBaseUrl(java.lang.String baseUrl)Sets the base URL - this is the z2 component repository URLvoidsetPassword(java.lang.String password)Sets the password (like --password)voidsetUsername(java.lang.String username)Sets the username (like --username)
-
-
-
Field Detail
-
HEAD
static final long HEAD
- See Also:
- Constant Field Values
-
-
Method Detail
-
getBaseUrl
java.lang.String getBaseUrl()
- Returns:
- the repository base URL
-
setBaseUrl
void setBaseUrl(java.lang.String baseUrl)
Sets the base URL - this is the z2 component repository URL- Parameters:
baseUrl- base URL
-
setUsername
void setUsername(java.lang.String username)
Sets the username (like --username)- Parameters:
username- svn user
-
setPassword
void setPassword(java.lang.String password)
Sets the password (like --password)- Parameters:
password- svn password
-
getRepositoryUuid
java.lang.String getRepositoryUuid() throws java.io.IOException- Returns:
- repository UUID
- Throws:
java.io.IOException
-
getCurrentCRRevision
long getCurrentCRRevision() throws java.io.IOException- Returns:
- current SVNCR revision
- Throws:
java.io.IOException
-
getSvnRootUrl
java.lang.String getSvnRootUrl() throws java.io.IOException- Returns:
- SVN-Repository root URL - e.g. "http://z2-environment.net/svn/z2-environment/"
- Throws:
java.io.IOException
-
getCRPath
java.lang.String getCRPath() throws java.io.IOException- Returns:
- CR-path relative to SVN root URL - e.g. "/trunk/z2-base.base"
- Throws:
java.io.IOException
-
info
SvnInfo info(java.lang.String path, long pegRevision) throws java.io.IOException
returns details about a single path- Parameters:
path- path relative to the component repositorypegRevision- peg revision, use -1 for HEAD- Returns:
- an
SvnDirEntrycontaining the details or null if the given path does not exist in the given revision - Throws:
java.io.IOException
-
info
SvnInfo info() throws java.io.IOException
returns details about the base path at HEAD revision- Returns:
- most current info of the base-path
- Throws:
java.io.IOException
-
log
int log(java.lang.String path, long pegRevision, long revisionFrom, long revisionTo, ISvnLogEntryHandler logEntryHandler) throws java.io.IOExceptionRetrieves all changes for the given SVN URL and the given revision range and calls the given log entry handler for each change. If revisionFrom is greater than revisionTo the revision order is descending, otherwise it's ascending.- Parameters:
path- path relative to CR-rootpegRevision- peg revision, use -1 for HEADrevisionFrom- revision fromrevisionTo- revision tologEntryHandler- log entry handler is called for each changed resource- Returns:
- number of log entries
- Throws:
java.io.IOException- if SVN LOG fails
-
list
int list(java.lang.String path, long pegRevision, long revision, IDirEntryHandler dirEntryHandler) throws java.io.IOExceptionRetrieves all direct children for the given SVN URL and calls the given resource handler for each child- Parameters:
path- path relative to CR-rootpegRevision- peg revision, use -1 for HEADrevision- revision, use -1 for HEADdirEntryHandler- resource handler- Returns:
- number of dir entries
- Throws:
java.io.IOException- if SVN URL does not exist in the given revision
-
getContent
void getContent(java.lang.String path, long pegRevision, long revision, IStreamHandler streamHandler) throws java.io.IOExceptionRetrieves the content of the given SVN URL and calls the given stream handler for the input stream- Parameters:
path- path relative to component repository URLpegRevision- peg revision, use -1 for HEADrevision- revisionstreamHandler- stream handler- Throws:
java.io.IOException- if SVN URL does not exist in the given revision
-
export
void export(java.lang.String path, long revision, java.io.File targetDir) throws java.io.IOExceptionExports the given directory content to the given target directory. The directory will be overridden if it exists already!- Parameters:
path- path relative to component repository URLrevision- revision, use -1 for HEAD (we always use preg revision HEAD)targetDir- target directory- Throws:
java.io.IOException- if SVN URL does not exist in the given revision or targetDir refers to an existing file
-
-