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 long HEAD  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void export​(java.lang.String path, long revision, java.io.File targetDir)
      Exports the given directory content to the given target directory.
      java.lang.String getBaseUrl()  
      void getContent​(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 stream
      java.lang.String getCRPath()  
      long getCurrentCRRevision()  
      java.lang.String getRepositoryUuid()  
      java.lang.String getSvnRootUrl()  
      SvnInfo info()
      returns details about the base path at HEAD revision
      SvnInfo info​(java.lang.String path, long pegRevision)
      returns details about a single path
      int list​(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 child
      int log​(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.
      void setBaseUrl​(java.lang.String baseUrl)
      Sets the base URL - this is the z2 component repository URL
      void setPassword​(java.lang.String password)
      Sets the password (like --password)
      void setUsername​(java.lang.String username)
      Sets the username (like --username)
      • Methods inherited from interface java.io.Closeable

        close
    • 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 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:
        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.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:
        java.io.IOException - if SVN LOG fails
      • list

        int list​(java.lang.String path,
                 long pegRevision,
                 long revision,
                 IDirEntryHandler dirEntryHandler)
          throws java.io.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:
        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.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:
        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.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:
        java.io.IOException - if SVN URL does not exist in the given revision or targetDir refers to an existing file