Coverage Report - org.apache.maven.artifact.ant.RemoteRepository
 
Classes in this File Line Coverage Branch Coverage Complexity
RemoteRepository
24%
4/17
N/A
1
 
 1  
 package org.apache.maven.artifact.ant;
 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  
 /**
 23  
  * Remote repository type.
 24  
  *
 25  
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
 26  
  * @version $Id: RemoteRepository.java 615614 2008-01-27 16:06:31Z hboutemy $
 27  
  */
 28  1
 public class RemoteRepository
 29  
     extends Repository
 30  
 {
 31  
     private String url;
 32  
 
 33  
     private Authentication authentication;
 34  
 
 35  
     private Proxy proxy;
 36  
 
 37  
     private RepositoryPolicy snapshots;
 38  
 
 39  
     private RepositoryPolicy releases;
 40  
 
 41  
     public String getUrl()
 42  
     {
 43  2
         return ( (RemoteRepository) getInstance() ).url;
 44  
     }
 45  
 
 46  
     public void setUrl( String url )
 47  
     {
 48  1
         this.url = url;
 49  1
     }
 50  
 
 51  
     public Authentication getAuthentication()
 52  
     {
 53  0
         return ( (RemoteRepository) getInstance() ).authentication;
 54  
     }
 55  
 
 56  
     public void addAuthentication( Authentication authentication )
 57  
     {
 58  0
         this.authentication = authentication;
 59  0
     }
 60  
 
 61  
     public void addProxy( Proxy proxy )
 62  
     {
 63  0
         this.proxy = proxy;
 64  0
     }
 65  
 
 66  
     public Proxy getProxy()
 67  
     {
 68  0
         return ( (RemoteRepository) getInstance() ).proxy;
 69  
     }
 70  
 
 71  
     public RepositoryPolicy getSnapshots()
 72  
     {
 73  0
         return ( (RemoteRepository) getInstance() ).snapshots;
 74  
     }
 75  
 
 76  
     public void addSnapshots( RepositoryPolicy snapshots )
 77  
     {
 78  0
         this.snapshots = snapshots;
 79  0
     }
 80  
 
 81  
     public RepositoryPolicy getReleases()
 82  
     {
 83  0
         return ( (RemoteRepository) getInstance() ).releases;
 84  
     }
 85  
 
 86  
     public void addReleases( RepositoryPolicy releases )
 87  
     {
 88  0
         this.releases = releases;
 89  0
     }
 90  
 
 91  
     protected String getDefaultId()
 92  
     {
 93  0
         return getUrl();
 94  
     }
 95  
 
 96  
 }