Class SvnUtils


  • public final class SvnUtils
    extends java.lang.Object
    The Class SvnUtils.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean checkAuthentication​(java.lang.String strUrl, java.lang.String strUserName, java.lang.String strPassword)
      Check authentication.
      static void doCommit​(java.lang.String strPathFile, java.lang.String strCommitMessage, ReleaseSvnCommitClient commitClient)
      Commit.
      static java.lang.Long doSvnCheckout​(java.lang.String strUrl, java.lang.String strCheckoutBaseSitePath, ReleaseSvnCheckoutClient updateClient, CommandResult result)
      Do svn checkout.
      static java.lang.String doTagSite​(java.lang.String strSiteName, java.lang.String strTagName, java.lang.String strSrcURL, java.lang.String strDstURL, org.tmatesoft.svn.core.wc.SVNCopyClient copyClient)
      Tag un site.
      static java.lang.Long getLastRevision​(java.lang.String strRepoPath, java.lang.String strUserName, java.lang.String strPassword)
      Gets the last revision.
      static java.lang.String getRepoUrl​(java.lang.String strRepoUrl)
      Gets the repo url.
      static fr.paris.lutece.util.ReferenceList getSvnSites​(java.lang.String strUrlSite, org.tmatesoft.svn.core.wc.SVNClientManager clientManager)
      Gets the svn sites.
      static java.lang.String getSvnUrlTagSite​(java.lang.String strScmUrl, java.lang.String strTagName)
      Gets the svn url tag site.
      static void init()
      Initialise les diff�rentes factory pour le svn.
      static void revert​(java.lang.String strRepoPath, java.lang.String strCmUrl, java.lang.String strUserName, java.lang.String strPassword, java.lang.Long revCurrentCommit, java.lang.Long lRevertCommit)
      Revert.
      static void update​(java.lang.String strRepoPath, java.lang.String strUserName, java.lang.String strPassword)
      Update.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • init

        public static void init()
        Initialise les diff�rentes factory pour le svn.
      • doCommit

        public static void doCommit​(java.lang.String strPathFile,
                                    java.lang.String strCommitMessage,
                                    ReleaseSvnCommitClient commitClient)
                             throws org.tmatesoft.svn.core.SVNException
        Commit.
        Parameters:
        strPathFile - the str path file
        strCommitMessage - the str commit message
        commitClient - the commit client
        Throws:
        org.tmatesoft.svn.core.SVNException - the SVN exception
      • doTagSite

        public static java.lang.String doTagSite​(java.lang.String strSiteName,
                                                 java.lang.String strTagName,
                                                 java.lang.String strSrcURL,
                                                 java.lang.String strDstURL,
                                                 org.tmatesoft.svn.core.wc.SVNCopyClient copyClient)
                                          throws org.tmatesoft.svn.core.SVNException
        Tag un site.
        Parameters:
        strSiteName - le nom du site
        strTagName - le nom du tag
        strSrcURL - the str src URL
        strDstURL - the str dst URL
        copyClient - le client svn permettant la copie
        Returns:
        string
        Throws:
        org.tmatesoft.svn.core.SVNException - the SVN exception
      • doSvnCheckout

        public static java.lang.Long doSvnCheckout​(java.lang.String strUrl,
                                                   java.lang.String strCheckoutBaseSitePath,
                                                   ReleaseSvnCheckoutClient updateClient,
                                                   CommandResult result)
                                            throws org.tmatesoft.svn.core.SVNException
        Do svn checkout.
        Parameters:
        strUrl - the str url
        strCheckoutBaseSitePath - the str checkout base site path
        updateClient - the update client
        result - the result
        Returns:
        the long
        Throws:
        org.tmatesoft.svn.core.SVNException - the SVN exception
      • getSvnSites

        public static fr.paris.lutece.util.ReferenceList getSvnSites​(java.lang.String strUrlSite,
                                                                     org.tmatesoft.svn.core.wc.SVNClientManager clientManager)
                                                              throws org.tmatesoft.svn.core.SVNException
        Gets the svn sites.
        Parameters:
        strUrlSite - the str url site
        clientManager - the client manager
        Returns:
        the svn sites
        Throws:
        org.tmatesoft.svn.core.SVNException - the SVN exception
      • getLastRevision

        public static java.lang.Long getLastRevision​(java.lang.String strRepoPath,
                                                     java.lang.String strUserName,
                                                     java.lang.String strPassword)
        Gets the last revision.
        Parameters:
        strRepoPath - the str repo path
        strUserName - the str user name
        strPassword - the str password
        Returns:
        the last revision
      • update

        public static void update​(java.lang.String strRepoPath,
                                  java.lang.String strUserName,
                                  java.lang.String strPassword)
        Update.
        Parameters:
        strRepoPath - the str repo path
        strUserName - the str user name
        strPassword - the str password
      • revert

        public static void revert​(java.lang.String strRepoPath,
                                  java.lang.String strCmUrl,
                                  java.lang.String strUserName,
                                  java.lang.String strPassword,
                                  java.lang.Long revCurrentCommit,
                                  java.lang.Long lRevertCommit)
        Revert.
        Parameters:
        strRepoPath - the str repo path
        strCmUrl - the str cm url
        strUserName - the str user name
        strPassword - the str password
        revCurrentCommit - the rev current commit
        lRevertCommit - the l revert commit
      • getSvnUrlTagSite

        public static java.lang.String getSvnUrlTagSite​(java.lang.String strScmUrl,
                                                        java.lang.String strTagName)
        Gets the svn url tag site.
        Parameters:
        strScmUrl - the str scm url
        strTagName - the str tag name
        Returns:
        the svn url tag site
      • getRepoUrl

        public static java.lang.String getRepoUrl​(java.lang.String strRepoUrl)
        Gets the repo url.
        Parameters:
        strRepoUrl - the str repo url
        Returns:
        the repo url
      • checkAuthentication

        public static boolean checkAuthentication​(java.lang.String strUrl,
                                                  java.lang.String strUserName,
                                                  java.lang.String strPassword)
        Check authentication.
        Parameters:
        strUrl - the str url
        strUserName - the str user name
        strPassword - the str password
        Returns:
        true, if successful