Package com.zfabrik.svnaccess
Interface ISvnRepository
- All Superinterfaces:
AutoCloseable
,Closeable
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
Exports the given directory content to the given target directory.void
getContent
(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 streamlong
info()
returns details about the base path at HEAD revisionreturns details about a single pathint
list
(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 childint
log
(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.void
setBaseUrl
(String baseUrl) Sets the base URL - this is the z2 component repository URLvoid
setPassword
(String password) Sets the password (like --password)void
setUsername
(String username) Sets the username (like --username)
-
Field Details
-
HEAD
static final long HEAD- See Also:
-
-
Method Details
-
getBaseUrl
String getBaseUrl()- Returns:
- the repository base URL
-
setBaseUrl
Sets the base URL - this is the z2 component repository URL- Parameters:
baseUrl
- base URL
-
setUsername
Sets the username (like --username)- Parameters:
username
- svn user
-
setPassword
Sets the password (like --password)- Parameters:
password
- svn password
-
getRepositoryUuid
- Returns:
- repository UUID
- Throws:
IOException
-
getCurrentCRRevision
- Returns:
- current SVNCR revision
- Throws:
IOException
-
getSvnRootUrl
- Returns:
- SVN-Repository root URL - e.g. "http://z2-environment.net/svn/z2-environment/"
- Throws:
IOException
-
getCRPath
- Returns:
- CR-path relative to SVN root URL - e.g. "/trunk/z2-base.base"
- Throws:
IOException
-
info
returns details about a single path- Parameters:
path
- path relative to the component repositorypegRevision
- peg revision, use -1 for HEAD- Returns:
- an
SvnDirEntry
containing the details or null if the given path does not exist in the given revision - Throws:
IOException
-
info
returns details about the base path at HEAD revision- Returns:
- most current info of the base-path
- Throws:
IOException
-
log
int log(String path, long pegRevision, long revisionFrom, long revisionTo, ISvnLogEntryHandler logEntryHandler) throws IOException Retrieves 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:
IOException
- if SVN LOG fails
-
list
int list(String path, long pegRevision, long revision, IDirEntryHandler dirEntryHandler) throws IOException Retrieves 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:
IOException
- if SVN URL does not exist in the given revision
-
getContent
void getContent(String path, long pegRevision, long revision, IStreamHandler streamHandler) throws IOException Retrieves 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:
IOException
- if SVN URL does not exist in the given revision
-
export
Exports 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:
IOException
- if SVN URL does not exist in the given revision or targetDir refers to an existing file
-