001// SECTION-START[License Header] 002// <editor-fold defaultstate="collapsed" desc=" Generated License "> 003/* 004 * Java Object Management and Configuration 005 * Copyright (C) Christian Schulte, 2005-206 006 * All rights reserved. 007 * 008 * Redistribution and use in source and binary forms, with or without 009 * modification, are permitted provided that the following conditions 010 * are met: 011 * 012 * o Redistributions of source code must retain the above copyright 013 * notice, this list of conditions and the following disclaimer. 014 * 015 * o Redistributions in binary form must reproduce the above copyright 016 * notice, this list of conditions and the following disclaimer in 017 * the documentation and/or other materials provided with the 018 * distribution. 019 * 020 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 021 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 022 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 023 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, 024 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 025 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 026 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 027 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 028 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 029 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 030 * 031 * $JOMC: AbstractModelCommand.java 4756 2013-01-04 08:01:00Z schulte $ 032 * 033 */ 034// </editor-fold> 035// SECTION-END 036package org.jomc.cli.commands; 037 038import java.io.File; 039import java.util.logging.Level; 040import javax.xml.bind.JAXBElement; 041import javax.xml.bind.JAXBException; 042import javax.xml.bind.Unmarshaller; 043import org.apache.commons.cli.CommandLine; 044import org.jomc.model.Module; 045import org.jomc.model.Modules; 046import org.jomc.model.modlet.DefaultModelProcessor; 047import org.jomc.model.modlet.DefaultModelProvider; 048import org.jomc.model.modlet.DefaultModelValidator; 049import org.jomc.model.modlet.ModelHelper; 050import org.jomc.modlet.Model; 051import org.jomc.modlet.ModelContext; 052import org.jomc.modlet.ModelException; 053import org.jomc.tools.modlet.ToolsModelProcessor; 054import org.jomc.tools.modlet.ToolsModelProvider; 055 056// SECTION-START[Documentation] 057// <editor-fold defaultstate="collapsed" desc=" Generated Documentation "> 058/** 059 * JOMC ⁑ CLI ⁑ model based command implementation. 060 * 061 * <dl> 062 * <dt><b>Identifier:</b></dt><dd>JOMC ⁑ CLI ⁑ Model Command</dd> 063 * <dt><b>Name:</b></dt><dd>JOMC ⁑ CLI ⁑ Model Command</dd> 064 * <dt><b>Specifications:</b></dt> 065 * <dd>JOMC ⁑ CLI ⁑ Command @ 1.0</dd> 066 * <dt><b>Abstract:</b></dt><dd>Yes</dd> 067 * <dt><b>Final:</b></dt><dd>No</dd> 068 * <dt><b>Stateless:</b></dt><dd>No</dd> 069 * </dl> 070 * 071 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 1.0 072 * @version 1.4.1 073 */ 074// </editor-fold> 075// SECTION-END 076// SECTION-START[Annotations] 077// <editor-fold defaultstate="collapsed" desc=" Generated Annotations "> 078@javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 079// </editor-fold> 080// SECTION-END 081public abstract class AbstractModelCommand extends AbstractModletCommand 082{ 083 // SECTION-START[Command] 084 // SECTION-END 085 // SECTION-START[AbstractModelCommand] 086 087 /** {@inheritDoc} */ 088 @Override 089 protected ModelContext createModelContext( final CommandLine commandLine, final ClassLoader classLoader ) 090 throws CommandExecutionException 091 { 092 if ( commandLine == null ) 093 { 094 throw new NullPointerException( "commandLine" ); 095 } 096 097 final ModelContext modelContext = super.createModelContext( commandLine, classLoader ); 098 099 if ( commandLine.hasOption( this.getTransformerLocationOption().getOpt() ) ) 100 { 101 modelContext.setAttribute( DefaultModelProcessor.TRANSFORMER_LOCATION_ATTRIBUTE_NAME, 102 commandLine.getOptionValue( this.getTransformerLocationOption().getOpt() ) ); 103 104 } 105 106 if ( commandLine.hasOption( this.getModuleLocationOption().getOpt() ) ) 107 { 108 modelContext.setAttribute( DefaultModelProvider.MODULE_LOCATION_ATTRIBUTE_NAME, 109 commandLine.getOptionValue( this.getModuleLocationOption().getOpt() ) ); 110 111 } 112 113 modelContext.setAttribute( ToolsModelProvider.MODEL_OBJECT_CLASSPATH_RESOLUTION_ENABLED_ATTRIBUTE_NAME, 114 !commandLine.hasOption( this.getNoClasspathResolutionOption().getOpt() ) ); 115 116 modelContext.setAttribute( ToolsModelProcessor.MODEL_OBJECT_CLASSPATH_RESOLUTION_ENABLED_ATTRIBUTE_NAME, 117 !commandLine.hasOption( this.getNoClasspathResolutionOption().getOpt() ) ); 118 119 modelContext.setAttribute( DefaultModelProvider.VALIDATING_ATTRIBUTE_NAME, 120 !commandLine.hasOption( this.getNoModelResourceValidation().getOpt() ) ); 121 122 modelContext.setAttribute( DefaultModelValidator.VALIDATE_JAVA_ATTRIBUTE_NAME, 123 !commandLine.hasOption( this.getNoJavaValidationOption().getOpt() ) ); 124 125 return modelContext; 126 } 127 128 /** 129 * Gets the model as specified by a given command line. 130 * 131 * @param context The context to use for getting the model. 132 * @param commandLine The command line specifying the model to get. 133 * 134 * @return The model as specified by {@code commandLine}. 135 * 136 * @throws CommandExecutionException if getting the model fails. 137 */ 138 protected Model getModel( final ModelContext context, final CommandLine commandLine ) 139 throws CommandExecutionException 140 { 141 try 142 { 143 Model model = new Model(); 144 model.setIdentifier( this.getModel( commandLine ) ); 145 Modules modules = new Modules(); 146 ModelHelper.setModules( model, modules ); 147 148 if ( commandLine.hasOption( this.getDocumentsOption().getOpt() ) ) 149 { 150 final Unmarshaller u = context.createUnmarshaller( model.getIdentifier() ); 151 152 if ( !commandLine.hasOption( this.getNoModelResourceValidation().getOpt() ) ) 153 { 154 u.setSchema( context.createSchema( model.getIdentifier() ) ); 155 } 156 157 for ( File f : this.getDocumentFiles( commandLine ) ) 158 { 159 if ( this.isLoggable( Level.FINEST ) ) 160 { 161 this.log( Level.FINEST, this.getReadingMessage( this.getLocale(), f.getAbsolutePath() ), null ); 162 } 163 164 Object o = u.unmarshal( f ); 165 if ( o instanceof JAXBElement<?> ) 166 { 167 o = ( (JAXBElement<?>) o ).getValue(); 168 } 169 170 if ( o instanceof Module ) 171 { 172 modules.getModule().add( (Module) o ); 173 } 174 else if ( o instanceof Modules ) 175 { 176 modules.getModule().addAll( ( (Modules) o ).getModule() ); 177 } 178 else if ( this.isLoggable( Level.WARNING ) ) 179 { 180 this.log( Level.WARNING, this.getCannotProcessMessage( 181 this.getLocale(), f.getAbsolutePath(), o.toString() ), null ); 182 183 } 184 } 185 } 186 187 if ( commandLine.hasOption( this.getClasspathOption().getOpt() ) ) 188 { 189 model = context.findModel( model ); 190 modules = ModelHelper.getModules( model ); 191 } 192 193 if ( modules != null && !commandLine.hasOption( this.getNoClasspathResolutionOption().getOpt() ) ) 194 { 195 final Module classpathModule = modules.getClasspathModule( 196 Modules.getDefaultClasspathModuleName(), context.getClassLoader() ); 197 198 if ( classpathModule != null && modules.getModule( classpathModule.getName() ) == null ) 199 { 200 modules.getModule().add( classpathModule ); 201 } 202 } 203 204 if ( !commandLine.hasOption( this.getNoModelProcessingOption().getOpt() ) ) 205 { 206 model = context.processModel( model ); 207 modules = ModelHelper.getModules( model ); 208 } 209 210 assert modules != null : "Modules '" + this.getModel( commandLine ) + "' not found."; 211 return model; 212 } 213 catch ( final ModelException e ) 214 { 215 throw new CommandExecutionException( getExceptionMessage( e ), e ); 216 } 217 catch ( final JAXBException e ) 218 { 219 String message = getExceptionMessage( e ); 220 if ( message == null ) 221 { 222 message = getExceptionMessage( e.getLinkedException() ); 223 } 224 225 throw new CommandExecutionException( message, e ); 226 } 227 } 228 229 // SECTION-END 230 // SECTION-START[Constructors] 231 // <editor-fold defaultstate="collapsed" desc=" Generated Constructors "> 232 /** Creates a new {@code AbstractModelCommand} instance. */ 233 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 234 public AbstractModelCommand() 235 { 236 // SECTION-START[Default Constructor] 237 super(); 238 // SECTION-END 239 } 240 // </editor-fold> 241 // SECTION-END 242 // SECTION-START[Dependencies] 243 // <editor-fold defaultstate="collapsed" desc=" Generated Dependencies "> 244 /** 245 * Gets the {@code <Classpath Option>} dependency. 246 * <p> 247 * This method returns the {@code <JOMC ⁑ CLI ⁑ Classpath Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2. 248 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 249 * </p> 250 * <dl> 251 * <dt><b>Final:</b></dt><dd>No</dd> 252 * </dl> 253 * @return The {@code <Classpath Option>} dependency. 254 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 255 */ 256 @SuppressWarnings("unused") 257 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 258 private org.apache.commons.cli.Option getClasspathOption() 259 { 260 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Classpath Option" ); 261 assert _d != null : "'Classpath Option' dependency not found."; 262 return _d; 263 } 264 /** 265 * Gets the {@code <Documents Option>} dependency. 266 * <p> 267 * This method returns the {@code <JOMC ⁑ CLI ⁑ Documents Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2. 268 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 269 * </p> 270 * <dl> 271 * <dt><b>Final:</b></dt><dd>No</dd> 272 * </dl> 273 * @return The {@code <Documents Option>} dependency. 274 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 275 */ 276 @SuppressWarnings("unused") 277 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 278 private org.apache.commons.cli.Option getDocumentsOption() 279 { 280 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Documents Option" ); 281 assert _d != null : "'Documents Option' dependency not found."; 282 return _d; 283 } 284 /** 285 * Gets the {@code <Locale>} dependency. 286 * <p> 287 * This method returns the {@code <default>} object of the {@code <java.util.Locale>} specification at specification level 1.1. 288 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 289 * </p> 290 * <dl> 291 * <dt><b>Final:</b></dt><dd>No</dd> 292 * </dl> 293 * @return The {@code <Locale>} dependency. 294 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 295 */ 296 @SuppressWarnings("unused") 297 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 298 private java.util.Locale getLocale() 299 { 300 final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" ); 301 assert _d != null : "'Locale' dependency not found."; 302 return _d; 303 } 304 /** 305 * Gets the {@code <Model Context Factory Option>} dependency. 306 * <p> 307 * 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. 308 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 309 * </p> 310 * <dl> 311 * <dt><b>Final:</b></dt><dd>No</dd> 312 * </dl> 313 * @return The {@code <Model Context Factory Option>} dependency. 314 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 315 */ 316 @SuppressWarnings("unused") 317 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 318 private org.apache.commons.cli.Option getModelContextFactoryOption() 319 { 320 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Model Context Factory Option" ); 321 assert _d != null : "'Model Context Factory Option' dependency not found."; 322 return _d; 323 } 324 /** 325 * Gets the {@code <Model Option>} dependency. 326 * <p> 327 * This method returns the {@code <JOMC ⁑ CLI ⁑ Model Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2. 328 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 329 * </p> 330 * <dl> 331 * <dt><b>Final:</b></dt><dd>No</dd> 332 * </dl> 333 * @return The {@code <Model Option>} dependency. 334 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 335 */ 336 @SuppressWarnings("unused") 337 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 338 private org.apache.commons.cli.Option getModelOption() 339 { 340 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Model Option" ); 341 assert _d != null : "'Model Option' dependency not found."; 342 return _d; 343 } 344 /** 345 * Gets the {@code <Modlet Location Option>} dependency. 346 * <p> 347 * This method returns the {@code <JOMC ⁑ CLI ⁑ Modlet Location Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2. 348 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 349 * </p> 350 * <dl> 351 * <dt><b>Final:</b></dt><dd>No</dd> 352 * </dl> 353 * @return The {@code <Modlet Location Option>} dependency. 354 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 355 */ 356 @SuppressWarnings("unused") 357 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 358 private org.apache.commons.cli.Option getModletLocationOption() 359 { 360 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Modlet Location Option" ); 361 assert _d != null : "'Modlet Location Option' dependency not found."; 362 return _d; 363 } 364 /** 365 * Gets the {@code <Modlet Schema System Id Option>} dependency. 366 * <p> 367 * 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. 368 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 369 * </p> 370 * <dl> 371 * <dt><b>Final:</b></dt><dd>No</dd> 372 * </dl> 373 * @return The {@code <Modlet Schema System Id Option>} dependency. 374 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 375 */ 376 @SuppressWarnings("unused") 377 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 378 private org.apache.commons.cli.Option getModletSchemaSystemIdOption() 379 { 380 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Modlet Schema System Id Option" ); 381 assert _d != null : "'Modlet Schema System Id Option' dependency not found."; 382 return _d; 383 } 384 /** 385 * Gets the {@code <Module Location Option>} dependency. 386 * <p> 387 * This method returns the {@code <JOMC ⁑ CLI ⁑ Module Location Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2. 388 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 389 * </p> 390 * <dl> 391 * <dt><b>Final:</b></dt><dd>No</dd> 392 * </dl> 393 * @return The {@code <Module Location Option>} dependency. 394 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 395 */ 396 @SuppressWarnings("unused") 397 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 398 private org.apache.commons.cli.Option getModuleLocationOption() 399 { 400 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Module Location Option" ); 401 assert _d != null : "'Module Location Option' dependency not found."; 402 return _d; 403 } 404 /** 405 * Gets the {@code <No Classpath Resolution Option>} dependency. 406 * <p> 407 * 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. 408 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 409 * </p> 410 * <dl> 411 * <dt><b>Final:</b></dt><dd>No</dd> 412 * </dl> 413 * @return The {@code <No Classpath Resolution Option>} dependency. 414 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 415 */ 416 @SuppressWarnings("unused") 417 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 418 private org.apache.commons.cli.Option getNoClasspathResolutionOption() 419 { 420 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Classpath Resolution Option" ); 421 assert _d != null : "'No Classpath Resolution Option' dependency not found."; 422 return _d; 423 } 424 /** 425 * Gets the {@code <No Java Validation Option>} dependency. 426 * <p> 427 * This method returns the {@code <JOMC ⁑ CLI ⁑ No Java Validation Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2. 428 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 429 * </p> 430 * <dl> 431 * <dt><b>Final:</b></dt><dd>No</dd> 432 * </dl> 433 * @return The {@code <No Java Validation Option>} dependency. 434 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 435 */ 436 @SuppressWarnings("unused") 437 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 438 private org.apache.commons.cli.Option getNoJavaValidationOption() 439 { 440 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Java Validation Option" ); 441 assert _d != null : "'No Java Validation Option' dependency not found."; 442 return _d; 443 } 444 /** 445 * Gets the {@code <No Model Processing Option>} dependency. 446 * <p> 447 * 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. 448 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 449 * </p> 450 * <dl> 451 * <dt><b>Final:</b></dt><dd>No</dd> 452 * </dl> 453 * @return The {@code <No Model Processing Option>} dependency. 454 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 455 */ 456 @SuppressWarnings("unused") 457 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 458 private org.apache.commons.cli.Option getNoModelProcessingOption() 459 { 460 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Model Processing Option" ); 461 assert _d != null : "'No Model Processing Option' dependency not found."; 462 return _d; 463 } 464 /** 465 * Gets the {@code <No Model Resource Validation>} dependency. 466 * <p> 467 * 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. 468 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 469 * </p> 470 * <dl> 471 * <dt><b>Final:</b></dt><dd>No</dd> 472 * </dl> 473 * @return The {@code <No Model Resource Validation>} dependency. 474 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 475 */ 476 @SuppressWarnings("unused") 477 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 478 private org.apache.commons.cli.Option getNoModelResourceValidation() 479 { 480 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Model Resource Validation" ); 481 assert _d != null : "'No Model Resource Validation' dependency not found."; 482 return _d; 483 } 484 /** 485 * Gets the {@code <No Modlet Resource Validation>} dependency. 486 * <p> 487 * 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. 488 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 489 * </p> 490 * <dl> 491 * <dt><b>Final:</b></dt><dd>No</dd> 492 * </dl> 493 * @return The {@code <No Modlet Resource Validation>} dependency. 494 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 495 */ 496 @SuppressWarnings("unused") 497 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 498 private org.apache.commons.cli.Option getNoModletResourceValidation() 499 { 500 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "No Modlet Resource Validation" ); 501 assert _d != null : "'No Modlet Resource Validation' dependency not found."; 502 return _d; 503 } 504 /** 505 * Gets the {@code <Platform Provider Location Option>} dependency. 506 * <p> 507 * 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. 508 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 509 * </p> 510 * <dl> 511 * <dt><b>Final:</b></dt><dd>No</dd> 512 * </dl> 513 * @return The {@code <Platform Provider Location Option>} dependency. 514 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 515 */ 516 @SuppressWarnings("unused") 517 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 518 private org.apache.commons.cli.Option getPlatformProviderLocationOption() 519 { 520 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Platform Provider Location Option" ); 521 assert _d != null : "'Platform Provider Location Option' dependency not found."; 522 return _d; 523 } 524 /** 525 * Gets the {@code <Provider Location Option>} dependency. 526 * <p> 527 * This method returns the {@code <JOMC ⁑ CLI ⁑ Provider Location Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2. 528 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 529 * </p> 530 * <dl> 531 * <dt><b>Final:</b></dt><dd>No</dd> 532 * </dl> 533 * @return The {@code <Provider Location Option>} dependency. 534 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 535 */ 536 @SuppressWarnings("unused") 537 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 538 private org.apache.commons.cli.Option getProviderLocationOption() 539 { 540 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Provider Location Option" ); 541 assert _d != null : "'Provider Location Option' dependency not found."; 542 return _d; 543 } 544 /** 545 * Gets the {@code <Transformer Location Option>} dependency. 546 * <p> 547 * This method returns the {@code <JOMC ⁑ CLI ⁑ Transformer Location Option>} object of the {@code <JOMC ⁑ CLI ⁑ Command Option>} specification at specification level 1.2. 548 * That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance. 549 * </p> 550 * <dl> 551 * <dt><b>Final:</b></dt><dd>No</dd> 552 * </dl> 553 * @return The {@code <Transformer Location Option>} dependency. 554 * @throws org.jomc.ObjectManagementException if getting the dependency instance fails. 555 */ 556 @SuppressWarnings("unused") 557 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 558 private org.apache.commons.cli.Option getTransformerLocationOption() 559 { 560 final org.apache.commons.cli.Option _d = (org.apache.commons.cli.Option) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Transformer Location Option" ); 561 assert _d != null : "'Transformer Location Option' dependency not found."; 562 return _d; 563 } 564 // </editor-fold> 565 // SECTION-END 566 // SECTION-START[Properties] 567 // <editor-fold defaultstate="collapsed" desc=" Generated Properties "> 568 /** 569 * Gets the value of the {@code <Abbreviated Command Name>} property. 570 * <p><dl> 571 * <dt><b>Final:</b></dt><dd>No</dd> 572 * </dl></p> 573 * @return Abbreviated name of the command. 574 * @throws org.jomc.ObjectManagementException if getting the property instance fails. 575 */ 576 @SuppressWarnings("unused") 577 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 578 private java.lang.String getAbbreviatedCommandName() 579 { 580 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Abbreviated Command Name" ); 581 assert _p != null : "'Abbreviated Command Name' property not found."; 582 return _p; 583 } 584 /** 585 * Gets the value of the {@code <Application Modlet>} property. 586 * <p><dl> 587 * <dt><b>Final:</b></dt><dd>Yes</dd> 588 * </dl></p> 589 * @return Name of the 'shaded' application modlet. 590 * @throws org.jomc.ObjectManagementException if getting the property instance fails. 591 */ 592 @SuppressWarnings("unused") 593 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 594 private java.lang.String getApplicationModlet() 595 { 596 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Application Modlet" ); 597 assert _p != null : "'Application Modlet' property not found."; 598 return _p; 599 } 600 /** 601 * Gets the value of the {@code <Command Name>} property. 602 * <p><dl> 603 * <dt><b>Final:</b></dt><dd>No</dd> 604 * </dl></p> 605 * @return Name of the command. 606 * @throws org.jomc.ObjectManagementException if getting the property instance fails. 607 */ 608 @SuppressWarnings("unused") 609 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 610 private java.lang.String getCommandName() 611 { 612 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Command Name" ); 613 assert _p != null : "'Command Name' property not found."; 614 return _p; 615 } 616 /** 617 * Gets the value of the {@code <Modlet Excludes>} property. 618 * <p><dl> 619 * <dt><b>Final:</b></dt><dd>Yes</dd> 620 * </dl></p> 621 * @return List of modlet names to exclude from any {@code META-INF/jomc-modlet.xml} files separated by {@code :}. 622 * @throws org.jomc.ObjectManagementException if getting the property instance fails. 623 */ 624 @SuppressWarnings("unused") 625 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 626 private java.lang.String getModletExcludes() 627 { 628 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Modlet Excludes" ); 629 assert _p != null : "'Modlet Excludes' property not found."; 630 return _p; 631 } 632 /** 633 * Gets the value of the {@code <Provider Excludes>} property. 634 * <p><dl> 635 * <dt><b>Final:</b></dt><dd>Yes</dd> 636 * </dl></p> 637 * @return List of providers to exclude from any {@code META-INF/services} files separated by {@code :}. 638 * @throws org.jomc.ObjectManagementException if getting the property instance fails. 639 */ 640 @SuppressWarnings("unused") 641 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 642 private java.lang.String getProviderExcludes() 643 { 644 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Provider Excludes" ); 645 assert _p != null : "'Provider Excludes' property not found."; 646 return _p; 647 } 648 /** 649 * Gets the value of the {@code <Schema Excludes>} property. 650 * <p><dl> 651 * <dt><b>Final:</b></dt><dd>Yes</dd> 652 * </dl></p> 653 * @return List of schema context-ids to exclude from any {@code META-INF/jomc-modlet.xml} files separated by {@code :}. 654 * @throws org.jomc.ObjectManagementException if getting the property instance fails. 655 */ 656 @SuppressWarnings("unused") 657 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 658 private java.lang.String getSchemaExcludes() 659 { 660 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Schema Excludes" ); 661 assert _p != null : "'Schema Excludes' property not found."; 662 return _p; 663 } 664 /** 665 * Gets the value of the {@code <Service Excludes>} property. 666 * <p><dl> 667 * <dt><b>Final:</b></dt><dd>Yes</dd> 668 * </dl></p> 669 * @return List of service classes to exclude from any {@code META-INF/jomc-modlet.xml} files separated by {@code :}. 670 * @throws org.jomc.ObjectManagementException if getting the property instance fails. 671 */ 672 @SuppressWarnings("unused") 673 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 674 private java.lang.String getServiceExcludes() 675 { 676 final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Service Excludes" ); 677 assert _p != null : "'Service Excludes' property not found."; 678 return _p; 679 } 680 // </editor-fold> 681 // SECTION-END 682 // SECTION-START[Messages] 683 // <editor-fold defaultstate="collapsed" desc=" Generated Messages "> 684 /** 685 * Gets the text of the {@code <Application Title>} message. 686 * <p><dl> 687 * <dt><b>Languages:</b></dt> 688 * <dd>English (default)</dd> 689 * <dt><b>Final:</b></dt><dd>No</dd> 690 * </dl></p> 691 * @param locale The locale of the message to return. 692 * @return The text of the {@code <Application Title>} message for {@code locale}. 693 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 694 */ 695 @SuppressWarnings("unused") 696 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 697 private String getApplicationTitle( final java.util.Locale locale ) 698 { 699 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Application Title", locale ); 700 assert _m != null : "'Application Title' message not found."; 701 return _m; 702 } 703 /** 704 * Gets the text of the {@code <Cannot Process Message>} message. 705 * <p><dl> 706 * <dt><b>Languages:</b></dt> 707 * <dd>English (default)</dd> 708 * <dd>Deutsch</dd> 709 * <dt><b>Final:</b></dt><dd>No</dd> 710 * </dl></p> 711 * @param locale The locale of the message to return. 712 * @param itemInfo Format argument. 713 * @param detailMessage Format argument. 714 * @return The text of the {@code <Cannot Process Message>} message for {@code locale}. 715 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 716 */ 717 @SuppressWarnings("unused") 718 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 719 private String getCannotProcessMessage( final java.util.Locale locale, final java.lang.String itemInfo, final java.lang.String detailMessage ) 720 { 721 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Cannot Process Message", locale, itemInfo, detailMessage ); 722 assert _m != null : "'Cannot Process Message' message not found."; 723 return _m; 724 } 725 /** 726 * Gets the text of the {@code <Classpath Element Info>} message. 727 * <p><dl> 728 * <dt><b>Languages:</b></dt> 729 * <dd>English (default)</dd> 730 * <dd>Deutsch</dd> 731 * <dt><b>Final:</b></dt><dd>No</dd> 732 * </dl></p> 733 * @param locale The locale of the message to return. 734 * @param classpathElement Format argument. 735 * @return The text of the {@code <Classpath Element Info>} message for {@code locale}. 736 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 737 */ 738 @SuppressWarnings("unused") 739 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 740 private String getClasspathElementInfo( final java.util.Locale locale, final java.lang.String classpathElement ) 741 { 742 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Classpath Element Info", locale, classpathElement ); 743 assert _m != null : "'Classpath Element Info' message not found."; 744 return _m; 745 } 746 /** 747 * Gets the text of the {@code <Classpath Element Not Found Warning>} message. 748 * <p><dl> 749 * <dt><b>Languages:</b></dt> 750 * <dd>English (default)</dd> 751 * <dd>Deutsch</dd> 752 * <dt><b>Final:</b></dt><dd>No</dd> 753 * </dl></p> 754 * @param locale The locale of the message to return. 755 * @param fileName Format argument. 756 * @return The text of the {@code <Classpath Element Not Found Warning>} message for {@code locale}. 757 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 758 */ 759 @SuppressWarnings("unused") 760 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 761 private String getClasspathElementNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName ) 762 { 763 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Classpath Element Not Found Warning", locale, fileName ); 764 assert _m != null : "'Classpath Element Not Found Warning' message not found."; 765 return _m; 766 } 767 /** 768 * Gets the text of the {@code <Command Failure Message>} message. 769 * <p><dl> 770 * <dt><b>Languages:</b></dt> 771 * <dd>English (default)</dd> 772 * <dd>Deutsch</dd> 773 * <dt><b>Final:</b></dt><dd>No</dd> 774 * </dl></p> 775 * @param locale The locale of the message to return. 776 * @param toolName Format argument. 777 * @return The text of the {@code <Command Failure Message>} message for {@code locale}. 778 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 779 */ 780 @SuppressWarnings("unused") 781 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 782 private String getCommandFailureMessage( final java.util.Locale locale, final java.lang.String toolName ) 783 { 784 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Failure Message", locale, toolName ); 785 assert _m != null : "'Command Failure Message' message not found."; 786 return _m; 787 } 788 /** 789 * Gets the text of the {@code <Command Info Message>} message. 790 * <p><dl> 791 * <dt><b>Languages:</b></dt> 792 * <dd>English (default)</dd> 793 * <dd>Deutsch</dd> 794 * <dt><b>Final:</b></dt><dd>No</dd> 795 * </dl></p> 796 * @param locale The locale of the message to return. 797 * @param toolName Format argument. 798 * @return The text of the {@code <Command Info Message>} message for {@code locale}. 799 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 800 */ 801 @SuppressWarnings("unused") 802 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 803 private String getCommandInfoMessage( final java.util.Locale locale, final java.lang.String toolName ) 804 { 805 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Info Message", locale, toolName ); 806 assert _m != null : "'Command Info Message' message not found."; 807 return _m; 808 } 809 /** 810 * Gets the text of the {@code <Command Success Message>} message. 811 * <p><dl> 812 * <dt><b>Languages:</b></dt> 813 * <dd>English (default)</dd> 814 * <dd>Deutsch</dd> 815 * <dt><b>Final:</b></dt><dd>No</dd> 816 * </dl></p> 817 * @param locale The locale of the message to return. 818 * @param toolName Format argument. 819 * @return The text of the {@code <Command Success Message>} message for {@code locale}. 820 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 821 */ 822 @SuppressWarnings("unused") 823 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 824 private String getCommandSuccessMessage( final java.util.Locale locale, final java.lang.String toolName ) 825 { 826 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Success Message", locale, toolName ); 827 assert _m != null : "'Command Success Message' message not found."; 828 return _m; 829 } 830 /** 831 * Gets the text of the {@code <Default Log Level Info>} message. 832 * <p><dl> 833 * <dt><b>Languages:</b></dt> 834 * <dd>English (default)</dd> 835 * <dd>Deutsch</dd> 836 * <dt><b>Final:</b></dt><dd>No</dd> 837 * </dl></p> 838 * @param locale The locale of the message to return. 839 * @param defaultLogLevel Format argument. 840 * @return The text of the {@code <Default Log Level Info>} message for {@code locale}. 841 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 842 */ 843 @SuppressWarnings("unused") 844 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 845 private String getDefaultLogLevelInfo( final java.util.Locale locale, final java.lang.String defaultLogLevel ) 846 { 847 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Default Log Level Info", locale, defaultLogLevel ); 848 assert _m != null : "'Default Log Level Info' message not found."; 849 return _m; 850 } 851 /** 852 * Gets the text of the {@code <Document File Info>} message. 853 * <p><dl> 854 * <dt><b>Languages:</b></dt> 855 * <dd>English (default)</dd> 856 * <dd>Deutsch</dd> 857 * <dt><b>Final:</b></dt><dd>No</dd> 858 * </dl></p> 859 * @param locale The locale of the message to return. 860 * @param documentFile Format argument. 861 * @return The text of the {@code <Document File Info>} message for {@code locale}. 862 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 863 */ 864 @SuppressWarnings("unused") 865 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 866 private String getDocumentFileInfo( final java.util.Locale locale, final java.lang.String documentFile ) 867 { 868 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Document File Info", locale, documentFile ); 869 assert _m != null : "'Document File Info' message not found."; 870 return _m; 871 } 872 /** 873 * Gets the text of the {@code <Document File Not Found Warning>} message. 874 * <p><dl> 875 * <dt><b>Languages:</b></dt> 876 * <dd>English (default)</dd> 877 * <dd>Deutsch</dd> 878 * <dt><b>Final:</b></dt><dd>No</dd> 879 * </dl></p> 880 * @param locale The locale of the message to return. 881 * @param fileName Format argument. 882 * @return The text of the {@code <Document File Not Found Warning>} message for {@code locale}. 883 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 884 */ 885 @SuppressWarnings("unused") 886 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 887 private String getDocumentFileNotFoundWarning( final java.util.Locale locale, final java.lang.String fileName ) 888 { 889 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Document File Not Found Warning", locale, fileName ); 890 assert _m != null : "'Document File Not Found Warning' message not found."; 891 return _m; 892 } 893 /** 894 * Gets the text of the {@code <Excluded Modlet Info>} message. 895 * <p><dl> 896 * <dt><b>Languages:</b></dt> 897 * <dd>English (default)</dd> 898 * <dd>Deutsch</dd> 899 * <dt><b>Final:</b></dt><dd>No</dd> 900 * </dl></p> 901 * @param locale The locale of the message to return. 902 * @param resourceName Format argument. 903 * @param modletIdentifier Format argument. 904 * @return The text of the {@code <Excluded Modlet Info>} message for {@code locale}. 905 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 906 */ 907 @SuppressWarnings("unused") 908 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 909 private String getExcludedModletInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String modletIdentifier ) 910 { 911 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Modlet Info", locale, resourceName, modletIdentifier ); 912 assert _m != null : "'Excluded Modlet Info' message not found."; 913 return _m; 914 } 915 /** 916 * Gets the text of the {@code <Excluded Provider Info>} message. 917 * <p><dl> 918 * <dt><b>Languages:</b></dt> 919 * <dd>English (default)</dd> 920 * <dd>Deutsch</dd> 921 * <dt><b>Final:</b></dt><dd>No</dd> 922 * </dl></p> 923 * @param locale The locale of the message to return. 924 * @param resourceName Format argument. 925 * @param providerName Format argument. 926 * @return The text of the {@code <Excluded Provider Info>} message for {@code locale}. 927 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 928 */ 929 @SuppressWarnings("unused") 930 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 931 private String getExcludedProviderInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String providerName ) 932 { 933 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Provider Info", locale, resourceName, providerName ); 934 assert _m != null : "'Excluded Provider Info' message not found."; 935 return _m; 936 } 937 /** 938 * Gets the text of the {@code <Excluded Schema Info>} message. 939 * <p><dl> 940 * <dt><b>Languages:</b></dt> 941 * <dd>English (default)</dd> 942 * <dd>Deutsch</dd> 943 * <dt><b>Final:</b></dt><dd>No</dd> 944 * </dl></p> 945 * @param locale The locale of the message to return. 946 * @param resourceName Format argument. 947 * @param contextId Format argument. 948 * @return The text of the {@code <Excluded Schema Info>} message for {@code locale}. 949 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 950 */ 951 @SuppressWarnings("unused") 952 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 953 private String getExcludedSchemaInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String contextId ) 954 { 955 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Schema Info", locale, resourceName, contextId ); 956 assert _m != null : "'Excluded Schema Info' message not found."; 957 return _m; 958 } 959 /** 960 * Gets the text of the {@code <Excluded Service Info>} 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 resourceName Format argument. 969 * @param serviceName Format argument. 970 * @return The text of the {@code <Excluded Service Info>} message for {@code locale}. 971 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 972 */ 973 @SuppressWarnings("unused") 974 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 975 private String getExcludedServiceInfo( final java.util.Locale locale, final java.lang.String resourceName, final java.lang.String serviceName ) 976 { 977 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Excluded Service Info", locale, resourceName, serviceName ); 978 assert _m != null : "'Excluded Service Info' message not found."; 979 return _m; 980 } 981 /** 982 * Gets the text of the {@code <Invalid Model Message>} message. 983 * <p><dl> 984 * <dt><b>Languages:</b></dt> 985 * <dd>English (default)</dd> 986 * <dd>Deutsch</dd> 987 * <dt><b>Final:</b></dt><dd>No</dd> 988 * </dl></p> 989 * @param locale The locale of the message to return. 990 * @param modelIdentifier Format argument. 991 * @return The text of the {@code <Invalid Model Message>} message for {@code locale}. 992 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 993 */ 994 @SuppressWarnings("unused") 995 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 996 private String getInvalidModelMessage( final java.util.Locale locale, final java.lang.String modelIdentifier ) 997 { 998 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Invalid Model Message", locale, modelIdentifier ); 999 assert _m != null : "'Invalid Model Message' message not found."; 1000 return _m; 1001 } 1002 /** 1003 * Gets the text of the {@code <Long Description Message>} message. 1004 * <p><dl> 1005 * <dt><b>Languages:</b></dt> 1006 * <dd>English (default)</dd> 1007 * <dt><b>Final:</b></dt><dd>No</dd> 1008 * </dl></p> 1009 * @param locale The locale of the message to return. 1010 * @return The text of the {@code <Long Description Message>} message for {@code locale}. 1011 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 1012 */ 1013 @SuppressWarnings("unused") 1014 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 1015 private String getLongDescriptionMessage( final java.util.Locale locale ) 1016 { 1017 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Long Description Message", locale ); 1018 assert _m != null : "'Long Description Message' message not found."; 1019 return _m; 1020 } 1021 /** 1022 * Gets the text of the {@code <Reading Message>} message. 1023 * <p><dl> 1024 * <dt><b>Languages:</b></dt> 1025 * <dd>English (default)</dd> 1026 * <dd>Deutsch</dd> 1027 * <dt><b>Final:</b></dt><dd>No</dd> 1028 * </dl></p> 1029 * @param locale The locale of the message to return. 1030 * @param locationInfo Format argument. 1031 * @return The text of the {@code <Reading Message>} message for {@code locale}. 1032 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 1033 */ 1034 @SuppressWarnings("unused") 1035 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 1036 private String getReadingMessage( final java.util.Locale locale, final java.lang.String locationInfo ) 1037 { 1038 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Reading Message", locale, locationInfo ); 1039 assert _m != null : "'Reading Message' message not found."; 1040 return _m; 1041 } 1042 /** 1043 * Gets the text of the {@code <Separator>} message. 1044 * <p><dl> 1045 * <dt><b>Languages:</b></dt> 1046 * <dd>English (default)</dd> 1047 * <dt><b>Final:</b></dt><dd>No</dd> 1048 * </dl></p> 1049 * @param locale The locale of the message to return. 1050 * @return The text of the {@code <Separator>} message for {@code locale}. 1051 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 1052 */ 1053 @SuppressWarnings("unused") 1054 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 1055 private String getSeparator( final java.util.Locale locale ) 1056 { 1057 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Separator", locale ); 1058 assert _m != null : "'Separator' message not found."; 1059 return _m; 1060 } 1061 /** 1062 * Gets the text of the {@code <Short Description Message>} message. 1063 * <p><dl> 1064 * <dt><b>Languages:</b></dt> 1065 * <dd>English (default)</dd> 1066 * <dt><b>Final:</b></dt><dd>No</dd> 1067 * </dl></p> 1068 * @param locale The locale of the message to return. 1069 * @return The text of the {@code <Short Description Message>} message for {@code locale}. 1070 * @throws org.jomc.ObjectManagementException if getting the message instance fails. 1071 */ 1072 @SuppressWarnings("unused") 1073 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 1074 private String getShortDescriptionMessage( final java.util.Locale locale ) 1075 { 1076 final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Short Description Message", locale ); 1077 assert _m != null : "'Short Description Message' message not found."; 1078 return _m; 1079 } 1080 // </editor-fold> 1081 // SECTION-END 1082 // SECTION-START[Generated Command] 1083 // <editor-fold defaultstate="collapsed" desc=" Generated Options "> 1084 /** 1085 * Gets the options of the command. 1086 * <p><strong>Options:</strong> 1087 * <table border="1" width="100%" cellpadding="3" cellspacing="0"> 1088 * <tr class="TableSubHeadingColor"> 1089 * <th align="left" scope="col" nowrap><b>Specification</b></th> 1090 * <th align="left" scope="col" nowrap><b>Implementation</b></th> 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 ⁑ Classpath 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 ⁑ Documents 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 ⁑ ModelContextFactory Class Name 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 ⁑ Model 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 ⁑ Modlet Location 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 ⁑ Modlet Schema System Id 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 ⁑ Module 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 ⁑ No Classpath Resolution Option</td> 1123 * </tr> 1124 * <tr class="TableRow"> 1125 * <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> 1126 * <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ No Java Validation Option</td> 1127 * </tr> 1128 * <tr class="TableRow"> 1129 * <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> 1130 * <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ No Model Processing Option</td> 1131 * </tr> 1132 * <tr class="TableRow"> 1133 * <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> 1134 * <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ No Model Resource Validation Option</td> 1135 * </tr> 1136 * <tr class="TableRow"> 1137 * <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> 1138 * <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ No Modlet Resource Validation Option</td> 1139 * </tr> 1140 * <tr class="TableRow"> 1141 * <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> 1142 * <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Platform Provider Location Option</td> 1143 * </tr> 1144 * <tr class="TableRow"> 1145 * <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> 1146 * <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Provider Location Option</td> 1147 * </tr> 1148 * <tr class="TableRow"> 1149 * <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Command Option {@code (org.apache.commons.cli.Option)} @ 1.2</td> 1150 * <td align="left" valign="top" nowrap>JOMC ⁑ CLI ⁑ Transformer Location Option</td> 1151 * </tr> 1152 * </table> 1153 * </p> 1154 * @return The options of the command. 1155 */ 1156 @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" ) 1157 @Override 1158 public org.apache.commons.cli.Options getOptions() 1159 { 1160 final org.apache.commons.cli.Options options = new org.apache.commons.cli.Options(); 1161 options.addOption( this.getClasspathOption() ); 1162 options.addOption( this.getDocumentsOption() ); 1163 options.addOption( this.getModelContextFactoryOption() ); 1164 options.addOption( this.getModelOption() ); 1165 options.addOption( this.getModletLocationOption() ); 1166 options.addOption( this.getModletSchemaSystemIdOption() ); 1167 options.addOption( this.getModuleLocationOption() ); 1168 options.addOption( this.getNoClasspathResolutionOption() ); 1169 options.addOption( this.getNoJavaValidationOption() ); 1170 options.addOption( this.getNoModelProcessingOption() ); 1171 options.addOption( this.getNoModelResourceValidation() ); 1172 options.addOption( this.getNoModletResourceValidation() ); 1173 options.addOption( this.getPlatformProviderLocationOption() ); 1174 options.addOption( this.getProviderLocationOption() ); 1175 options.addOption( this.getTransformerLocationOption() ); 1176 return options; 1177 } 1178 // </editor-fold> 1179 // SECTION-END 1180}