1 | // SECTION-START[License Header] |
2 | // <editor-fold defaultstate="collapsed" desc=" Generated License "> |
3 | /* |
4 | * Java Object Management and Configuration |
5 | * Copyright (C) Christian Schulte, 2005-206 |
6 | * All rights reserved. |
7 | * |
8 | * Redistribution and use in source and binary forms, with or without |
9 | * modification, are permitted provided that the following conditions |
10 | * are met: |
11 | * |
12 | * o Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. |
14 | * |
15 | * o Redistributions in binary form must reproduce the above copyright |
16 | * notice, this list of conditions and the following disclaimer in |
17 | * the documentation and/or other materials provided with the |
18 | * distribution. |
19 | * |
20 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, |
21 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY |
22 | * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL |
23 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, |
24 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
25 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
29 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | * |
31 | * $JOMC: AbstractModelCommand.java 4463 2012-03-28 00:46:22Z schulte2005 $ |
32 | * |
33 | */ |
34 | // </editor-fold> |
35 | // SECTION-END |
36 | package org.jomc.cli.commands; |
37 | |
38 | import java.io.File; |
39 | import java.util.logging.Level; |
40 | import javax.xml.bind.JAXBElement; |
41 | import javax.xml.bind.JAXBException; |
42 | import javax.xml.bind.Unmarshaller; |
43 | import org.apache.commons.cli.CommandLine; |
44 | import org.jomc.model.Module; |
45 | import org.jomc.model.Modules; |
46 | import org.jomc.model.modlet.DefaultModelProcessor; |
47 | import org.jomc.model.modlet.DefaultModelProvider; |
48 | import org.jomc.model.modlet.ModelHelper; |
49 | import org.jomc.modlet.Model; |
50 | import org.jomc.modlet.ModelContext; |
51 | import org.jomc.modlet.ModelException; |
52 | import org.jomc.tools.modlet.ToolsModelProcessor; |
53 | import org.jomc.tools.modlet.ToolsModelProvider; |
54 | |
55 | // SECTION-START[Documentation] |
56 | // <editor-fold defaultstate="collapsed" desc=" Generated Documentation "> |
57 | /** |
58 | * JOMC CLI model based command implementation. |
59 | * |
60 | * <dl> |
61 | * <dt><b>Identifier:</b></dt><dd>JOMC CLI Model Command</dd> |
62 | * <dt><b>Name:</b></dt><dd>JOMC CLI Model Command</dd> |
63 | * <dt><b>Specifications:</b></dt> |
64 | * <dd>JOMC CLI Command @ 1.0</dd> |
65 | * <dt><b>Abstract:</b></dt><dd>Yes</dd> |
66 | * <dt><b>Final:</b></dt><dd>No</dd> |
67 | * <dt><b>Stateless:</b></dt><dd>No</dd> |
68 | * </dl> |
69 | * |
70 | * @author <a href="mailto:schulte2005@users.sourceforge.net">Christian Schulte</a> 1.0 |
71 | * @version 1.2.5 |
72 | */ |
73 | // </editor-fold> |
74 | // SECTION-END |
75 | // SECTION-START[Annotations] |
76 | // <editor-fold defaultstate="collapsed" desc=" Generated Annotations "> |
77 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
78 | // </editor-fold> |
79 | // SECTION-END |
80 | public abstract class AbstractModelCommand extends AbstractModletCommand |
81 | { |
82 | // SECTION-START[Command] |
83 | // SECTION-END |
84 | // SECTION-START[AbstractModelCommand] |
85 | |
86 | /** {@inheritDoc} */ |
87 | @Override |
88 | protected ModelContext createModelContext( final CommandLine commandLine, final ClassLoader classLoader ) |
89 | throws CommandExecutionException |
90 | { |
91 | if ( commandLine == null ) |
92 | { |
93 | throw new NullPointerException( "commandLine" ); |
94 | } |
95 | |
96 | final ModelContext modelContext = super.createModelContext( commandLine, classLoader ); |
97 | |
98 | if ( commandLine.hasOption( this.getTransformerLocationOption().getOpt() ) ) |
99 | { |
100 | modelContext.setAttribute( DefaultModelProcessor.TRANSFORMER_LOCATION_ATTRIBUTE_NAME, |
101 | commandLine.getOptionValue( this.getTransformerLocationOption().getOpt() ) ); |
102 | |
103 | } |
104 | |
105 | if ( commandLine.hasOption( this.getModuleLocationOption().getOpt() ) ) |
106 | { |
107 | modelContext.setAttribute( DefaultModelProvider.MODULE_LOCATION_ATTRIBUTE_NAME, |
108 | commandLine.getOptionValue( this.getModuleLocationOption().getOpt() ) ); |
109 | |
110 | } |
111 | |
112 | modelContext.setAttribute( ToolsModelProvider.MODEL_OBJECT_CLASSPATH_RESOLUTION_ENABLED_ATTRIBUTE_NAME, |
113 | !commandLine.hasOption( this.getNoClasspathResolutionOption().getOpt() ) ); |
114 | |
115 | modelContext.setAttribute( ToolsModelProcessor.MODEL_OBJECT_CLASSPATH_RESOLUTION_ENABLED_ATTRIBUTE_NAME, |
116 | !commandLine.hasOption( this.getNoClasspathResolutionOption().getOpt() ) ); |
117 | |
118 | modelContext.setAttribute( DefaultModelProvider.VALIDATING_ATTRIBUTE_NAME, |
119 | !commandLine.hasOption( this.getNoModelResourceValidation().getOpt() ) ); |
120 | |
121 | return modelContext; |
122 | } |
123 | |
124 | /** |
125 | * Gets the model as specified by a given command line. |
126 | * |
127 | * @param context The context to use for getting the model. |
128 | * @param commandLine The command line specifying the model to get. |
129 | * |
130 | * @return The model as specified by {@code commandLine}. |
131 | * |
132 | * @throws CommandExecutionException if getting the model fails. |
133 | */ |
134 | protected Model getModel( final ModelContext context, final CommandLine commandLine ) |
135 | throws CommandExecutionException |
136 | { |
137 | try |
138 | { |
139 | Model model = new Model(); |
140 | model.setIdentifier( this.getModel( commandLine ) ); |
141 | Modules modules = new Modules(); |
142 | ModelHelper.setModules( model, modules ); |
143 | |
144 | if ( commandLine.hasOption( this.getDocumentsOption().getOpt() ) ) |
145 | { |
146 | final Unmarshaller u = context.createUnmarshaller( model.getIdentifier() ); |
147 | |
148 | if ( !commandLine.hasOption( this.getNoModelResourceValidation().getOpt() ) ) |
149 | { |
150 | u.setSchema( context.createSchema( model.getIdentifier() ) ); |
151 | } |
152 | |
153 | for ( File f : this.getDocumentFiles( commandLine ) ) |
154 | { |
155 | if ( this.isLoggable( Level.FINEST ) ) |
156 | { |
157 | this.log( Level.FINEST, this.getReadingMessage( this.getLocale(), f.getAbsolutePath() ), null ); |
158 | } |
159 | |
160 | Object o = u.unmarshal( f ); |
161 | if ( o instanceof JAXBElement<?> ) |
162 | { |
163 | o = ( (JAXBElement<?>) o ).getValue(); |
164 | } |
165 | |
166 | if ( o instanceof Module ) |
167 | { |
168 | modules.getModule().add( (Module) o ); |
169 | } |
170 | else if ( o instanceof Modules ) |
171 | { |
172 | modules.getModule().addAll( ( (Modules) o ).getModule() ); |
173 | } |
174 | else if ( this.isLoggable( Level.WARNING ) ) |
175 | { |
176 | this.log( Level.WARNING, this.getCannotProcessMessage( |
177 | this.getLocale(), f.getAbsolutePath(), o.toString() ), null ); |
178 | |
179 | } |
180 | } |
181 | } |
182 | |
183 | if ( commandLine.hasOption( this.getClasspathOption().getOpt() ) ) |
184 | { |
185 | model = context.findModel( model ); |
186 | modules = ModelHelper.getModules( model ); |
187 | } |
188 | |
189 | if ( modules != null && !commandLine.hasOption( this.getNoClasspathResolutionOption().getOpt() ) ) |
190 | { |
191 | final Module classpathModule = modules.getClasspathModule( |
192 | Modules.getDefaultClasspathModuleName(), context.getClassLoader() ); |
193 | |
194 | if ( classpathModule != null && modules.getModule( classpathModule.getName() ) == null ) |
195 | { |
196 | modules.getModule().add( classpathModule ); |
197 | } |
198 | } |
199 | |
200 | if ( !commandLine.hasOption( this.getNoModelProcessingOption().getOpt() ) ) |
201 | { |
202 | model = context.processModel( model ); |
203 | modules = ModelHelper.getModules( model ); |
204 | } |
205 | |
206 | assert modules != null : "Modules '" + this.getModel( commandLine ) + "' not found."; |
207 | return model; |
208 | } |
209 | catch ( final ModelException e ) |
210 | { |
211 | throw new CommandExecutionException( getExceptionMessage( e ), e ); |
212 | } |
213 | catch ( final JAXBException e ) |
214 | { |
215 | String message = getExceptionMessage( e ); |
216 | if ( message == null ) |
217 | { |
218 | message = getExceptionMessage( e.getLinkedException() ); |
219 | } |
220 | |
221 | throw new CommandExecutionException( message, e ); |
222 | } |
223 | } |
224 | |
225 | // SECTION-END |
226 | // SECTION-START[Constructors] |
227 | // <editor-fold defaultstate="collapsed" desc=" Generated Constructors "> |
228 | /** Creates a new {@code AbstractModelCommand} instance. */ |
229 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
230 | public AbstractModelCommand() |
231 | { |
232 | // SECTION-START[Default Constructor] |
233 | super(); |
234 | // SECTION-END |
235 | } |
236 | // </editor-fold> |
237 | // SECTION-END |
238 | // SECTION-START[Dependencies] |
239 | // <editor-fold defaultstate="collapsed" desc=" Generated Dependencies "> |
240 | /** |
241 | * Gets the {@code <ClasspathOption>} dependency. |
242 | * <p> |
243 | * This method returns the {@code <JOMC CLI Classpath Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
244 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
245 | * </p> |
246 | * <dl> |
247 | * <dt><b>Final:</b></dt><dd>No</dd> |
248 | * </dl> |
249 | * @return The {@code <ClasspathOption>} dependency. |
250 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
251 | */ |
252 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
253 | private org.apache.commons.cli.Option getClasspathOption() |
254 | { |
255 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ClasspathOption" ); |
256 | assert _d != null : "'ClasspathOption' dependency not found."; |
257 | return _d; |
258 | } |
259 | /** |
260 | * Gets the {@code <DocumentsOption>} dependency. |
261 | * <p> |
262 | * This method returns the {@code <JOMC CLI Documents Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
263 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
264 | * </p> |
265 | * <dl> |
266 | * <dt><b>Final:</b></dt><dd>No</dd> |
267 | * </dl> |
268 | * @return The {@code <DocumentsOption>} dependency. |
269 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
270 | */ |
271 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
272 | private org.apache.commons.cli.Option getDocumentsOption() |
273 | { |
274 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "DocumentsOption" ); |
275 | assert _d != null : "'DocumentsOption' dependency not found."; |
276 | return _d; |
277 | } |
278 | /** |
279 | * Gets the {@code <Locale>} dependency. |
280 | * <p> |
281 | * This method returns the {@code <default>} object of the {@code <java.util.Locale>} specification at specification level 1.1. |
282 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
283 | * </p> |
284 | * <dl> |
285 | * <dt><b>Final:</b></dt><dd>No</dd> |
286 | * </dl> |
287 | * @return The {@code <Locale>} dependency. |
288 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
289 | */ |
290 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
291 | private java.util.Locale getLocale() |
292 | { |
293 | final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" ); |
294 | assert _d != null : "'Locale' dependency not found."; |
295 | return _d; |
296 | } |
297 | /** |
298 | * Gets the {@code <ModelContextFactoryOption>} dependency. |
299 | * <p> |
300 | * This method returns the {@code <JOMC CLI ModelContextFactory Class Name Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
301 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
302 | * </p> |
303 | * <dl> |
304 | * <dt><b>Final:</b></dt><dd>No</dd> |
305 | * </dl> |
306 | * @return The {@code <ModelContextFactoryOption>} dependency. |
307 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
308 | */ |
309 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
310 | private org.apache.commons.cli.Option getModelContextFactoryOption() |
311 | { |
312 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModelContextFactoryOption" ); |
313 | assert _d != null : "'ModelContextFactoryOption' dependency not found."; |
314 | return _d; |
315 | } |
316 | /** |
317 | * Gets the {@code <ModelOption>} dependency. |
318 | * <p> |
319 | * This method returns the {@code <JOMC CLI Model Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
320 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
321 | * </p> |
322 | * <dl> |
323 | * <dt><b>Final:</b></dt><dd>No</dd> |
324 | * </dl> |
325 | * @return The {@code <ModelOption>} dependency. |
326 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
327 | */ |
328 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
329 | private org.apache.commons.cli.Option getModelOption() |
330 | { |
331 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModelOption" ); |
332 | assert _d != null : "'ModelOption' dependency not found."; |
333 | return _d; |
334 | } |
335 | /** |
336 | * Gets the {@code <ModletLocationOption>} dependency. |
337 | * <p> |
338 | * This method returns the {@code <JOMC CLI Modlet Location Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
339 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
340 | * </p> |
341 | * <dl> |
342 | * <dt><b>Final:</b></dt><dd>No</dd> |
343 | * </dl> |
344 | * @return The {@code <ModletLocationOption>} dependency. |
345 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
346 | */ |
347 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
348 | private org.apache.commons.cli.Option getModletLocationOption() |
349 | { |
350 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModletLocationOption" ); |
351 | assert _d != null : "'ModletLocationOption' dependency not found."; |
352 | return _d; |
353 | } |
354 | /** |
355 | * Gets the {@code <ModletSchemaSystemIdOption>} dependency. |
356 | * <p> |
357 | * This method returns the {@code <JOMC CLI Modlet Schema System Id Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
358 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
359 | * </p> |
360 | * <dl> |
361 | * <dt><b>Final:</b></dt><dd>No</dd> |
362 | * </dl> |
363 | * @return The {@code <ModletSchemaSystemIdOption>} dependency. |
364 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
365 | */ |
366 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
367 | private org.apache.commons.cli.Option getModletSchemaSystemIdOption() |
368 | { |
369 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModletSchemaSystemIdOption" ); |
370 | assert _d != null : "'ModletSchemaSystemIdOption' dependency not found."; |
371 | return _d; |
372 | } |
373 | /** |
374 | * Gets the {@code <ModuleLocationOption>} dependency. |
375 | * <p> |
376 | * This method returns the {@code <JOMC CLI Module Location Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
377 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
378 | * </p> |
379 | * <dl> |
380 | * <dt><b>Final:</b></dt><dd>No</dd> |
381 | * </dl> |
382 | * @return The {@code <ModuleLocationOption>} dependency. |
383 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
384 | */ |
385 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
386 | private org.apache.commons.cli.Option getModuleLocationOption() |
387 | { |
388 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModuleLocationOption" ); |
389 | assert _d != null : "'ModuleLocationOption' dependency not found."; |
390 | return _d; |
391 | } |
392 | /** |
393 | * Gets the {@code <NoClasspathResolutionOption>} dependency. |
394 | * <p> |
395 | * This method returns the {@code <JOMC CLI No Classpath Resolution Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
396 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
397 | * </p> |
398 | * <dl> |
399 | * <dt><b>Final:</b></dt><dd>No</dd> |
400 | * </dl> |
401 | * @return The {@code <NoClasspathResolutionOption>} dependency. |
402 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
403 | */ |
404 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
405 | private org.apache.commons.cli.Option getNoClasspathResolutionOption() |
406 | { |
407 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoClasspathResolutionOption" ); |
408 | assert _d != null : "'NoClasspathResolutionOption' dependency not found."; |
409 | return _d; |
410 | } |
411 | /** |
412 | * Gets the {@code <NoModelProcessingOption>} dependency. |
413 | * <p> |
414 | * This method returns the {@code <JOMC CLI No Model Processing Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
415 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
416 | * </p> |
417 | * <dl> |
418 | * <dt><b>Final:</b></dt><dd>No</dd> |
419 | * </dl> |
420 | * @return The {@code <NoModelProcessingOption>} dependency. |
421 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
422 | */ |
423 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
424 | private org.apache.commons.cli.Option getNoModelProcessingOption() |
425 | { |
426 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoModelProcessingOption" ); |
427 | assert _d != null : "'NoModelProcessingOption' dependency not found."; |
428 | return _d; |
429 | } |
430 | /** |
431 | * Gets the {@code <NoModelResourceValidation>} dependency. |
432 | * <p> |
433 | * This method returns the {@code <JOMC CLI No Model Resource Validation Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
434 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
435 | * </p> |
436 | * <dl> |
437 | * <dt><b>Final:</b></dt><dd>No</dd> |
438 | * </dl> |
439 | * @return The {@code <NoModelResourceValidation>} dependency. |
440 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
441 | */ |
442 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
443 | private org.apache.commons.cli.Option getNoModelResourceValidation() |
444 | { |
445 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoModelResourceValidation" ); |
446 | assert _d != null : "'NoModelResourceValidation' dependency not found."; |
447 | return _d; |
448 | } |
449 | /** |
450 | * Gets the {@code <NoModletResourceValidation>} dependency. |
451 | * <p> |
452 | * This method returns the {@code <JOMC CLI No Modlet Resource Validation Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
453 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
454 | * </p> |
455 | * <dl> |
456 | * <dt><b>Final:</b></dt><dd>No</dd> |
457 | * </dl> |
458 | * @return The {@code <NoModletResourceValidation>} dependency. |
459 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
460 | */ |
461 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
462 | private org.apache.commons.cli.Option getNoModletResourceValidation() |
463 | { |
464 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoModletResourceValidation" ); |
465 | assert _d != null : "'NoModletResourceValidation' dependency not found."; |
466 | return _d; |
467 | } |
468 | /** |
469 | * Gets the {@code <PlatformProviderLocationOption>} dependency. |
470 | * <p> |
471 | * This method returns the {@code <JOMC CLI Platform Provider Location Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
472 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
473 | * </p> |
474 | * <dl> |
475 | * <dt><b>Final:</b></dt><dd>No</dd> |
476 | * </dl> |
477 | * @return The {@code <PlatformProviderLocationOption>} dependency. |
478 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
479 | */ |
480 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
481 | private org.apache.commons.cli.Option getPlatformProviderLocationOption() |
482 | { |
483 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "PlatformProviderLocationOption" ); |
484 | assert _d != null : "'PlatformProviderLocationOption' dependency not found."; |
485 | return _d; |
486 | } |
487 | /** |
488 | * Gets the {@code <ProviderLocationOption>} dependency. |
489 | * <p> |
490 | * This method returns the {@code <JOMC CLI Provider Location Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
491 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
492 | * </p> |
493 | * <dl> |
494 | * <dt><b>Final:</b></dt><dd>No</dd> |
495 | * </dl> |
496 | * @return The {@code <ProviderLocationOption>} dependency. |
497 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
498 | */ |
499 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
500 | private org.apache.commons.cli.Option getProviderLocationOption() |
501 | { |
502 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ProviderLocationOption" ); |
503 | assert _d != null : "'ProviderLocationOption' dependency not found."; |
504 | return _d; |
505 | } |
506 | /** |
507 | * Gets the {@code <TransformerLocationOption>} dependency. |
508 | * <p> |
509 | * This method returns the {@code <JOMC CLI Transformer Location Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
510 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
511 | * </p> |
512 | * <dl> |
513 | * <dt><b>Final:</b></dt><dd>No</dd> |
514 | * </dl> |
515 | * @return The {@code <TransformerLocationOption>} dependency. |
516 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
517 | */ |
518 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
519 | private org.apache.commons.cli.Option getTransformerLocationOption() |
520 | { |
521 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "TransformerLocationOption" ); |
522 | assert _d != null : "'TransformerLocationOption' dependency not found."; |
523 | return _d; |
524 | } |
525 | // </editor-fold> |
526 | // SECTION-END |
527 | // SECTION-START[Properties] |
528 | // <editor-fold defaultstate="collapsed" desc=" Generated Properties "> |
529 | /** |
530 | * Gets the value of the {@code <abbreviatedCommandName>} property. |
531 | * <p><dl> |
532 | * <dt><b>Final:</b></dt><dd>No</dd> |
533 | * </dl></p> |
534 | * @return Abbreviated name of the command. |
535 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
536 | */ |
537 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
538 | private java.lang.String getAbbreviatedCommandName() |
539 | { |
540 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "abbreviatedCommandName" ); |
541 | assert _p != null : "'abbreviatedCommandName' property not found."; |
542 | return _p; |
543 | } |
544 | /** |
545 | * Gets the value of the {@code <applicationModlet>} property. |
546 | * <p><dl> |
547 | * <dt><b>Final:</b></dt><dd>Yes</dd> |
548 | * </dl></p> |
549 | * @return Name of the 'shaded' application modlet. |
550 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
551 | */ |
552 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
553 | private java.lang.String getApplicationModlet() |
554 | { |
555 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "applicationModlet" ); |
556 | assert _p != null : "'applicationModlet' property not found."; |
557 | return _p; |
558 | } |
559 | /** |
560 | * Gets the value of the {@code <commandName>} property. |
561 | * <p><dl> |
562 | * <dt><b>Final:</b></dt><dd>No</dd> |
563 | * </dl></p> |
564 | * @return Name of the command. |
565 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
566 | */ |
567 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
568 | private java.lang.String getCommandName() |
569 | { |
570 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "commandName" ); |
571 | assert _p != null : "'commandName' property not found."; |
572 | return _p; |
573 | } |
574 | /** |
575 | * Gets the value of the {@code <modletExcludes>} property. |
576 | * <p><dl> |
577 | * <dt><b>Final:</b></dt><dd>Yes</dd> |
578 | * </dl></p> |
579 | * @return List of modlet names to exclude from any {@code META-INF/jomc-modlet.xml} files separated by {@code :}. |
580 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
581 | */ |
582 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
583 | private java.lang.String getModletExcludes() |
584 | { |
585 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "modletExcludes" ); |
586 | assert _p != null : "'modletExcludes' property not found."; |
587 | return _p; |
588 | } |
589 | /** |
590 | * Gets the value of the {@code <providerExcludes>} property. |
591 | * <p><dl> |
592 | * <dt><b>Final:</b></dt><dd>Yes</dd> |
593 | * </dl></p> |
594 | * @return List of providers to exclude from any {@code META-INF/services} files separated by {@code :}. |
595 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
596 | */ |
597 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
598 | private java.lang.String getProviderExcludes() |
599 | { |
600 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "providerExcludes" ); |
601 | assert _p != null : "'providerExcludes' property not found."; |
602 | return _p; |
603 | } |
604 | /** |
605 | * Gets the value of the {@code <schemaExcludes>} property. |
606 | * <p><dl> |
607 | * <dt><b>Final:</b></dt><dd>Yes</dd> |
608 | * </dl></p> |
609 | * @return List of schema context-ids to exclude from any {@code META-INF/jomc-modlet.xml} files separated by {@code :}. |
610 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
611 | */ |
612 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
613 | private java.lang.String getSchemaExcludes() |
614 | { |
615 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "schemaExcludes" ); |
616 | assert _p != null : "'schemaExcludes' property not found."; |
617 | return _p; |
618 | } |
619 | /** |
620 | * Gets the value of the {@code <serviceExcludes>} property. |
621 | * <p><dl> |
622 | * <dt><b>Final:</b></dt><dd>Yes</dd> |
623 | * </dl></p> |
624 | * @return List of service classes to exclude from any {@code META-INF/jomc-modlet.xml} files separated by {@code :}. |
625 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
626 | */ |
627 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
628 | private java.lang.String getServiceExcludes() |
629 | { |
630 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "serviceExcludes" ); |
631 | assert _p != null : "'serviceExcludes' property not found."; |
632 | return _p; |
633 | } |
634 | // </editor-fold> |
635 | // SECTION-END |
636 | // SECTION-START[Messages] |
637 | // <editor-fold defaultstate="collapsed" desc=" Generated Messages "> |
638 | /** |
639 | * Gets the text of the {@code <applicationTitle>} message. |
640 | * <p><dl> |
641 | * <dt><b>Languages:</b></dt> |
642 | * <dd>English (default)</dd> |
643 | * <dt><b>Final:</b></dt><dd>No</dd> |
644 | * </dl></p> |
645 | * @param locale The locale of the message to return. |
646 | * @return The text of the {@code <applicationTitle>} message for {@code locale}. |
647 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
648 | */ |
649 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
650 | private String getApplicationTitle( final java.util.Locale locale ) |
651 | { |
652 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "applicationTitle", locale ); |
653 | assert _m != null : "'applicationTitle' message not found."; |
654 | return _m; |
655 | } |
656 | /** |
657 | * Gets the text of the {@code <cannotProcessMessage>} message. |
658 | * <p><dl> |
659 | * <dt><b>Languages:</b></dt> |
660 | * <dd>English (default)</dd> |
661 | * <dd>Deutsch</dd> |
662 | * <dt><b>Final:</b></dt><dd>No</dd> |
663 | * </dl></p> |
664 | * @param locale The locale of the message to return. |
665 | * @param itemInfo Format argument. |
666 | * @param detailMessage Format argument. |
667 | * @return The text of the {@code <cannotProcessMessage>} message for {@code locale}. |
668 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
669 | */ |
670 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
671 | private String getCannotProcessMessage( final java.util.Locale locale, final java.lang.String itemInfo, final java.lang.String detailMessage ) |
672 | { |
673 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "cannotProcessMessage", locale, itemInfo, detailMessage ); |
674 | assert _m != null : "'cannotProcessMessage' message not found."; |
675 | return _m; |
676 | } |
677 | /** |
678 | * Gets the text of the {@code <classpathElementInfo>} message. |
679 | * <p><dl> |
680 | * <dt><b>Languages:</b></dt> |
681 | * <dd>English (default)</dd> |
682 | * <dd>Deutsch</dd> |
683 | * <dt><b>Final:</b></dt><dd>No</dd> |
684 | * </dl></p> |
685 | * @param locale The locale of the message to return. |
686 | * @param classpathElement Format argument. |
687 | * @return The text of the {@code <classpathElementInfo>} message for {@code locale}. |
688 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
689 | */ |
690 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
691 | private String getClasspathElementInfo( final java.util.Locale locale, final java.lang.String classpathElement ) |
692 | { |
693 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "classpathElementInfo", locale, classpathElement ); |
694 | assert _m != null : "'classpathElementInfo' message not found."; |
695 | return _m; |
696 | } |
697 | /** |
698 | * Gets the text of the {@code <classpathElementNotFoundWarning>} message. |
699 | * <p><dl> |
700 | * <dt><b>Languages:</b></dt> |
701 | * <dd>English (default)</dd> |
702 | * <dd>Deutsch</dd> |
703 | * <dt><b>Final:</b></dt><dd>No</dd> |
704 | * </dl></p> |
705 | * @param locale The locale of the message to return. |
706 | * @param fileName Format argument. |
707 | * @return The text of the {@code <classpathElementNotFoundWarning>} message for {@code locale}. |
708 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
709 | */ |
710 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
711 | private String getClasspathElementNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName ) |
712 | { |
713 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "classpathElementNotFoundWarning", locale, fileName ); |
714 | assert _m != null : "'classpathElementNotFoundWarning' message not found."; |
715 | return _m; |
716 | } |
717 | /** |
718 | * Gets the text of the {@code <commandFailureMessage>} message. |
719 | * <p><dl> |
720 | * <dt><b>Languages:</b></dt> |
721 | * <dd>English (default)</dd> |
722 | * <dd>Deutsch</dd> |
723 | * <dt><b>Final:</b></dt><dd>No</dd> |
724 | * </dl></p> |
725 | * @param locale The locale of the message to return. |
726 | * @param toolName Format argument. |
727 | * @return The text of the {@code <commandFailureMessage>} message for {@code locale}. |
728 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
729 | */ |
730 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
731 | private String getCommandFailureMessage( final java.util.Locale locale, final java.lang.String toolName ) |
732 | { |
733 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandFailureMessage", locale, toolName ); |
734 | assert _m != null : "'commandFailureMessage' message not found."; |
735 | return _m; |
736 | } |
737 | /** |
738 | * Gets the text of the {@code <commandInfoMessage>} message. |
739 | * <p><dl> |
740 | * <dt><b>Languages:</b></dt> |
741 | * <dd>English (default)</dd> |
742 | * <dd>Deutsch</dd> |
743 | * <dt><b>Final:</b></dt><dd>No</dd> |
744 | * </dl></p> |
745 | * @param locale The locale of the message to return. |
746 | * @param toolName Format argument. |
747 | * @return The text of the {@code <commandInfoMessage>} message for {@code locale}. |
748 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
749 | */ |
750 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
751 | private String getCommandInfoMessage( final java.util.Locale locale, final java.lang.String toolName ) |
752 | { |
753 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandInfoMessage", locale, toolName ); |
754 | assert _m != null : "'commandInfoMessage' message not found."; |
755 | return _m; |
756 | } |
757 | /** |
758 | * Gets the text of the {@code <commandSuccessMessage>} message. |
759 | * <p><dl> |
760 | * <dt><b>Languages:</b></dt> |
761 | * <dd>English (default)</dd> |
762 | * <dd>Deutsch</dd> |
763 | * <dt><b>Final:</b></dt><dd>No</dd> |
764 | * </dl></p> |
765 | * @param locale The locale of the message to return. |
766 | * @param toolName Format argument. |
767 | * @return The text of the {@code <commandSuccessMessage>} message for {@code locale}. |
768 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
769 | */ |
770 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
771 | private String getCommandSuccessMessage( final java.util.Locale locale, final java.lang.String toolName ) |
772 | { |
773 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandSuccessMessage", locale, toolName ); |
774 | assert _m != null : "'commandSuccessMessage' message not found."; |
775 | return _m; |
776 | } |
777 | /** |
778 | * Gets the text of the {@code <defaultLogLevelInfo>} message. |
779 | * <p><dl> |
780 | * <dt><b>Languages:</b></dt> |
781 | * <dd>English (default)</dd> |
782 | * <dd>Deutsch</dd> |
783 | * <dt><b>Final:</b></dt><dd>No</dd> |
784 | * </dl></p> |
785 | * @param locale The locale of the message to return. |
786 | * @param defaultLogLevel Format argument. |
787 | * @return The text of the {@code <defaultLogLevelInfo>} message for {@code locale}. |
788 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
789 | */ |
790 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
791 | private String getDefaultLogLevelInfo( final java.util.Locale locale, final java.lang.String defaultLogLevel ) |
792 | { |
793 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "defaultLogLevelInfo", locale, defaultLogLevel ); |
794 | assert _m != null : "'defaultLogLevelInfo' message not found."; |
795 | return _m; |
796 | } |
797 | /** |
798 | * Gets the text of the {@code <documentFileInfo>} message. |
799 | * <p><dl> |
800 | * <dt><b>Languages:</b></dt> |
801 | * <dd>English (default)</dd> |
802 | * <dd>Deutsch</dd> |
803 | * <dt><b>Final:</b></dt><dd>No</dd> |
804 | * </dl></p> |
805 | * @param locale The locale of the message to return. |
806 | * @param documentFile Format argument. |
807 | * @return The text of the {@code <documentFileInfo>} message for {@code locale}. |
808 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
809 | */ |
810 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
811 | private String getDocumentFileInfo( final java.util.Locale locale, final java.lang.String documentFile ) |
812 | { |
813 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "documentFileInfo", locale, documentFile ); |
814 | assert _m != null : "'documentFileInfo' message not found."; |
815 | return _m; |
816 | } |
817 | /** |
818 | * Gets the text of the {@code <documentFileNotFoundWarning>} message. |
819 | * <p><dl> |
820 | * <dt><b>Languages:</b></dt> |
821 | * <dd>English (default)</dd> |
822 | * <dd>Deutsch</dd> |
823 | * <dt><b>Final:</b></dt><dd>No</dd> |
824 | * </dl></p> |
825 | * @param locale The locale of the message to return. |
826 | * @param fileName Format argument. |
827 | * @return The text of the {@code <documentFileNotFoundWarning>} message for {@code locale}. |
828 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
829 | */ |
830 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
831 | private String getDocumentFileNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName ) |
832 | { |
833 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "documentFileNotFoundWarning", locale, fileName ); |
834 | assert _m != null : "'documentFileNotFoundWarning' message not found."; |
835 | return _m; |
836 | } |
837 | /** |
838 | * Gets the text of the {@code <excludedModletInfo>} message. |
839 | * <p><dl> |
840 | * <dt><b>Languages:</b></dt> |
841 | * <dd>English (default)</dd> |
842 | * <dd>Deutsch</dd> |
843 | * <dt><b>Final:</b></dt><dd>No</dd> |
844 | * </dl></p> |
845 | * @param locale The locale of the message to return. |
846 | * @param resourceName Format argument. |
847 | * @param modletIdentifier Format argument. |
848 | * @return The text of the {@code <excludedModletInfo>} message for {@code locale}. |
849 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
850 | */ |
851 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
852 | private String getExcludedModletInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String modletIdentifier ) |
853 | { |
854 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedModletInfo", locale, resourceName, modletIdentifier ); |
855 | assert _m != null : "'excludedModletInfo' message not found."; |
856 | return _m; |
857 | } |
858 | /** |
859 | * Gets the text of the {@code <excludedProviderInfo>} message. |
860 | * <p><dl> |
861 | * <dt><b>Languages:</b></dt> |
862 | * <dd>English (default)</dd> |
863 | * <dd>Deutsch</dd> |
864 | * <dt><b>Final:</b></dt><dd>No</dd> |
865 | * </dl></p> |
866 | * @param locale The locale of the message to return. |
867 | * @param resourceName Format argument. |
868 | * @param providerName Format argument. |
869 | * @return The text of the {@code <excludedProviderInfo>} message for {@code locale}. |
870 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
871 | */ |
872 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
873 | private String getExcludedProviderInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String providerName ) |
874 | { |
875 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedProviderInfo", locale, resourceName, providerName ); |
876 | assert _m != null : "'excludedProviderInfo' message not found."; |
877 | return _m; |
878 | } |
879 | /** |
880 | * Gets the text of the {@code <excludedSchemaInfo>} message. |
881 | * <p><dl> |
882 | * <dt><b>Languages:</b></dt> |
883 | * <dd>English (default)</dd> |
884 | * <dd>Deutsch</dd> |
885 | * <dt><b>Final:</b></dt><dd>No</dd> |
886 | * </dl></p> |
887 | * @param locale The locale of the message to return. |
888 | * @param resourceName Format argument. |
889 | * @param contextId Format argument. |
890 | * @return The text of the {@code <excludedSchemaInfo>} message for {@code locale}. |
891 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
892 | */ |
893 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
894 | private String getExcludedSchemaInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String contextId ) |
895 | { |
896 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedSchemaInfo", locale, resourceName, contextId ); |
897 | assert _m != null : "'excludedSchemaInfo' message not found."; |
898 | return _m; |
899 | } |
900 | /** |
901 | * Gets the text of the {@code <excludedServiceInfo>} message. |
902 | * <p><dl> |
903 | * <dt><b>Languages:</b></dt> |
904 | * <dd>English (default)</dd> |
905 | * <dd>Deutsch</dd> |
906 | * <dt><b>Final:</b></dt><dd>No</dd> |
907 | * </dl></p> |
908 | * @param locale The locale of the message to return. |
909 | * @param resourceName Format argument. |
910 | * @param serviceName Format argument. |
911 | * @return The text of the {@code <excludedServiceInfo>} message for {@code locale}. |
912 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
913 | */ |
914 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
915 | private String getExcludedServiceInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String serviceName ) |
916 | { |
917 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedServiceInfo", locale, resourceName, serviceName ); |
918 | assert _m != null : "'excludedServiceInfo' message not found."; |
919 | return _m; |
920 | } |
921 | /** |
922 | * Gets the text of the {@code <invalidModelMessage>} message. |
923 | * <p><dl> |
924 | * <dt><b>Languages:</b></dt> |
925 | * <dd>English (default)</dd> |
926 | * <dd>Deutsch</dd> |
927 | * <dt><b>Final:</b></dt><dd>No</dd> |
928 | * </dl></p> |
929 | * @param locale The locale of the message to return. |
930 | * @param modelIdentifier Format argument. |
931 | * @return The text of the {@code <invalidModelMessage>} message for {@code locale}. |
932 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
933 | */ |
934 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
935 | private String getInvalidModelMessage( final java.util.Locale locale, final java.lang.String modelIdentifier ) |
936 | { |
937 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "invalidModelMessage", locale, modelIdentifier ); |
938 | assert _m != null : "'invalidModelMessage' message not found."; |
939 | return _m; |
940 | } |
941 | /** |
942 | * Gets the text of the {@code <longDescriptionMessage>} message. |
943 | * <p><dl> |
944 | * <dt><b>Languages:</b></dt> |
945 | * <dd>English (default)</dd> |
946 | * <dt><b>Final:</b></dt><dd>No</dd> |
947 | * </dl></p> |
948 | * @param locale The locale of the message to return. |
949 | * @return The text of the {@code <longDescriptionMessage>} message for {@code locale}. |
950 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
951 | */ |
952 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
953 | private String getLongDescriptionMessage( final java.util.Locale locale ) |
954 | { |
955 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "longDescriptionMessage", locale ); |
956 | assert _m != null : "'longDescriptionMessage' message not found."; |
957 | return _m; |
958 | } |
959 | /** |
960 | * Gets the text of the {@code <readingMessage>} message. |
961 | * <p><dl> |
962 | * <dt><b>Languages:</b></dt> |
963 | * <dd>English (default)</dd> |
964 | * <dd>Deutsch</dd> |
965 | * <dt><b>Final:</b></dt><dd>No</dd> |
966 | * </dl></p> |
967 | * @param locale The locale of the message to return. |
968 | * @param locationInfo Format argument. |
969 | * @return The text of the {@code <readingMessage>} message for {@code locale}. |
970 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
971 | */ |
972 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
973 | private String getReadingMessage( final java.util.Locale locale, final java.lang.String locationInfo ) |
974 | { |
975 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "readingMessage", locale, locationInfo ); |
976 | assert _m != null : "'readingMessage' message not found."; |
977 | return _m; |
978 | } |
979 | /** |
980 | * Gets the text of the {@code <separator>} message. |
981 | * <p><dl> |
982 | * <dt><b>Languages:</b></dt> |
983 | * <dd>English (default)</dd> |
984 | * <dt><b>Final:</b></dt><dd>No</dd> |
985 | * </dl></p> |
986 | * @param locale The locale of the message to return. |
987 | * @return The text of the {@code <separator>} message for {@code locale}. |
988 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
989 | */ |
990 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
991 | private String getSeparator( final java.util.Locale locale ) |
992 | { |
993 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "separator", locale ); |
994 | assert _m != null : "'separator' message not found."; |
995 | return _m; |
996 | } |
997 | /** |
998 | * Gets the text of the {@code <shortDescriptionMessage>} message. |
999 | * <p><dl> |
1000 | * <dt><b>Languages:</b></dt> |
1001 | * <dd>English (default)</dd> |
1002 | * <dt><b>Final:</b></dt><dd>No</dd> |
1003 | * </dl></p> |
1004 | * @param locale The locale of the message to return. |
1005 | * @return The text of the {@code <shortDescriptionMessage>} message for {@code locale}. |
1006 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1007 | */ |
1008 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
1009 | private String getShortDescriptionMessage( final java.util.Locale locale ) |
1010 | { |
1011 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "shortDescriptionMessage", locale ); |
1012 | assert _m != null : "'shortDescriptionMessage' message not found."; |
1013 | return _m; |
1014 | } |
1015 | // </editor-fold> |
1016 | // SECTION-END |
1017 | // SECTION-START[Generated Command] |
1018 | // <editor-fold defaultstate="collapsed" desc=" Generated Options "> |
1019 | /** |
1020 | * Gets the options of the command. |
1021 | * <p><strong>Options:</strong> |
1022 | * <table border="1" width="100%" cellpadding="3" cellspacing="0"> |
1023 | * <tr class="TableSubHeadingColor"> |
1024 | * <th align="left" scope="col" nowrap><b>Specification</b></th> |
1025 | * <th align="left" scope="col" nowrap><b>Implementation</b></th> |
1026 | * </tr> |
1027 | * <tr class="TableRow"> |
1028 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1029 | * <td align="left" valign="top" nowrap>JOMC CLI Classpath Option</td> |
1030 | * </tr> |
1031 | * <tr class="TableRow"> |
1032 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1033 | * <td align="left" valign="top" nowrap>JOMC CLI Documents Option</td> |
1034 | * </tr> |
1035 | * <tr class="TableRow"> |
1036 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1037 | * <td align="left" valign="top" nowrap>JOMC CLI ModelContextFactory Class Name Option</td> |
1038 | * </tr> |
1039 | * <tr class="TableRow"> |
1040 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1041 | * <td align="left" valign="top" nowrap>JOMC CLI Model Option</td> |
1042 | * </tr> |
1043 | * <tr class="TableRow"> |
1044 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1045 | * <td align="left" valign="top" nowrap>JOMC CLI Modlet Location Option</td> |
1046 | * </tr> |
1047 | * <tr class="TableRow"> |
1048 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1049 | * <td align="left" valign="top" nowrap>JOMC CLI Modlet Schema System Id Option</td> |
1050 | * </tr> |
1051 | * <tr class="TableRow"> |
1052 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1053 | * <td align="left" valign="top" nowrap>JOMC CLI Module Location Option</td> |
1054 | * </tr> |
1055 | * <tr class="TableRow"> |
1056 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1057 | * <td align="left" valign="top" nowrap>JOMC CLI No Classpath Resolution Option</td> |
1058 | * </tr> |
1059 | * <tr class="TableRow"> |
1060 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1061 | * <td align="left" valign="top" nowrap>JOMC CLI No Model Processing Option</td> |
1062 | * </tr> |
1063 | * <tr class="TableRow"> |
1064 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1065 | * <td align="left" valign="top" nowrap>JOMC CLI No Model Resource Validation Option</td> |
1066 | * </tr> |
1067 | * <tr class="TableRow"> |
1068 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1069 | * <td align="left" valign="top" nowrap>JOMC CLI No Modlet Resource Validation Option</td> |
1070 | * </tr> |
1071 | * <tr class="TableRow"> |
1072 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1073 | * <td align="left" valign="top" nowrap>JOMC CLI Platform Provider Location Option</td> |
1074 | * </tr> |
1075 | * <tr class="TableRow"> |
1076 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1077 | * <td align="left" valign="top" nowrap>JOMC CLI Provider Location Option</td> |
1078 | * </tr> |
1079 | * <tr class="TableRow"> |
1080 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1081 | * <td align="left" valign="top" nowrap>JOMC CLI Transformer Location Option</td> |
1082 | * </tr> |
1083 | * </table> |
1084 | * </p> |
1085 | * @return The options of the command. |
1086 | */ |
1087 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.2.2", comments = "See http://jomc.sourceforge.net/jomc/1.2/jomc-tools-1.2.2" ) |
1088 | @Override |
1089 | public org.apache.commons.cli.Options getOptions() |
1090 | { |
1091 | final org.apache.commons.cli.Options options = new org.apache.commons.cli.Options(); |
1092 | options.addOption( this.getClasspathOption() ); |
1093 | options.addOption( this.getDocumentsOption() ); |
1094 | options.addOption( this.getModelContextFactoryOption() ); |
1095 | options.addOption( this.getModelOption() ); |
1096 | options.addOption( this.getModletLocationOption() ); |
1097 | options.addOption( this.getModletSchemaSystemIdOption() ); |
1098 | options.addOption( this.getModuleLocationOption() ); |
1099 | options.addOption( this.getNoClasspathResolutionOption() ); |
1100 | options.addOption( this.getNoModelProcessingOption() ); |
1101 | options.addOption( this.getNoModelResourceValidation() ); |
1102 | options.addOption( this.getNoModletResourceValidation() ); |
1103 | options.addOption( this.getPlatformProviderLocationOption() ); |
1104 | options.addOption( this.getProviderLocationOption() ); |
1105 | options.addOption( this.getTransformerLocationOption() ); |
1106 | return options; |
1107 | } |
1108 | // </editor-fold> |
1109 | // SECTION-END |
1110 | } |