Coverage Report - org.apache.maven.archetype.ArchetypeCreationRequest
 
Classes in this File Line Coverage Branch Coverage Complexity
ArchetypeCreationRequest
89%
41/46
N/A
1
 
 1  
 package org.apache.maven.archetype;
 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.artifact.repository.ArtifactRepository;
 23  
 import org.apache.maven.project.MavenProject;
 24  
 
 25  
 import java.io.File;
 26  
 import java.util.ArrayList;
 27  
 import java.util.List;
 28  
 import java.util.Properties;
 29  
 
 30  
 /** @author Jason van Zyl */
 31  12
 public class ArchetypeCreationRequest
 32  
 {
 33  
     private ArtifactRepository localRepository;
 34  
 
 35  
     private MavenProject project;
 36  
 
 37  
 //    private File propertyFile;
 38  
 
 39  12
     private List<String> languages = new ArrayList<String>();
 40  
 
 41  12
     private List<String> filtereds = new ArrayList<String>();
 42  
 
 43  12
     private String defaultEncoding = "UTF-8";
 44  
 
 45  12
     private boolean preserveCData = false;
 46  
 
 47  12
     private boolean keepParent = true;
 48  
 
 49  12
     private boolean partialArchetype = false;
 50  
 
 51  
     private File archetypeRegistryFile;
 52  
 
 53  
     private String packageName;
 54  
 
 55  
     private Properties properties;
 56  
 
 57  
     private String postPhase;
 58  
 
 59  
     private File outputDirectory;
 60  
 
 61  
     public String getPostPhase()
 62  
     {
 63  12
         return postPhase;
 64  
     }
 65  
 
 66  
     public ArchetypeCreationRequest setPostPhase( String postPhase )
 67  
     {
 68  12
         this.postPhase = postPhase;
 69  
 
 70  12
         return this;
 71  
     }
 72  
 
 73  
     public ArtifactRepository getLocalRepository()
 74  
     {
 75  12
         return localRepository;
 76  
     }
 77  
 
 78  
     public ArchetypeCreationRequest setLocalRepository( ArtifactRepository localRepository )
 79  
     {
 80  6
         this.localRepository = localRepository;
 81  
 
 82  6
         return this;
 83  
     }
 84  
 
 85  
     public MavenProject getProject()
 86  
     {
 87  12
         return project;
 88  
     }
 89  
 
 90  
     public ArchetypeCreationRequest setProject( MavenProject project )
 91  
     {
 92  12
         this.project = project;
 93  
 
 94  12
         return this;
 95  
     }
 96  
 
 97  
 //    public File getPropertyFile()
 98  
 //    {
 99  
 //        return propertyFile;
 100  
 //    }
 101  
 //
 102  
 //    public ArchetypeCreationRequest setPropertyFile( File propertyFile )
 103  
 //    {
 104  
 //        this.propertyFile = propertyFile;
 105  
 //
 106  
 //        return this;
 107  
 //    }
 108  
 
 109  
     public List<String> getLanguages()
 110  
     {
 111  12
         return languages;
 112  
     }
 113  
 
 114  
     public ArchetypeCreationRequest setLanguages( List<String> languages )
 115  
     {
 116  8
         this.languages = languages;
 117  
 
 118  8
         return this;
 119  
     }
 120  
 
 121  
     public List<String> getFiltereds()
 122  
     {
 123  12
         return filtereds;
 124  
     }
 125  
 
 126  
     public ArchetypeCreationRequest setFiltereds( List<String> filtereds )
 127  
     {
 128  8
         this.filtereds = filtereds;
 129  
 
 130  8
         return this;
 131  
     }
 132  
 
 133  
     public String getDefaultEncoding()
 134  
     {
 135  12
         return defaultEncoding;
 136  
     }
 137  
 
 138  
     public ArchetypeCreationRequest setDefaultEncoding( String defaultEncoding )
 139  
     {
 140  6
         this.defaultEncoding = defaultEncoding;
 141  
 
 142  6
         return this;
 143  
     }
 144  
 
 145  
     public boolean isPreserveCData()
 146  
     {
 147  12
         return preserveCData;
 148  
     }
 149  
 
 150  
     public ArchetypeCreationRequest setPreserveCData( boolean preserveCData )
 151  
     {
 152  6
         this.preserveCData = preserveCData;
 153  
 
 154  6
         return this;
 155  
     }
 156  
 
 157  
     public boolean isKeepParent()
 158  
     {
 159  12
         return keepParent;
 160  
     }
 161  
 
 162  
     public ArchetypeCreationRequest setKeepParent( boolean keepParent )
 163  
     {
 164  6
         this.keepParent = keepParent;
 165  
 
 166  6
         return this;
 167  
     }
 168  
 
 169  
     public boolean isPartialArchetype()
 170  
     {
 171  12
         return partialArchetype;
 172  
     }
 173  
 
 174  
     public ArchetypeCreationRequest setPartialArchetype( boolean partialArchetype )
 175  
     {
 176  6
         this.partialArchetype = partialArchetype;
 177  
 
 178  6
         return this;
 179  
     }
 180  
 
 181  
     public File getArchetypeRegistryFile()
 182  
     {
 183  0
         return archetypeRegistryFile;
 184  
     }
 185  
 
 186  
     public ArchetypeCreationRequest setArchetypeRegistryFile( File archetypeRegistryFile )
 187  
     {
 188  0
         this.archetypeRegistryFile = archetypeRegistryFile;
 189  
 
 190  0
         return this;
 191  
     }
 192  
 
 193  
     public Properties getProperties()
 194  
     {
 195  28
         return properties;
 196  
     }
 197  
 
 198  
     public ArchetypeCreationRequest setProperties( Properties properties )
 199  
     {
 200  8
         this.properties = properties;
 201  
 
 202  8
         return this;
 203  
     }
 204  
 
 205  
     public String getPackageName()
 206  
     {
 207  12
         return packageName;
 208  
     }
 209  
 
 210  
     public ArchetypeCreationRequest setPackageName( String packageName )
 211  
     {
 212  6
         this.packageName = packageName;
 213  
 
 214  6
         return this;
 215  
     }
 216  
 
 217  
     public File getOutputDirectory()
 218  
     {
 219  12
         return outputDirectory;
 220  
     }
 221  
 
 222  
     public ArchetypeCreationRequest setOutputDirectory( File outputDirectory )
 223  
     {
 224  0
         this.outputDirectory = outputDirectory;
 225  
 
 226  0
         return this;
 227  
     }
 228  
 }