View Javadoc
1   package org.apache.maven.model.building;
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 java.io.File;
23  import java.util.Date;
24  import java.util.List;
25  import java.util.Properties;
26  
27  import org.apache.maven.model.Profile;
28  import org.apache.maven.model.resolution.ModelResolver;
29  
30  /**
31   * A model building request that delegates all methods invocations to another request, meant for easy transformations by
32   * subclassing.
33   * 
34   * @author Benjamin Bentmann
35   */
36  class FilterModelBuildingRequest
37      implements ModelBuildingRequest
38  {
39  
40      protected ModelBuildingRequest request;
41  
42      public FilterModelBuildingRequest( ModelBuildingRequest request )
43      {
44          this.request = request;
45      }
46  
47      public File getPomFile()
48      {
49          return request.getPomFile();
50      }
51  
52      public FilterModelBuildingRequest setPomFile( File pomFile )
53      {
54          request.setPomFile( pomFile );
55  
56          return this;
57      }
58  
59      public ModelSource getModelSource()
60      {
61          return request.getModelSource();
62      }
63  
64      public FilterModelBuildingRequest setModelSource( ModelSource modelSource )
65      {
66          request.setModelSource( modelSource );
67  
68          return this;
69      }
70  
71      public int getValidationLevel()
72      {
73          return request.getValidationLevel();
74      }
75  
76      public FilterModelBuildingRequest setValidationLevel( int validationLevel )
77      {
78          request.setValidationLevel( validationLevel );
79  
80          return this;
81      }
82  
83      public boolean isProcessPlugins()
84      {
85          return request.isProcessPlugins();
86      }
87  
88      public FilterModelBuildingRequest setProcessPlugins( boolean processPlugins )
89      {
90          request.setProcessPlugins( processPlugins );
91  
92          return this;
93      }
94  
95      public boolean isTwoPhaseBuilding()
96      {
97          return request.isTwoPhaseBuilding();
98      }
99  
100     public FilterModelBuildingRequest setTwoPhaseBuilding( boolean twoPhaseBuilding )
101     {
102         request.setTwoPhaseBuilding( twoPhaseBuilding );
103 
104         return this;
105     }
106 
107     public boolean isLocationTracking()
108     {
109         return request.isLocationTracking();
110     }
111 
112     public FilterModelBuildingRequest setLocationTracking( boolean locationTracking )
113     {
114         request.setLocationTracking( locationTracking );
115 
116         return this;
117     }
118 
119     public List<Profile> getProfiles()
120     {
121         return request.getProfiles();
122     }
123 
124     public FilterModelBuildingRequest setProfiles( List<Profile> profiles )
125     {
126         request.setProfiles( profiles );
127 
128         return this;
129     }
130 
131     public List<String> getActiveProfileIds()
132     {
133         return request.getActiveProfileIds();
134     }
135 
136     public FilterModelBuildingRequest setActiveProfileIds( List<String> activeProfileIds )
137     {
138         request.setActiveProfileIds( activeProfileIds );
139 
140         return this;
141     }
142 
143     public List<String> getInactiveProfileIds()
144     {
145         return request.getInactiveProfileIds();
146     }
147 
148     public FilterModelBuildingRequest setInactiveProfileIds( List<String> inactiveProfileIds )
149     {
150         request.setInactiveProfileIds( inactiveProfileIds );
151 
152         return this;
153     }
154 
155     public Properties getSystemProperties()
156     {
157         return request.getSystemProperties();
158     }
159 
160     public FilterModelBuildingRequest setSystemProperties( Properties systemProperties )
161     {
162         request.setSystemProperties( systemProperties );
163 
164         return this;
165     }
166 
167     public Properties getUserProperties()
168     {
169         return request.getUserProperties();
170     }
171 
172     public FilterModelBuildingRequest setUserProperties( Properties userProperties )
173     {
174         request.setUserProperties( userProperties );
175 
176         return this;
177     }
178 
179     public Date getBuildStartTime()
180     {
181         return request.getBuildStartTime();
182     }
183 
184     public ModelBuildingRequest setBuildStartTime( Date buildStartTime )
185     {
186         request.setBuildStartTime( buildStartTime );
187 
188         return this;
189     }
190 
191     public ModelResolver getModelResolver()
192     {
193         return request.getModelResolver();
194     }
195 
196     public FilterModelBuildingRequest setModelResolver( ModelResolver modelResolver )
197     {
198         request.setModelResolver( modelResolver );
199 
200         return this;
201     }
202 
203     public ModelBuildingListener getModelBuildingListener()
204     {
205         return request.getModelBuildingListener();
206     }
207 
208     public ModelBuildingRequest setModelBuildingListener( ModelBuildingListener modelBuildingListener )
209     {
210         request.setModelBuildingListener( modelBuildingListener );
211 
212         return this;
213     }
214 
215     public ModelCache getModelCache()
216     {
217         return request.getModelCache();
218     }
219 
220     public FilterModelBuildingRequest setModelCache( ModelCache modelCache )
221     {
222         request.setModelCache( modelCache );
223 
224         return this;
225     }
226 
227 }