Coverage Report - org.apache.maven.scm.manager.AbstractScmManager
 
Classes in this File Line Coverage Branch Coverage Complexity
AbstractScmManager
17 %
21/119
31 %
10/32
1,48
 
 1  
 package org.apache.maven.scm.manager;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  * http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 
 22  
 import java.io.File;
 23  
 import java.util.ArrayList;
 24  
 import java.util.Date;
 25  
 import java.util.HashMap;
 26  
 import java.util.List;
 27  
 import java.util.Map;
 28  
 import java.util.Map.Entry;
 29  
 
 30  
 import org.apache.maven.scm.ScmBranch;
 31  
 import org.apache.maven.scm.ScmBranchParameters;
 32  
 import org.apache.maven.scm.ScmException;
 33  
 import org.apache.maven.scm.ScmFileSet;
 34  
 import org.apache.maven.scm.ScmTagParameters;
 35  
 import org.apache.maven.scm.ScmVersion;
 36  
 import org.apache.maven.scm.command.add.AddScmResult;
 37  
 import org.apache.maven.scm.command.blame.BlameScmResult;
 38  
 import org.apache.maven.scm.command.branch.BranchScmResult;
 39  
 import org.apache.maven.scm.command.changelog.ChangeLogScmResult;
 40  
 import org.apache.maven.scm.command.checkin.CheckInScmResult;
 41  
 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
 42  
 import org.apache.maven.scm.command.diff.DiffScmResult;
 43  
 import org.apache.maven.scm.command.edit.EditScmResult;
 44  
 import org.apache.maven.scm.command.export.ExportScmResult;
 45  
 import org.apache.maven.scm.command.list.ListScmResult;
 46  
 import org.apache.maven.scm.command.mkdir.MkdirScmResult;
 47  
 import org.apache.maven.scm.command.remove.RemoveScmResult;
 48  
 import org.apache.maven.scm.command.status.StatusScmResult;
 49  
 import org.apache.maven.scm.command.tag.TagScmResult;
 50  
 import org.apache.maven.scm.command.unedit.UnEditScmResult;
 51  
 import org.apache.maven.scm.command.update.UpdateScmResult;
 52  
 import org.apache.maven.scm.log.ScmLogger;
 53  
 import org.apache.maven.scm.provider.ScmProvider;
 54  
 import org.apache.maven.scm.provider.ScmProviderRepository;
 55  
 import org.apache.maven.scm.provider.ScmUrlUtils;
 56  
 import org.apache.maven.scm.repository.ScmRepository;
 57  
 import org.apache.maven.scm.repository.ScmRepositoryException;
 58  
 import org.apache.maven.scm.repository.UnknownRepositoryStructure;
 59  
 
 60  
 /**
 61  
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
 62  
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
 63  
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
 64  
  * @version $Id: AbstractScmManager.java 1294387 2012-02-27 23:12:45Z hboutemy $
 65  
  */
 66  1
 public abstract class AbstractScmManager
 67  
     implements ScmManager
 68  
 {
 69  1
     private Map<String, ScmProvider> scmProviders = new HashMap<String, ScmProvider>();
 70  
 
 71  
     private ScmLogger logger;
 72  
 
 73  1
     private Map<String, String> userProviderTypes = new HashMap<String, String>();
 74  
 
 75  
     protected void setScmProviders( Map<String, ScmProvider> providers )
 76  
     {
 77  0
         this.scmProviders = providers;
 78  0
     }
 79  
 
 80  
     /**
 81  
      * @deprecated use {@link #setScmProvider(String,ScmProvider)} instead
 82  
      */
 83  
     protected void addScmProvider( String providerType, ScmProvider provider )
 84  
     {
 85  0
         setScmProvider( providerType, provider );
 86  0
     }
 87  
 
 88  
     /**
 89  
      * Set a provider to be used for a type of SCM.
 90  
      * If there was already a designed provider for that type it will be replaced.
 91  
      *
 92  
      * @param providerType the type of SCM, eg. <code>svn</code>, <code>cvs</code>
 93  
      * @param provider     the provider that will be used for that SCM type
 94  
      */
 95  
     public void setScmProvider( String providerType, ScmProvider provider )
 96  
     {
 97  0
         scmProviders.put( providerType, provider );
 98  0
     }
 99  
 
 100  
     protected abstract ScmLogger getScmLogger();
 101  
 
 102  
     // ----------------------------------------------------------------------
 103  
     // ScmManager Implementation
 104  
     // ----------------------------------------------------------------------
 105  
 
 106  
     /** {@inheritDoc} */
 107  
     public ScmProvider getProviderByUrl( String scmUrl )
 108  
         throws ScmRepositoryException, NoSuchScmProviderException
 109  
     {
 110  0
         if ( scmUrl == null )
 111  
         {
 112  0
             throw new NullPointerException( "The scm url cannot be null." );
 113  
         }
 114  
 
 115  0
         String providerType = ScmUrlUtils.getProvider( scmUrl );
 116  
 
 117  0
         return getProviderByType( providerType );
 118  
     }
 119  
 
 120  
     /** {@inheritDoc} */
 121  
     public void setScmProviderImplementation( String providerType, String providerImplementation )
 122  
     {
 123  0
         userProviderTypes.put( providerType, providerImplementation );
 124  0
     }
 125  
 
 126  
     /** {@inheritDoc} */
 127  
     public ScmProvider getProviderByType( String providerType )
 128  
         throws NoSuchScmProviderException
 129  
     {
 130  0
         if ( logger == null )
 131  
         {
 132  0
             logger = getScmLogger();
 133  
 
 134  0
             for ( Entry<String, ScmProvider> entry : scmProviders.entrySet() )
 135  
             {
 136  0
                 ScmProvider p = entry.getValue();
 137  
 
 138  0
                 p.addListener( logger );
 139  0
             }
 140  
         }
 141  
 
 142  0
         String usedProviderType = System.getProperty( "maven.scm.provider." + providerType + ".implementation" );
 143  
 
 144  0
         if ( usedProviderType == null )
 145  
         {
 146  0
             if ( userProviderTypes.containsKey( providerType ) )
 147  
             {
 148  0
                 usedProviderType = userProviderTypes.get( providerType );
 149  
             }
 150  
             else
 151  
             {
 152  0
                 usedProviderType = providerType;
 153  
             }
 154  
         }
 155  
 
 156  0
         ScmProvider scmProvider = scmProviders.get( usedProviderType );
 157  
 
 158  0
         if ( scmProvider == null )
 159  
         {
 160  0
             throw new NoSuchScmProviderException( usedProviderType );
 161  
         }
 162  
 
 163  0
         return scmProvider;
 164  
     }
 165  
 
 166  
     /** {@inheritDoc} */
 167  
     public ScmProvider getProviderByRepository( ScmRepository repository )
 168  
         throws NoSuchScmProviderException
 169  
     {
 170  0
         return getProviderByType( repository.getProvider() );
 171  
     }
 172  
 
 173  
     // ----------------------------------------------------------------------
 174  
     // Repository
 175  
     // ----------------------------------------------------------------------
 176  
 
 177  
     /** {@inheritDoc} */
 178  
     public ScmRepository makeScmRepository( String scmUrl )
 179  
         throws ScmRepositoryException, NoSuchScmProviderException
 180  
     {
 181  0
         if ( scmUrl == null )
 182  
         {
 183  0
             throw new NullPointerException( "The scm url cannot be null." );
 184  
         }
 185  
 
 186  0
         char delimiter = ScmUrlUtils.getDelimiter( scmUrl ).charAt( 0 );
 187  
 
 188  0
         String providerType = ScmUrlUtils.getProvider( scmUrl );
 189  
 
 190  0
         ScmProvider provider = getProviderByType( providerType );
 191  
 
 192  0
         String scmSpecificUrl = cleanScmUrl( scmUrl.substring( providerType.length() + 5 ) );
 193  
         
 194  0
         ScmProviderRepository providerRepository = provider.makeProviderScmRepository( scmSpecificUrl, delimiter );
 195  
 
 196  0
         return new ScmRepository( providerType, providerRepository );
 197  
     }
 198  
 
 199  
     /**
 200  
      * Clean the SCM url by removing all ../ in path
 201  
      *
 202  
      * @param scmUrl the SCM url
 203  
      * @return the cleaned SCM url
 204  
      */
 205  
     protected String cleanScmUrl( String scmUrl )
 206  
     {
 207  7
         if ( scmUrl == null )
 208  
         {
 209  0
             throw new NullPointerException( "The scm url cannot be null." );
 210  
         }
 211  
 
 212  7
         String pathSeparator = "";
 213  
 
 214  7
         int indexOfDoubleDot = -1;
 215  
 
 216  
         // Clean Unix path
 217  7
         if ( scmUrl.indexOf( "../" ) > 1 )
 218  
         {
 219  3
             pathSeparator = "/";
 220  
 
 221  3
             indexOfDoubleDot = scmUrl.indexOf( "../" );
 222  
         }
 223  
 
 224  
         // Clean windows path
 225  7
         if ( scmUrl.indexOf( "..\\" ) > 1 )
 226  
         {
 227  1
             pathSeparator = "\\";
 228  
 
 229  1
             indexOfDoubleDot = scmUrl.indexOf( "..\\" );
 230  
         }
 231  
 
 232  7
         if ( indexOfDoubleDot > 1 )
 233  
         {
 234  4
             int startOfTextToRemove = scmUrl.substring( 0, indexOfDoubleDot - 1 ).lastIndexOf( pathSeparator );
 235  
 
 236  4
             String beginUrl = "";
 237  4
             if ( startOfTextToRemove >= 0 )
 238  
             {
 239  4
                 beginUrl = scmUrl.substring( 0, startOfTextToRemove );
 240  
             }
 241  
 
 242  4
             String endUrl = scmUrl.substring( indexOfDoubleDot + 3 );
 243  
 
 244  4
             scmUrl = beginUrl + pathSeparator + endUrl;
 245  
 
 246  
             // Check if we have other double dot
 247  4
             if ( scmUrl.indexOf( "../" ) > 1 || scmUrl.indexOf( "..\\" ) > 1 )
 248  
             {
 249  0
                 scmUrl = cleanScmUrl( scmUrl );
 250  
             }
 251  
         }
 252  
 
 253  7
         return scmUrl;
 254  
     }
 255  
 
 256  
     /** {@inheritDoc} */
 257  
     public ScmRepository makeProviderScmRepository( String providerType, File path )
 258  
         throws ScmRepositoryException, UnknownRepositoryStructure, NoSuchScmProviderException
 259  
     {
 260  0
         if ( providerType == null )
 261  
         {
 262  0
             throw new NullPointerException( "The provider type cannot be null." );
 263  
         }
 264  
 
 265  0
         ScmProvider provider = getProviderByType( providerType );
 266  
 
 267  0
         ScmProviderRepository providerRepository = provider.makeProviderScmRepository( path );
 268  
 
 269  0
         return new ScmRepository( providerType, providerRepository );
 270  
     }
 271  
 
 272  
     /** {@inheritDoc} */
 273  
     public List<String> validateScmRepository( String scmUrl )
 274  
     {
 275  0
         List<String> messages = new ArrayList<String>();
 276  
 
 277  0
         messages.addAll( ScmUrlUtils.validate( scmUrl ) );
 278  
 
 279  0
         String providerType = ScmUrlUtils.getProvider( scmUrl );
 280  
 
 281  
         ScmProvider provider;
 282  
 
 283  
         try
 284  
         {
 285  0
             provider = getProviderByType( providerType );
 286  
         }
 287  0
         catch ( NoSuchScmProviderException e )
 288  
         {
 289  0
             messages.add( "No such provider installed '" + providerType + "'." );
 290  
 
 291  0
             return messages;
 292  0
         }
 293  
 
 294  0
         String scmSpecificUrl = cleanScmUrl( scmUrl.substring( providerType.length() + 5 ) );
 295  
 
 296  0
         List<String> providerMessages =
 297  
             provider.validateScmUrl( scmSpecificUrl, ScmUrlUtils.getDelimiter( scmUrl ).charAt( 0 ) );
 298  
 
 299  0
         if ( providerMessages == null )
 300  
         {
 301  0
             throw new RuntimeException( "The SCM provider cannot return null from validateScmUrl()." );
 302  
         }
 303  
 
 304  0
         messages.addAll( providerMessages );
 305  
 
 306  0
         return messages;
 307  
     }
 308  
 
 309  
     /** {@inheritDoc} */
 310  
     public AddScmResult add( ScmRepository repository, ScmFileSet fileSet )
 311  
         throws ScmException
 312  
     {
 313  0
         return this.getProviderByRepository( repository ).add( repository, fileSet );
 314  
     }
 315  
 
 316  
     /** {@inheritDoc} */
 317  
     public AddScmResult add( ScmRepository repository, ScmFileSet fileSet, String message )
 318  
         throws ScmException
 319  
     {
 320  0
         return this.getProviderByRepository( repository ).add( repository, fileSet, message );
 321  
     }
 322  
 
 323  
     /** {@inheritDoc} */
 324  
     public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName )
 325  
         throws ScmException
 326  
     {
 327  0
         ScmBranchParameters scmBranchParameters = new ScmBranchParameters( "" );
 328  0
         return this.getProviderByRepository( repository ).branch( repository, fileSet, branchName, scmBranchParameters );
 329  
     }
 330  
 
 331  
     /** {@inheritDoc} */
 332  
     public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName, String message )
 333  
         throws ScmException
 334  
     {
 335  0
         ScmBranchParameters scmBranchParameters = new ScmBranchParameters( message );
 336  0
         return this.getProviderByRepository( repository ).branch( repository, fileSet, branchName, scmBranchParameters );
 337  
     }
 338  
 
 339  
     /** {@inheritDoc} */
 340  
     public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
 341  
                                          int numDays, ScmBranch branch )
 342  
         throws ScmException
 343  
     {
 344  0
         return this.getProviderByRepository( repository ).changeLog( repository, fileSet, startDate, endDate, numDays,
 345  
                                                                      branch );
 346  
     }
 347  
 
 348  
     /** {@inheritDoc} */
 349  
     public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
 350  
                                          int numDays, ScmBranch branch, String datePattern )
 351  
         throws ScmException
 352  
     {
 353  0
         return this.getProviderByRepository( repository ).changeLog( repository, fileSet, startDate, endDate, numDays,
 354  
                                                                      branch, datePattern );
 355  
     }
 356  
 
 357  
     /** {@inheritDoc} */
 358  
     public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion,
 359  
                                          ScmVersion endVersion )
 360  
         throws ScmException
 361  
     {
 362  0
         return this.getProviderByRepository( repository ).changeLog( repository, fileSet, startVersion, endVersion );
 363  
     }
 364  
 
 365  
     /** {@inheritDoc} */
 366  
     public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, ScmVersion startRevision,
 367  
                                          ScmVersion endRevision, String datePattern )
 368  
         throws ScmException
 369  
     {
 370  0
         return this.getProviderByRepository( repository ).changeLog( repository, fileSet, startRevision, endRevision,
 371  
                                                                      datePattern );
 372  
     }
 373  
 
 374  
     /** {@inheritDoc} */
 375  
     public CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String message )
 376  
         throws ScmException
 377  
     {
 378  0
         return this.getProviderByRepository( repository ).checkIn( repository, fileSet, message );
 379  
     }
 380  
 
 381  
     /** {@inheritDoc} */
 382  
     public CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, ScmVersion revision, String message )
 383  
         throws ScmException
 384  
     {
 385  0
         return this.getProviderByRepository( repository ).checkIn( repository, fileSet, revision, message );
 386  
     }
 387  
 
 388  
     /** {@inheritDoc} */
 389  
     public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet )
 390  
         throws ScmException
 391  
     {
 392  0
         return this.getProviderByRepository( repository ).checkOut( repository, fileSet );
 393  
     }
 394  
 
 395  
     /** {@inheritDoc} */
 396  
     public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
 397  
         throws ScmException
 398  
     {
 399  0
         return this.getProviderByRepository( repository ).checkOut( repository, fileSet, version );
 400  
     }
 401  
 
 402  
     /** {@inheritDoc} */
 403  
     public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, boolean recursive )
 404  
         throws ScmException
 405  
     {
 406  0
         return this.getProviderByRepository( repository ).checkOut( repository, fileSet, recursive );
 407  
     }
 408  
 
 409  
     /** {@inheritDoc} */
 410  
     public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion version,
 411  
                                        boolean recursive )
 412  
         throws ScmException
 413  
     {
 414  0
         return this.getProviderByRepository( repository ).checkOut( repository, fileSet, version, recursive );
 415  
     }
 416  
 
 417  
     /** {@inheritDoc} */
 418  
     public DiffScmResult diff( ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion,
 419  
                                ScmVersion endVersion )
 420  
         throws ScmException
 421  
     {
 422  0
         return this.getProviderByRepository( repository ).diff( repository, fileSet, startVersion, endVersion );
 423  
     }
 424  
 
 425  
     /** {@inheritDoc} */
 426  
     public EditScmResult edit( ScmRepository repository, ScmFileSet fileSet )
 427  
         throws ScmException
 428  
     {
 429  0
         return this.getProviderByRepository( repository ).edit( repository, fileSet );
 430  
     }
 431  
 
 432  
     /** {@inheritDoc} */
 433  
     public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet )
 434  
         throws ScmException
 435  
     {
 436  0
         return this.getProviderByRepository( repository ).export( repository, fileSet );
 437  
     }
 438  
 
 439  
     /** {@inheritDoc} */
 440  
     public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
 441  
         throws ScmException
 442  
     {
 443  0
         return this.getProviderByRepository( repository ).export( repository, fileSet, version );
 444  
     }
 445  
 
 446  
     /** {@inheritDoc} */
 447  
     public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, String outputDirectory )
 448  
         throws ScmException
 449  
     {
 450  0
         return this.getProviderByRepository( repository ).export( repository, fileSet, (ScmVersion) null,
 451  
                                                                   outputDirectory );
 452  
     }
 453  
 
 454  
     /** {@inheritDoc} */
 455  
     public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion version,
 456  
                                    String outputDirectory )
 457  
         throws ScmException
 458  
     {
 459  0
         return this.getProviderByRepository( repository ).export( repository, fileSet, version, outputDirectory );
 460  
     }
 461  
 
 462  
     /** {@inheritDoc} */
 463  
     public ListScmResult list( ScmRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion version )
 464  
         throws ScmException
 465  
     {
 466  0
         return this.getProviderByRepository( repository ).list( repository, fileSet, recursive, version );
 467  
     }
 468  
 
 469  
     /** {@inheritDoc} */
 470  
     public MkdirScmResult mkdir( ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal )
 471  
         throws ScmException
 472  
     {
 473  0
         return this.getProviderByRepository( repository ).mkdir( repository, fileSet, message, createInLocal );
 474  
     }
 475  
     
 476  
     /** {@inheritDoc} */
 477  
     public RemoveScmResult remove( ScmRepository repository, ScmFileSet fileSet, String message )
 478  
         throws ScmException
 479  
     {
 480  0
         return this.getProviderByRepository( repository ).remove( repository, fileSet, message );
 481  
     }
 482  
 
 483  
     /** {@inheritDoc} */
 484  
     public StatusScmResult status( ScmRepository repository, ScmFileSet fileSet )
 485  
         throws ScmException
 486  
     {
 487  0
         return this.getProviderByRepository( repository ).status( repository, fileSet );
 488  
     }
 489  
 
 490  
     /** {@inheritDoc} */
 491  
     public TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName )
 492  
         throws ScmException
 493  
     {
 494  0
         return this.tag( repository, fileSet, tagName, "" );
 495  
     }
 496  
 
 497  
     /** {@inheritDoc} */
 498  
     public TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName, String message )
 499  
         throws ScmException
 500  
     {
 501  0
         ScmTagParameters scmTagParameters = new ScmTagParameters( message );
 502  0
         return this.getProviderByRepository( repository ).tag( repository, fileSet, tagName, scmTagParameters );
 503  
     }
 504  
 
 505  
     /** {@inheritDoc} */
 506  
     public UnEditScmResult unedit( ScmRepository repository, ScmFileSet fileSet )
 507  
         throws ScmException
 508  
     {
 509  0
         return this.getProviderByRepository( repository ).unedit( repository, fileSet );
 510  
     }
 511  
 
 512  
     /** {@inheritDoc} */
 513  
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet )
 514  
         throws ScmException
 515  
     {
 516  0
         return this.getProviderByRepository( repository ).update( repository, fileSet );
 517  
     }
 518  
 
 519  
     /** {@inheritDoc} */
 520  
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
 521  
         throws ScmException
 522  
     {
 523  0
         return this.getProviderByRepository( repository ).update( repository, fileSet, version );
 524  
     }
 525  
 
 526  
     /** {@inheritDoc} */
 527  
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, boolean runChangelog )
 528  
         throws ScmException
 529  
     {
 530  0
         return this.getProviderByRepository( repository ).update( repository, fileSet, runChangelog );
 531  
     }
 532  
 
 533  
     /** {@inheritDoc} */
 534  
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version,
 535  
                                    boolean runChangelog )
 536  
         throws ScmException
 537  
     {
 538  0
         return this.getProviderByRepository( repository ).update( repository, fileSet, version, runChangelog );
 539  
     }
 540  
 
 541  
     /** {@inheritDoc} */
 542  
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String datePattern )
 543  
         throws ScmException
 544  
     {
 545  0
         return this.getProviderByRepository( repository ).update( repository, fileSet, (ScmVersion) null, datePattern );
 546  
     }
 547  
 
 548  
     /** {@inheritDoc} */
 549  
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version,
 550  
                                    String datePattern )
 551  
         throws ScmException
 552  
     {
 553  0
         return this.getProviderByRepository( repository ).update( repository, fileSet, version, datePattern );
 554  
     }
 555  
 
 556  
     /** {@inheritDoc} */
 557  
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, Date lastUpdate )
 558  
         throws ScmException
 559  
     {
 560  0
         return this.getProviderByRepository( repository ).update( repository, fileSet, (ScmVersion) null, lastUpdate );
 561  
     }
 562  
 
 563  
     /** {@inheritDoc} */
 564  
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate )
 565  
         throws ScmException
 566  
     {
 567  0
         return this.getProviderByRepository( repository ).update( repository, fileSet, version, lastUpdate );
 568  
     }
 569  
 
 570  
     /** {@inheritDoc} */
 571  
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, Date lastUpdate, String datePattern )
 572  
         throws ScmException
 573  
     {
 574  0
         return this.getProviderByRepository( repository ).update( repository, fileSet, (ScmVersion) null, lastUpdate,
 575  
                                                                   datePattern );
 576  
     }
 577  
 
 578  
     /** {@inheritDoc} */
 579  
     public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate,
 580  
                                    String datePattern )
 581  
         throws ScmException
 582  
     {
 583  0
         return this.getProviderByRepository( repository ).update( repository, fileSet, version, lastUpdate,
 584  
                                                                   datePattern );
 585  
     }
 586  
 
 587  
      /** {@inheritDoc} */
 588  
     public BlameScmResult blame( ScmRepository repository, ScmFileSet fileSet, String filename )
 589  
         throws ScmException
 590  
     {
 591  0
         return this.getProviderByRepository( repository ).blame( repository, fileSet, filename );
 592  
     }
 593  
 }