Coverage Report - org.apache.maven.plugin.assembly.archive.phase.wrappers.RepoInfoWrapper
 
Classes in this File Line Coverage Branch Coverage Complexity
RepoInfoWrapper
18%
3/16
0%
0/6
1,5
 
 1  
 package org.apache.maven.plugin.assembly.archive.phase.wrappers;
 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.plugin.assembly.model.GroupVersionAlignment;
 23  
 import org.apache.maven.plugin.assembly.model.Repository;
 24  
 import org.apache.maven.shared.repository.model.RepositoryInfo;
 25  
 
 26  
 import java.util.ArrayList;
 27  
 import java.util.Iterator;
 28  
 import java.util.List;
 29  
 
 30  
 /**
 31  
  * @version $Id: RepoInfoWrapper.java 999612 2010-09-21 20:34:50Z jdcasey $
 32  
  */
 33  
 public class RepoInfoWrapper
 34  
     implements RepositoryInfo
 35  
 {
 36  
 
 37  
     private final Repository repo;
 38  
 
 39  
     private List<GroupVersionAlignmentWrapper> convertedAlignments;
 40  
 
 41  
     public RepoInfoWrapper( final Repository repo )
 42  6
     {
 43  6
         this.repo = repo;
 44  6
     }
 45  
 
 46  
     public List<String> getExcludes()
 47  
     {
 48  0
         return repo.getExcludes();
 49  
     }
 50  
 
 51  
     public List<GroupVersionAlignmentWrapper> getGroupVersionAlignments()
 52  
     {
 53  0
         final List<GroupVersionAlignment> alignments = repo.getGroupVersionAlignments();
 54  
 
 55  0
         if ( convertedAlignments == null || alignments.size() != convertedAlignments.size() )
 56  
         {
 57  0
             final List<GroupVersionAlignmentWrapper> l =
 58  
                 new ArrayList<GroupVersionAlignmentWrapper>( alignments.size() );
 59  
 
 60  0
             for ( final Iterator<GroupVersionAlignment> it = alignments.iterator(); it.hasNext(); )
 61  
             {
 62  0
                 final GroupVersionAlignment alignment = it.next();
 63  
 
 64  0
                 l.add( new GroupVersionAlignmentWrapper( alignment ) );
 65  0
             }
 66  
 
 67  0
             convertedAlignments = l;
 68  
         }
 69  
 
 70  0
         return convertedAlignments;
 71  
     }
 72  
 
 73  
     public List<String> getIncludes()
 74  
     {
 75  0
         return repo.getIncludes();
 76  
     }
 77  
 
 78  
     public String getScope()
 79  
     {
 80  0
         return repo.getScope();
 81  
     }
 82  
 
 83  
     public boolean isIncludeMetadata()
 84  
     {
 85  0
         return repo.isIncludeMetadata();
 86  
     }
 87  
 
 88  
 }