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 4588 2012-06-03 06:01:30Z 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.3 |
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.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
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.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
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 | @SuppressWarnings("unused") |
253 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
254 | private org.apache.commons.cli.Option getClasspathOption() |
255 | { |
256 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ClasspathOption" ); |
257 | assert _d != null : "'ClasspathOption' dependency not found."; |
258 | return _d; |
259 | } |
260 | /** |
261 | * Gets the {@code <DocumentsOption>} dependency. |
262 | * <p> |
263 | * This method returns the {@code <JOMC CLI Documents Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
264 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
265 | * </p> |
266 | * <dl> |
267 | * <dt><b>Final:</b></dt><dd>No</dd> |
268 | * </dl> |
269 | * @return The {@code <DocumentsOption>} dependency. |
270 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
271 | */ |
272 | @SuppressWarnings("unused") |
273 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
274 | private org.apache.commons.cli.Option getDocumentsOption() |
275 | { |
276 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "DocumentsOption" ); |
277 | assert _d != null : "'DocumentsOption' dependency not found."; |
278 | return _d; |
279 | } |
280 | /** |
281 | * Gets the {@code <Locale>} dependency. |
282 | * <p> |
283 | * This method returns the {@code <default>} object of the {@code <java.util.Locale>} specification at specification level 1.1. |
284 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
285 | * </p> |
286 | * <dl> |
287 | * <dt><b>Final:</b></dt><dd>No</dd> |
288 | * </dl> |
289 | * @return The {@code <Locale>} dependency. |
290 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
291 | */ |
292 | @SuppressWarnings("unused") |
293 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
294 | private java.util.Locale getLocale() |
295 | { |
296 | final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" ); |
297 | assert _d != null : "'Locale' dependency not found."; |
298 | return _d; |
299 | } |
300 | /** |
301 | * Gets the {@code <ModelContextFactoryOption>} dependency. |
302 | * <p> |
303 | * 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. |
304 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
305 | * </p> |
306 | * <dl> |
307 | * <dt><b>Final:</b></dt><dd>No</dd> |
308 | * </dl> |
309 | * @return The {@code <ModelContextFactoryOption>} dependency. |
310 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
311 | */ |
312 | @SuppressWarnings("unused") |
313 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
314 | private org.apache.commons.cli.Option getModelContextFactoryOption() |
315 | { |
316 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModelContextFactoryOption" ); |
317 | assert _d != null : "'ModelContextFactoryOption' dependency not found."; |
318 | return _d; |
319 | } |
320 | /** |
321 | * Gets the {@code <ModelOption>} dependency. |
322 | * <p> |
323 | * This method returns the {@code <JOMC CLI Model Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
324 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
325 | * </p> |
326 | * <dl> |
327 | * <dt><b>Final:</b></dt><dd>No</dd> |
328 | * </dl> |
329 | * @return The {@code <ModelOption>} dependency. |
330 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
331 | */ |
332 | @SuppressWarnings("unused") |
333 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
334 | private org.apache.commons.cli.Option getModelOption() |
335 | { |
336 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModelOption" ); |
337 | assert _d != null : "'ModelOption' dependency not found."; |
338 | return _d; |
339 | } |
340 | /** |
341 | * Gets the {@code <ModletLocationOption>} dependency. |
342 | * <p> |
343 | * This method returns the {@code <JOMC CLI Modlet Location Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
344 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
345 | * </p> |
346 | * <dl> |
347 | * <dt><b>Final:</b></dt><dd>No</dd> |
348 | * </dl> |
349 | * @return The {@code <ModletLocationOption>} dependency. |
350 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
351 | */ |
352 | @SuppressWarnings("unused") |
353 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
354 | private org.apache.commons.cli.Option getModletLocationOption() |
355 | { |
356 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModletLocationOption" ); |
357 | assert _d != null : "'ModletLocationOption' dependency not found."; |
358 | return _d; |
359 | } |
360 | /** |
361 | * Gets the {@code <ModletSchemaSystemIdOption>} dependency. |
362 | * <p> |
363 | * 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. |
364 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
365 | * </p> |
366 | * <dl> |
367 | * <dt><b>Final:</b></dt><dd>No</dd> |
368 | * </dl> |
369 | * @return The {@code <ModletSchemaSystemIdOption>} dependency. |
370 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
371 | */ |
372 | @SuppressWarnings("unused") |
373 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
374 | private org.apache.commons.cli.Option getModletSchemaSystemIdOption() |
375 | { |
376 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModletSchemaSystemIdOption" ); |
377 | assert _d != null : "'ModletSchemaSystemIdOption' dependency not found."; |
378 | return _d; |
379 | } |
380 | /** |
381 | * Gets the {@code <ModuleLocationOption>} dependency. |
382 | * <p> |
383 | * This method returns the {@code <JOMC CLI Module Location Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
384 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
385 | * </p> |
386 | * <dl> |
387 | * <dt><b>Final:</b></dt><dd>No</dd> |
388 | * </dl> |
389 | * @return The {@code <ModuleLocationOption>} dependency. |
390 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
391 | */ |
392 | @SuppressWarnings("unused") |
393 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
394 | private org.apache.commons.cli.Option getModuleLocationOption() |
395 | { |
396 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ModuleLocationOption" ); |
397 | assert _d != null : "'ModuleLocationOption' dependency not found."; |
398 | return _d; |
399 | } |
400 | /** |
401 | * Gets the {@code <NoClasspathResolutionOption>} dependency. |
402 | * <p> |
403 | * 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. |
404 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
405 | * </p> |
406 | * <dl> |
407 | * <dt><b>Final:</b></dt><dd>No</dd> |
408 | * </dl> |
409 | * @return The {@code <NoClasspathResolutionOption>} dependency. |
410 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
411 | */ |
412 | @SuppressWarnings("unused") |
413 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
414 | private org.apache.commons.cli.Option getNoClasspathResolutionOption() |
415 | { |
416 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoClasspathResolutionOption" ); |
417 | assert _d != null : "'NoClasspathResolutionOption' dependency not found."; |
418 | return _d; |
419 | } |
420 | /** |
421 | * Gets the {@code <NoModelProcessingOption>} dependency. |
422 | * <p> |
423 | * 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. |
424 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
425 | * </p> |
426 | * <dl> |
427 | * <dt><b>Final:</b></dt><dd>No</dd> |
428 | * </dl> |
429 | * @return The {@code <NoModelProcessingOption>} dependency. |
430 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
431 | */ |
432 | @SuppressWarnings("unused") |
433 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
434 | private org.apache.commons.cli.Option getNoModelProcessingOption() |
435 | { |
436 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoModelProcessingOption" ); |
437 | assert _d != null : "'NoModelProcessingOption' dependency not found."; |
438 | return _d; |
439 | } |
440 | /** |
441 | * Gets the {@code <NoModelResourceValidation>} dependency. |
442 | * <p> |
443 | * 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. |
444 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
445 | * </p> |
446 | * <dl> |
447 | * <dt><b>Final:</b></dt><dd>No</dd> |
448 | * </dl> |
449 | * @return The {@code <NoModelResourceValidation>} dependency. |
450 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
451 | */ |
452 | @SuppressWarnings("unused") |
453 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
454 | private org.apache.commons.cli.Option getNoModelResourceValidation() |
455 | { |
456 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoModelResourceValidation" ); |
457 | assert _d != null : "'NoModelResourceValidation' dependency not found."; |
458 | return _d; |
459 | } |
460 | /** |
461 | * Gets the {@code <NoModletResourceValidation>} dependency. |
462 | * <p> |
463 | * 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. |
464 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
465 | * </p> |
466 | * <dl> |
467 | * <dt><b>Final:</b></dt><dd>No</dd> |
468 | * </dl> |
469 | * @return The {@code <NoModletResourceValidation>} dependency. |
470 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
471 | */ |
472 | @SuppressWarnings("unused") |
473 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
474 | private org.apache.commons.cli.Option getNoModletResourceValidation() |
475 | { |
476 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "NoModletResourceValidation" ); |
477 | assert _d != null : "'NoModletResourceValidation' dependency not found."; |
478 | return _d; |
479 | } |
480 | /** |
481 | * Gets the {@code <PlatformProviderLocationOption>} dependency. |
482 | * <p> |
483 | * 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. |
484 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
485 | * </p> |
486 | * <dl> |
487 | * <dt><b>Final:</b></dt><dd>No</dd> |
488 | * </dl> |
489 | * @return The {@code <PlatformProviderLocationOption>} dependency. |
490 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
491 | */ |
492 | @SuppressWarnings("unused") |
493 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
494 | private org.apache.commons.cli.Option getPlatformProviderLocationOption() |
495 | { |
496 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "PlatformProviderLocationOption" ); |
497 | assert _d != null : "'PlatformProviderLocationOption' dependency not found."; |
498 | return _d; |
499 | } |
500 | /** |
501 | * Gets the {@code <ProviderLocationOption>} dependency. |
502 | * <p> |
503 | * This method returns the {@code <JOMC CLI Provider Location Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
504 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
505 | * </p> |
506 | * <dl> |
507 | * <dt><b>Final:</b></dt><dd>No</dd> |
508 | * </dl> |
509 | * @return The {@code <ProviderLocationOption>} dependency. |
510 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
511 | */ |
512 | @SuppressWarnings("unused") |
513 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
514 | private org.apache.commons.cli.Option getProviderLocationOption() |
515 | { |
516 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "ProviderLocationOption" ); |
517 | assert _d != null : "'ProviderLocationOption' dependency not found."; |
518 | return _d; |
519 | } |
520 | /** |
521 | * Gets the {@code <TransformerLocationOption>} dependency. |
522 | * <p> |
523 | * This method returns the {@code <JOMC CLI Transformer Location Option>} object of the {@code <JOMC CLI Command Option>} specification at specification level 1.2. |
524 | * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. |
525 | * </p> |
526 | * <dl> |
527 | * <dt><b>Final:</b></dt><dd>No</dd> |
528 | * </dl> |
529 | * @return The {@code <TransformerLocationOption>} dependency. |
530 | * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. |
531 | */ |
532 | @SuppressWarnings("unused") |
533 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
534 | private org.apache.commons.cli.Option getTransformerLocationOption() |
535 | { |
536 | final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "TransformerLocationOption" ); |
537 | assert _d != null : "'TransformerLocationOption' dependency not found."; |
538 | return _d; |
539 | } |
540 | // </editor-fold> |
541 | // SECTION-END |
542 | // SECTION-START[Properties] |
543 | // <editor-fold defaultstate="collapsed" desc=" Generated Properties "> |
544 | /** |
545 | * Gets the value of the {@code <abbreviatedCommandName>} property. |
546 | * <p><dl> |
547 | * <dt><b>Final:</b></dt><dd>No</dd> |
548 | * </dl></p> |
549 | * @return Abbreviated name of the command. |
550 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
551 | */ |
552 | @SuppressWarnings("unused") |
553 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
554 | private java.lang.String getAbbreviatedCommandName() |
555 | { |
556 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "abbreviatedCommandName" ); |
557 | assert _p != null : "'abbreviatedCommandName' property not found."; |
558 | return _p; |
559 | } |
560 | /** |
561 | * Gets the value of the {@code <applicationModlet>} property. |
562 | * <p><dl> |
563 | * <dt><b>Final:</b></dt><dd>Yes</dd> |
564 | * </dl></p> |
565 | * @return Name of the 'shaded' application modlet. |
566 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
567 | */ |
568 | @SuppressWarnings("unused") |
569 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
570 | private java.lang.String getApplicationModlet() |
571 | { |
572 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "applicationModlet" ); |
573 | assert _p != null : "'applicationModlet' property not found."; |
574 | return _p; |
575 | } |
576 | /** |
577 | * Gets the value of the {@code <commandName>} property. |
578 | * <p><dl> |
579 | * <dt><b>Final:</b></dt><dd>No</dd> |
580 | * </dl></p> |
581 | * @return Name of the command. |
582 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
583 | */ |
584 | @SuppressWarnings("unused") |
585 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
586 | private java.lang.String getCommandName() |
587 | { |
588 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "commandName" ); |
589 | assert _p != null : "'commandName' property not found."; |
590 | return _p; |
591 | } |
592 | /** |
593 | * Gets the value of the {@code <modletExcludes>} property. |
594 | * <p><dl> |
595 | * <dt><b>Final:</b></dt><dd>Yes</dd> |
596 | * </dl></p> |
597 | * @return List of modlet names to exclude from any {@code META-INF/jomc-modlet.xml} files separated by {@code :}. |
598 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
599 | */ |
600 | @SuppressWarnings("unused") |
601 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
602 | private java.lang.String getModletExcludes() |
603 | { |
604 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "modletExcludes" ); |
605 | assert _p != null : "'modletExcludes' property not found."; |
606 | return _p; |
607 | } |
608 | /** |
609 | * Gets the value of the {@code <providerExcludes>} property. |
610 | * <p><dl> |
611 | * <dt><b>Final:</b></dt><dd>Yes</dd> |
612 | * </dl></p> |
613 | * @return List of providers to exclude from any {@code META-INF/services} files separated by {@code :}. |
614 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
615 | */ |
616 | @SuppressWarnings("unused") |
617 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
618 | private java.lang.String getProviderExcludes() |
619 | { |
620 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "providerExcludes" ); |
621 | assert _p != null : "'providerExcludes' property not found."; |
622 | return _p; |
623 | } |
624 | /** |
625 | * Gets the value of the {@code <schemaExcludes>} property. |
626 | * <p><dl> |
627 | * <dt><b>Final:</b></dt><dd>Yes</dd> |
628 | * </dl></p> |
629 | * @return List of schema context-ids to exclude from any {@code META-INF/jomc-modlet.xml} files separated by {@code :}. |
630 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
631 | */ |
632 | @SuppressWarnings("unused") |
633 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
634 | private java.lang.String getSchemaExcludes() |
635 | { |
636 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "schemaExcludes" ); |
637 | assert _p != null : "'schemaExcludes' property not found."; |
638 | return _p; |
639 | } |
640 | /** |
641 | * Gets the value of the {@code <serviceExcludes>} property. |
642 | * <p><dl> |
643 | * <dt><b>Final:</b></dt><dd>Yes</dd> |
644 | * </dl></p> |
645 | * @return List of service classes to exclude from any {@code META-INF/jomc-modlet.xml} files separated by {@code :}. |
646 | * @throws org.jomc.ObjectManagementException if getting the property instance fails. |
647 | */ |
648 | @SuppressWarnings("unused") |
649 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
650 | private java.lang.String getServiceExcludes() |
651 | { |
652 | final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "serviceExcludes" ); |
653 | assert _p != null : "'serviceExcludes' property not found."; |
654 | return _p; |
655 | } |
656 | // </editor-fold> |
657 | // SECTION-END |
658 | // SECTION-START[Messages] |
659 | // <editor-fold defaultstate="collapsed" desc=" Generated Messages "> |
660 | /** |
661 | * Gets the text of the {@code <applicationTitle>} message. |
662 | * <p><dl> |
663 | * <dt><b>Languages:</b></dt> |
664 | * <dd>English (default)</dd> |
665 | * <dt><b>Final:</b></dt><dd>No</dd> |
666 | * </dl></p> |
667 | * @param locale The locale of the message to return. |
668 | * @return The text of the {@code <applicationTitle>} message for {@code locale}. |
669 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
670 | */ |
671 | @SuppressWarnings("unused") |
672 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
673 | private String getApplicationTitle( final java.util.Locale locale ) |
674 | { |
675 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "applicationTitle", locale ); |
676 | assert _m != null : "'applicationTitle' message not found."; |
677 | return _m; |
678 | } |
679 | /** |
680 | * Gets the text of the {@code <cannotProcessMessage>} message. |
681 | * <p><dl> |
682 | * <dt><b>Languages:</b></dt> |
683 | * <dd>English (default)</dd> |
684 | * <dd>Deutsch</dd> |
685 | * <dt><b>Final:</b></dt><dd>No</dd> |
686 | * </dl></p> |
687 | * @param locale The locale of the message to return. |
688 | * @param itemInfo Format argument. |
689 | * @param detailMessage Format argument. |
690 | * @return The text of the {@code <cannotProcessMessage>} message for {@code locale}. |
691 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
692 | */ |
693 | @SuppressWarnings("unused") |
694 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
695 | private String getCannotProcessMessage( final java.util.Locale locale, final java.lang.String itemInfo, final java.lang.String detailMessage ) |
696 | { |
697 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "cannotProcessMessage", locale, itemInfo, detailMessage ); |
698 | assert _m != null : "'cannotProcessMessage' message not found."; |
699 | return _m; |
700 | } |
701 | /** |
702 | * Gets the text of the {@code <classpathElementInfo>} message. |
703 | * <p><dl> |
704 | * <dt><b>Languages:</b></dt> |
705 | * <dd>English (default)</dd> |
706 | * <dd>Deutsch</dd> |
707 | * <dt><b>Final:</b></dt><dd>No</dd> |
708 | * </dl></p> |
709 | * @param locale The locale of the message to return. |
710 | * @param classpathElement Format argument. |
711 | * @return The text of the {@code <classpathElementInfo>} message for {@code locale}. |
712 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
713 | */ |
714 | @SuppressWarnings("unused") |
715 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
716 | private String getClasspathElementInfo( final java.util.Locale locale, final java.lang.String classpathElement ) |
717 | { |
718 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "classpathElementInfo", locale, classpathElement ); |
719 | assert _m != null : "'classpathElementInfo' message not found."; |
720 | return _m; |
721 | } |
722 | /** |
723 | * Gets the text of the {@code <classpathElementNotFoundWarning>} message. |
724 | * <p><dl> |
725 | * <dt><b>Languages:</b></dt> |
726 | * <dd>English (default)</dd> |
727 | * <dd>Deutsch</dd> |
728 | * <dt><b>Final:</b></dt><dd>No</dd> |
729 | * </dl></p> |
730 | * @param locale The locale of the message to return. |
731 | * @param fileName Format argument. |
732 | * @return The text of the {@code <classpathElementNotFoundWarning>} message for {@code locale}. |
733 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
734 | */ |
735 | @SuppressWarnings("unused") |
736 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
737 | private String getClasspathElementNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName ) |
738 | { |
739 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "classpathElementNotFoundWarning", locale, fileName ); |
740 | assert _m != null : "'classpathElementNotFoundWarning' message not found."; |
741 | return _m; |
742 | } |
743 | /** |
744 | * Gets the text of the {@code <commandFailureMessage>} message. |
745 | * <p><dl> |
746 | * <dt><b>Languages:</b></dt> |
747 | * <dd>English (default)</dd> |
748 | * <dd>Deutsch</dd> |
749 | * <dt><b>Final:</b></dt><dd>No</dd> |
750 | * </dl></p> |
751 | * @param locale The locale of the message to return. |
752 | * @param toolName Format argument. |
753 | * @return The text of the {@code <commandFailureMessage>} message for {@code locale}. |
754 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
755 | */ |
756 | @SuppressWarnings("unused") |
757 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
758 | private String getCommandFailureMessage( final java.util.Locale locale, final java.lang.String toolName ) |
759 | { |
760 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandFailureMessage", locale, toolName ); |
761 | assert _m != null : "'commandFailureMessage' message not found."; |
762 | return _m; |
763 | } |
764 | /** |
765 | * Gets the text of the {@code <commandInfoMessage>} message. |
766 | * <p><dl> |
767 | * <dt><b>Languages:</b></dt> |
768 | * <dd>English (default)</dd> |
769 | * <dd>Deutsch</dd> |
770 | * <dt><b>Final:</b></dt><dd>No</dd> |
771 | * </dl></p> |
772 | * @param locale The locale of the message to return. |
773 | * @param toolName Format argument. |
774 | * @return The text of the {@code <commandInfoMessage>} message for {@code locale}. |
775 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
776 | */ |
777 | @SuppressWarnings("unused") |
778 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
779 | private String getCommandInfoMessage( final java.util.Locale locale, final java.lang.String toolName ) |
780 | { |
781 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandInfoMessage", locale, toolName ); |
782 | assert _m != null : "'commandInfoMessage' message not found."; |
783 | return _m; |
784 | } |
785 | /** |
786 | * Gets the text of the {@code <commandSuccessMessage>} message. |
787 | * <p><dl> |
788 | * <dt><b>Languages:</b></dt> |
789 | * <dd>English (default)</dd> |
790 | * <dd>Deutsch</dd> |
791 | * <dt><b>Final:</b></dt><dd>No</dd> |
792 | * </dl></p> |
793 | * @param locale The locale of the message to return. |
794 | * @param toolName Format argument. |
795 | * @return The text of the {@code <commandSuccessMessage>} message for {@code locale}. |
796 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
797 | */ |
798 | @SuppressWarnings("unused") |
799 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
800 | private String getCommandSuccessMessage( final java.util.Locale locale, final java.lang.String toolName ) |
801 | { |
802 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "commandSuccessMessage", locale, toolName ); |
803 | assert _m != null : "'commandSuccessMessage' message not found."; |
804 | return _m; |
805 | } |
806 | /** |
807 | * Gets the text of the {@code <defaultLogLevelInfo>} message. |
808 | * <p><dl> |
809 | * <dt><b>Languages:</b></dt> |
810 | * <dd>English (default)</dd> |
811 | * <dd>Deutsch</dd> |
812 | * <dt><b>Final:</b></dt><dd>No</dd> |
813 | * </dl></p> |
814 | * @param locale The locale of the message to return. |
815 | * @param defaultLogLevel Format argument. |
816 | * @return The text of the {@code <defaultLogLevelInfo>} message for {@code locale}. |
817 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
818 | */ |
819 | @SuppressWarnings("unused") |
820 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
821 | private String getDefaultLogLevelInfo( final java.util.Locale locale, final java.lang.String defaultLogLevel ) |
822 | { |
823 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "defaultLogLevelInfo", locale, defaultLogLevel ); |
824 | assert _m != null : "'defaultLogLevelInfo' message not found."; |
825 | return _m; |
826 | } |
827 | /** |
828 | * Gets the text of the {@code <documentFileInfo>} message. |
829 | * <p><dl> |
830 | * <dt><b>Languages:</b></dt> |
831 | * <dd>English (default)</dd> |
832 | * <dd>Deutsch</dd> |
833 | * <dt><b>Final:</b></dt><dd>No</dd> |
834 | * </dl></p> |
835 | * @param locale The locale of the message to return. |
836 | * @param documentFile Format argument. |
837 | * @return The text of the {@code <documentFileInfo>} message for {@code locale}. |
838 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
839 | */ |
840 | @SuppressWarnings("unused") |
841 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
842 | private String getDocumentFileInfo( final java.util.Locale locale, final java.lang.String documentFile ) |
843 | { |
844 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "documentFileInfo", locale, documentFile ); |
845 | assert _m != null : "'documentFileInfo' message not found."; |
846 | return _m; |
847 | } |
848 | /** |
849 | * Gets the text of the {@code <documentFileNotFoundWarning>} message. |
850 | * <p><dl> |
851 | * <dt><b>Languages:</b></dt> |
852 | * <dd>English (default)</dd> |
853 | * <dd>Deutsch</dd> |
854 | * <dt><b>Final:</b></dt><dd>No</dd> |
855 | * </dl></p> |
856 | * @param locale The locale of the message to return. |
857 | * @param fileName Format argument. |
858 | * @return The text of the {@code <documentFileNotFoundWarning>} message for {@code locale}. |
859 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
860 | */ |
861 | @SuppressWarnings("unused") |
862 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
863 | private String getDocumentFileNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName ) |
864 | { |
865 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "documentFileNotFoundWarning", locale, fileName ); |
866 | assert _m != null : "'documentFileNotFoundWarning' message not found."; |
867 | return _m; |
868 | } |
869 | /** |
870 | * Gets the text of the {@code <excludedModletInfo>} message. |
871 | * <p><dl> |
872 | * <dt><b>Languages:</b></dt> |
873 | * <dd>English (default)</dd> |
874 | * <dd>Deutsch</dd> |
875 | * <dt><b>Final:</b></dt><dd>No</dd> |
876 | * </dl></p> |
877 | * @param locale The locale of the message to return. |
878 | * @param resourceName Format argument. |
879 | * @param modletIdentifier Format argument. |
880 | * @return The text of the {@code <excludedModletInfo>} message for {@code locale}. |
881 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
882 | */ |
883 | @SuppressWarnings("unused") |
884 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
885 | private String getExcludedModletInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String modletIdentifier ) |
886 | { |
887 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedModletInfo", locale, resourceName, modletIdentifier ); |
888 | assert _m != null : "'excludedModletInfo' message not found."; |
889 | return _m; |
890 | } |
891 | /** |
892 | * Gets the text of the {@code <excludedProviderInfo>} message. |
893 | * <p><dl> |
894 | * <dt><b>Languages:</b></dt> |
895 | * <dd>English (default)</dd> |
896 | * <dd>Deutsch</dd> |
897 | * <dt><b>Final:</b></dt><dd>No</dd> |
898 | * </dl></p> |
899 | * @param locale The locale of the message to return. |
900 | * @param resourceName Format argument. |
901 | * @param providerName Format argument. |
902 | * @return The text of the {@code <excludedProviderInfo>} message for {@code locale}. |
903 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
904 | */ |
905 | @SuppressWarnings("unused") |
906 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
907 | private String getExcludedProviderInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String providerName ) |
908 | { |
909 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedProviderInfo", locale, resourceName, providerName ); |
910 | assert _m != null : "'excludedProviderInfo' message not found."; |
911 | return _m; |
912 | } |
913 | /** |
914 | * Gets the text of the {@code <excludedSchemaInfo>} message. |
915 | * <p><dl> |
916 | * <dt><b>Languages:</b></dt> |
917 | * <dd>English (default)</dd> |
918 | * <dd>Deutsch</dd> |
919 | * <dt><b>Final:</b></dt><dd>No</dd> |
920 | * </dl></p> |
921 | * @param locale The locale of the message to return. |
922 | * @param resourceName Format argument. |
923 | * @param contextId Format argument. |
924 | * @return The text of the {@code <excludedSchemaInfo>} message for {@code locale}. |
925 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
926 | */ |
927 | @SuppressWarnings("unused") |
928 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
929 | private String getExcludedSchemaInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String contextId ) |
930 | { |
931 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedSchemaInfo", locale, resourceName, contextId ); |
932 | assert _m != null : "'excludedSchemaInfo' message not found."; |
933 | return _m; |
934 | } |
935 | /** |
936 | * Gets the text of the {@code <excludedServiceInfo>} message. |
937 | * <p><dl> |
938 | * <dt><b>Languages:</b></dt> |
939 | * <dd>English (default)</dd> |
940 | * <dd>Deutsch</dd> |
941 | * <dt><b>Final:</b></dt><dd>No</dd> |
942 | * </dl></p> |
943 | * @param locale The locale of the message to return. |
944 | * @param resourceName Format argument. |
945 | * @param serviceName Format argument. |
946 | * @return The text of the {@code <excludedServiceInfo>} message for {@code locale}. |
947 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
948 | */ |
949 | @SuppressWarnings("unused") |
950 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
951 | private String getExcludedServiceInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String serviceName ) |
952 | { |
953 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "excludedServiceInfo", locale, resourceName, serviceName ); |
954 | assert _m != null : "'excludedServiceInfo' message not found."; |
955 | return _m; |
956 | } |
957 | /** |
958 | * Gets the text of the {@code <invalidModelMessage>} message. |
959 | * <p><dl> |
960 | * <dt><b>Languages:</b></dt> |
961 | * <dd>English (default)</dd> |
962 | * <dd>Deutsch</dd> |
963 | * <dt><b>Final:</b></dt><dd>No</dd> |
964 | * </dl></p> |
965 | * @param locale The locale of the message to return. |
966 | * @param modelIdentifier Format argument. |
967 | * @return The text of the {@code <invalidModelMessage>} message for {@code locale}. |
968 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
969 | */ |
970 | @SuppressWarnings("unused") |
971 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
972 | private String getInvalidModelMessage( final java.util.Locale locale, final java.lang.String modelIdentifier ) |
973 | { |
974 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "invalidModelMessage", locale, modelIdentifier ); |
975 | assert _m != null : "'invalidModelMessage' message not found."; |
976 | return _m; |
977 | } |
978 | /** |
979 | * Gets the text of the {@code <longDescriptionMessage>} message. |
980 | * <p><dl> |
981 | * <dt><b>Languages:</b></dt> |
982 | * <dd>English (default)</dd> |
983 | * <dt><b>Final:</b></dt><dd>No</dd> |
984 | * </dl></p> |
985 | * @param locale The locale of the message to return. |
986 | * @return The text of the {@code <longDescriptionMessage>} message for {@code locale}. |
987 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
988 | */ |
989 | @SuppressWarnings("unused") |
990 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
991 | private String getLongDescriptionMessage( final java.util.Locale locale ) |
992 | { |
993 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "longDescriptionMessage", locale ); |
994 | assert _m != null : "'longDescriptionMessage' message not found."; |
995 | return _m; |
996 | } |
997 | /** |
998 | * Gets the text of the {@code <readingMessage>} message. |
999 | * <p><dl> |
1000 | * <dt><b>Languages:</b></dt> |
1001 | * <dd>English (default)</dd> |
1002 | * <dd>Deutsch</dd> |
1003 | * <dt><b>Final:</b></dt><dd>No</dd> |
1004 | * </dl></p> |
1005 | * @param locale The locale of the message to return. |
1006 | * @param locationInfo Format argument. |
1007 | * @return The text of the {@code <readingMessage>} message for {@code locale}. |
1008 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1009 | */ |
1010 | @SuppressWarnings("unused") |
1011 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
1012 | private String getReadingMessage( final java.util.Locale locale, final java.lang.String locationInfo ) |
1013 | { |
1014 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "readingMessage", locale, locationInfo ); |
1015 | assert _m != null : "'readingMessage' message not found."; |
1016 | return _m; |
1017 | } |
1018 | /** |
1019 | * Gets the text of the {@code <separator>} message. |
1020 | * <p><dl> |
1021 | * <dt><b>Languages:</b></dt> |
1022 | * <dd>English (default)</dd> |
1023 | * <dt><b>Final:</b></dt><dd>No</dd> |
1024 | * </dl></p> |
1025 | * @param locale The locale of the message to return. |
1026 | * @return The text of the {@code <separator>} message for {@code locale}. |
1027 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1028 | */ |
1029 | @SuppressWarnings("unused") |
1030 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
1031 | private String getSeparator( final java.util.Locale locale ) |
1032 | { |
1033 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "separator", locale ); |
1034 | assert _m != null : "'separator' message not found."; |
1035 | return _m; |
1036 | } |
1037 | /** |
1038 | * Gets the text of the {@code <shortDescriptionMessage>} message. |
1039 | * <p><dl> |
1040 | * <dt><b>Languages:</b></dt> |
1041 | * <dd>English (default)</dd> |
1042 | * <dt><b>Final:</b></dt><dd>No</dd> |
1043 | * </dl></p> |
1044 | * @param locale The locale of the message to return. |
1045 | * @return The text of the {@code <shortDescriptionMessage>} message for {@code locale}. |
1046 | * @throws org.jomc.ObjectManagementException if getting the message instance fails. |
1047 | */ |
1048 | @SuppressWarnings("unused") |
1049 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
1050 | private String getShortDescriptionMessage( final java.util.Locale locale ) |
1051 | { |
1052 | final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "shortDescriptionMessage", locale ); |
1053 | assert _m != null : "'shortDescriptionMessage' message not found."; |
1054 | return _m; |
1055 | } |
1056 | // </editor-fold> |
1057 | // SECTION-END |
1058 | // SECTION-START[Generated Command] |
1059 | // <editor-fold defaultstate="collapsed" desc=" Generated Options "> |
1060 | /** |
1061 | * Gets the options of the command. |
1062 | * <p><strong>Options:</strong> |
1063 | * <table border="1" width="100%" cellpadding="3" cellspacing="0"> |
1064 | * <tr class="TableSubHeadingColor"> |
1065 | * <th align="left" scope="col" nowrap><b>Specification</b></th> |
1066 | * <th align="left" scope="col" nowrap><b>Implementation</b></th> |
1067 | * </tr> |
1068 | * <tr class="TableRow"> |
1069 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1070 | * <td align="left" valign="top" nowrap>JOMC CLI Classpath Option</td> |
1071 | * </tr> |
1072 | * <tr class="TableRow"> |
1073 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1074 | * <td align="left" valign="top" nowrap>JOMC CLI Documents Option</td> |
1075 | * </tr> |
1076 | * <tr class="TableRow"> |
1077 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1078 | * <td align="left" valign="top" nowrap>JOMC CLI ModelContextFactory Class Name Option</td> |
1079 | * </tr> |
1080 | * <tr class="TableRow"> |
1081 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1082 | * <td align="left" valign="top" nowrap>JOMC CLI Model Option</td> |
1083 | * </tr> |
1084 | * <tr class="TableRow"> |
1085 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1086 | * <td align="left" valign="top" nowrap>JOMC CLI Modlet Location Option</td> |
1087 | * </tr> |
1088 | * <tr class="TableRow"> |
1089 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1090 | * <td align="left" valign="top" nowrap>JOMC CLI Modlet Schema System Id Option</td> |
1091 | * </tr> |
1092 | * <tr class="TableRow"> |
1093 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1094 | * <td align="left" valign="top" nowrap>JOMC CLI Module Location Option</td> |
1095 | * </tr> |
1096 | * <tr class="TableRow"> |
1097 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1098 | * <td align="left" valign="top" nowrap>JOMC CLI No Classpath Resolution Option</td> |
1099 | * </tr> |
1100 | * <tr class="TableRow"> |
1101 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1102 | * <td align="left" valign="top" nowrap>JOMC CLI No Model Processing Option</td> |
1103 | * </tr> |
1104 | * <tr class="TableRow"> |
1105 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1106 | * <td align="left" valign="top" nowrap>JOMC CLI No Model Resource Validation Option</td> |
1107 | * </tr> |
1108 | * <tr class="TableRow"> |
1109 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1110 | * <td align="left" valign="top" nowrap>JOMC CLI No Modlet Resource Validation Option</td> |
1111 | * </tr> |
1112 | * <tr class="TableRow"> |
1113 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1114 | * <td align="left" valign="top" nowrap>JOMC CLI Platform Provider Location Option</td> |
1115 | * </tr> |
1116 | * <tr class="TableRow"> |
1117 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1118 | * <td align="left" valign="top" nowrap>JOMC CLI Provider Location Option</td> |
1119 | * </tr> |
1120 | * <tr class="TableRow"> |
1121 | * <td align="left" valign="top" nowrap>JOMC CLI Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> |
1122 | * <td align="left" valign="top" nowrap>JOMC CLI Transformer Location Option</td> |
1123 | * </tr> |
1124 | * </table> |
1125 | * </p> |
1126 | * @return The options of the command. |
1127 | */ |
1128 | @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.3", comments = "See http://jomc.sourceforge.net/jomc/1.3/jomc-tools-1.3" ) |
1129 | @Override |
1130 | public org.apache.commons.cli.Options getOptions() |
1131 | { |
1132 | final org.apache.commons.cli.Options options = new org.apache.commons.cli.Options(); |
1133 | options.addOption( this.getClasspathOption() ); |
1134 | options.addOption( this.getDocumentsOption() ); |
1135 | options.addOption( this.getModelContextFactoryOption() ); |
1136 | options.addOption( this.getModelOption() ); |
1137 | options.addOption( this.getModletLocationOption() ); |
1138 | options.addOption( this.getModletSchemaSystemIdOption() ); |
1139 | options.addOption( this.getModuleLocationOption() ); |
1140 | options.addOption( this.getNoClasspathResolutionOption() ); |
1141 | options.addOption( this.getNoModelProcessingOption() ); |
1142 | options.addOption( this.getNoModelResourceValidation() ); |
1143 | options.addOption( this.getNoModletResourceValidation() ); |
1144 | options.addOption( this.getPlatformProviderLocationOption() ); |
1145 | options.addOption( this.getProviderLocationOption() ); |
1146 | options.addOption( this.getTransformerLocationOption() ); |
1147 | return options; |
1148 | } |
1149 | // </editor-fold> |
1150 | // SECTION-END |
1151 | } |