Interface ISvnRepository

All Superinterfaces:
AutoCloseable, Closeable

public interface ISvnRepository extends Closeable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    export(String path, long revision, File targetDir)
    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 stream
     
    long
     
     
     
    returns details about the base path at HEAD revision
    info(String path, long pegRevision)
    returns details about a single path
    int
    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 child
    int
    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 URL
    void
    setPassword(String password)
    Sets the password (like --password)
    void
    setUsername(String username)
    Sets the username (like --username)

    Methods inherited from interface java.io.Closeable

    close
  • Field Details

  • Method Details

    • getBaseUrl

      String getBaseUrl()
      Returns:
      the repository base URL
    • setBaseUrl

      void setBaseUrl(String baseUrl)
      Sets the base URL - this is the z2 component repository URL
      Parameters:
      baseUrl - base URL
    • setUsername

      void setUsername(String username)
      Sets the username (like --username)
      Parameters:
      username - svn user
    • setPassword

      void setPassword(String password)
      Sets the password (like --password)
      Parameters:
      password - svn password
    • getRepositoryUuid

      String getRepositoryUuid() throws IOException
      Returns:
      repository UUID
      Throws:
      IOException
    • getCurrentCRRevision

      long getCurrentCRRevision() throws IOException
      Returns:
      current SVNCR revision
      Throws:
      IOException
    • getSvnRootUrl

      String getSvnRootUrl() throws IOException
      Returns:
      SVN-Repository root URL - e.g. "http://z2-environment.net/svn/z2-environment/"
      Throws:
      IOException
    • getCRPath

      String getCRPath() throws IOException
      Returns:
      CR-path relative to SVN root URL - e.g. "/trunk/z2-base.base"
      Throws:
      IOException
    • info

      SvnInfo info(String path, long pegRevision) throws IOException
      returns details about a single path
      Parameters:
      path - path relative to the component repository
      pegRevision - 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

      SvnInfo info() throws IOException
      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-root
      pegRevision - peg revision, use -1 for HEAD
      revisionFrom - revision from
      revisionTo - revision to
      logEntryHandler - 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-root
      pegRevision - peg revision, use -1 for HEAD
      revision - revision, use -1 for HEAD
      dirEntryHandler - 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 URL
      pegRevision - peg revision, use -1 for HEAD
      revision - revision
      streamHandler - stream handler
      Throws:
      IOException - if SVN URL does not exist in the given revision
    • export

      void export(String path, long revision, File targetDir) throws IOException
      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 URL
      revision - 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