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