Coverage Report - org.apache.maven.scm.provider.synergy.SynergyScmProvider
 
Classes in this File Line Coverage Branch Coverage Complexity
SynergyScmProvider
0 %
0/34
0 %
0/2
1,077
 
 1  
 package org.apache.maven.scm.provider.synergy;
 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 org.apache.maven.scm.CommandParameters;
 23  
 import org.apache.maven.scm.ScmException;
 24  
 import org.apache.maven.scm.ScmFileSet;
 25  
 import org.apache.maven.scm.command.add.AddScmResult;
 26  
 import org.apache.maven.scm.command.changelog.ChangeLogScmResult;
 27  
 import org.apache.maven.scm.command.checkin.CheckInScmResult;
 28  
 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
 29  
 import org.apache.maven.scm.command.edit.EditScmResult;
 30  
 import org.apache.maven.scm.command.remove.RemoveScmResult;
 31  
 import org.apache.maven.scm.command.status.StatusScmResult;
 32  
 import org.apache.maven.scm.command.tag.TagScmResult;
 33  
 import org.apache.maven.scm.command.update.UpdateScmResult;
 34  
 import org.apache.maven.scm.provider.AbstractScmProvider;
 35  
 import org.apache.maven.scm.provider.ScmProviderRepository;
 36  
 import org.apache.maven.scm.provider.synergy.command.add.SynergyAddCommand;
 37  
 import org.apache.maven.scm.provider.synergy.command.changelog.SynergyChangeLogCommand;
 38  
 import org.apache.maven.scm.provider.synergy.command.checkin.SynergyCheckInCommand;
 39  
 import org.apache.maven.scm.provider.synergy.command.checkout.SynergyCheckOutCommand;
 40  
 import org.apache.maven.scm.provider.synergy.command.edit.SynergyEditCommand;
 41  
 import org.apache.maven.scm.provider.synergy.command.remove.SynergyRemoveCommand;
 42  
 import org.apache.maven.scm.provider.synergy.command.status.SynergyStatusCommand;
 43  
 import org.apache.maven.scm.provider.synergy.command.tag.SynergyTagCommand;
 44  
 import org.apache.maven.scm.provider.synergy.command.update.SynergyUpdateCommand;
 45  
 import org.apache.maven.scm.provider.synergy.repository.SynergyScmProviderRepository;
 46  
 import org.apache.maven.scm.repository.ScmRepositoryException;
 47  
 
 48  
 /**
 49  
  * @author <a href="mailto:julien.henry@capgemini.com">Julien Henry</a>
 50  
  * @version $Id: SynergyScmProvider.java 1067549 2011-02-05 23:13:10Z olamy $
 51  
  * @plexus.component role="org.apache.maven.scm.provider.ScmProvider" role-hint="synergy"
 52  
  */
 53  0
 public class SynergyScmProvider
 54  
     extends AbstractScmProvider
 55  
 {
 56  
 
 57  
     /** {@inheritDoc} */
 58  
     public ScmProviderRepository makeProviderScmRepository( String scmSpecificUrl, char delimiter )
 59  
         throws ScmRepositoryException
 60  
     {
 61  0
             if (getLogger().isDebugEnabled())
 62  
             {
 63  0
                     getLogger().debug("Creating SynergyScmProviderRepository...");
 64  
             }
 65  0
         return new SynergyScmProviderRepository( scmSpecificUrl );
 66  
     }
 67  
 
 68  
     /** {@inheritDoc} */
 69  
     public String getScmType()
 70  
     {
 71  0
         return "synergy";
 72  
     }
 73  
 
 74  
     /** {@inheritDoc} */
 75  
     public boolean requiresEditMode()
 76  
     {
 77  0
         return true;
 78  
     }
 79  
 
 80  
     /** {@inheritDoc} */
 81  
     public String getScmSpecificFilename()
 82  
     {
 83  0
         return "_ccmwaid.inf";
 84  
     }
 85  
 
 86  
     /** {@inheritDoc} */
 87  
     public AddScmResult add( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
 88  
         throws ScmException
 89  
     {
 90  0
         SynergyAddCommand command = new SynergyAddCommand();
 91  
 
 92  0
         command.setLogger( getLogger() );
 93  
 
 94  0
         return (AddScmResult) command.execute( repository, fileSet, parameters );
 95  
     }
 96  
 
 97  
     /** {@inheritDoc} */
 98  
     public RemoveScmResult remove( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
 99  
         throws ScmException
 100  
     {
 101  0
         SynergyRemoveCommand command = new SynergyRemoveCommand();
 102  
 
 103  0
         command.setLogger( getLogger() );
 104  
 
 105  0
         return (RemoveScmResult) command.execute( repository, fileSet, parameters );
 106  
     }
 107  
 
 108  
     /** {@inheritDoc} */
 109  
     public ChangeLogScmResult changelog( ScmProviderRepository repository, ScmFileSet fileSet,
 110  
                                          CommandParameters parameters )
 111  
         throws ScmException
 112  
     {
 113  0
         SynergyChangeLogCommand command = new SynergyChangeLogCommand();
 114  
 
 115  0
         command.setLogger( getLogger() );
 116  
 
 117  0
         return (ChangeLogScmResult) command.execute( repository, fileSet, parameters );
 118  
     }
 119  
 
 120  
     /** {@inheritDoc} */
 121  
     public CheckInScmResult checkin( ScmProviderRepository repository, ScmFileSet fileSet,
 122  
                                      CommandParameters parameters )
 123  
         throws ScmException
 124  
     {
 125  0
         SynergyCheckInCommand command = new SynergyCheckInCommand();
 126  
 
 127  0
         command.setLogger( getLogger() );
 128  
 
 129  0
         return (CheckInScmResult) command.execute( repository, fileSet, parameters );
 130  
     }
 131  
 
 132  
     /** {@inheritDoc} */
 133  
     public CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet,
 134  
                                        CommandParameters parameters )
 135  
         throws ScmException
 136  
     {
 137  0
         SynergyCheckOutCommand command = new SynergyCheckOutCommand();
 138  
 
 139  0
         command.setLogger( getLogger() );
 140  
 
 141  0
         return (CheckOutScmResult) command.execute( repository, fileSet, parameters );
 142  
     }
 143  
 
 144  
     /** {@inheritDoc} */
 145  
     public EditScmResult edit( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
 146  
         throws ScmException
 147  
     {
 148  0
         SynergyEditCommand command = new SynergyEditCommand();
 149  
 
 150  0
         command.setLogger( getLogger() );
 151  
 
 152  0
         return (EditScmResult) command.execute( repository, fileSet, parameters );
 153  
     }
 154  
 
 155  
     /** {@inheritDoc} */
 156  
     public UpdateScmResult update( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
 157  
         throws ScmException
 158  
     {
 159  0
         SynergyUpdateCommand command = new SynergyUpdateCommand();
 160  
 
 161  0
         command.setLogger( getLogger() );
 162  
 
 163  0
         return (UpdateScmResult) command.execute( repository, fileSet, parameters );
 164  
     }
 165  
 
 166  
     /** {@inheritDoc} */
 167  
     public TagScmResult tag( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
 168  
         throws ScmException
 169  
     {
 170  0
         SynergyTagCommand command = new SynergyTagCommand();
 171  
 
 172  0
         command.setLogger( getLogger() );
 173  
 
 174  0
         return (TagScmResult) command.execute( repository, fileSet, parameters );
 175  
     }
 176  
 
 177  
     /** {@inheritDoc} */
 178  
     public StatusScmResult status( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
 179  
         throws ScmException
 180  
     {
 181  0
         SynergyStatusCommand command = new SynergyStatusCommand();
 182  
 
 183  0
         command.setLogger( getLogger() );
 184  
 
 185  0
         return (StatusScmResult) command.execute( repository, fileSet, parameters );
 186  
     }
 187  
 
 188  
 }