View Javadoc

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: AbstractCommand.java 4712 2013-01-02 13:56:12Z schulte $
32   *
33   */
34  // </editor-fold>
35  // SECTION-END
36  package org.jomc.cli.commands;
37  
38  import java.util.LinkedList;
39  import java.util.List;
40  import java.util.Locale;
41  import java.util.logging.Level;
42  import org.apache.commons.cli.CommandLine;
43  
44  // SECTION-START[Documentation]
45  // <editor-fold defaultstate="collapsed" desc=" Generated Documentation ">
46  /**
47   * JOMC ⁑ CLI ⁑ command implementation.
48   *
49   * <dl>
50   *   <dt><b>Identifier:</b></dt><dd>JOMC ⁑ CLI ⁑ Command</dd>
51   *   <dt><b>Name:</b></dt><dd>JOMC ⁑ CLI ⁑ Command</dd>
52   *   <dt><b>Specifications:</b></dt>
53   *     <dd>JOMC ⁑ CLI ⁑ Command @ 1.0</dd>
54   *   <dt><b>Abstract:</b></dt><dd>Yes</dd>
55   *   <dt><b>Final:</b></dt><dd>No</dd>
56   *   <dt><b>Stateless:</b></dt><dd>No</dd>
57   * </dl>
58   *
59   * @author <a href="mailto:cs@schulte.it">Christian Schulte</a> 1.0
60   * @version 1.4
61   */
62  // </editor-fold>
63  // SECTION-END
64  // SECTION-START[Annotations]
65  // <editor-fold defaultstate="collapsed" desc=" Generated Annotations ">
66  @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
67  // </editor-fold>
68  // SECTION-END
69  public abstract class AbstractCommand
70      implements
71      org.jomc.cli.Command
72  {
73      // SECTION-START[Command]
74  
75      /** The listeners of the instance. */
76      private List<Listener> listeners;
77  
78      /** Log level of the instance. */
79      private Level logLevel;
80  
81      /**
82       * Gets the list of registered listeners.
83       * <p>This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make
84       * to the returned list will be present inside the object. This is why there is no {@code set} method for the
85       * listeners property.</p>
86       *
87       * @return The list of registered listeners.
88       *
89       * @see #log(java.util.logging.Level, java.lang.String, java.lang.Throwable)
90       */
91      public final List<Listener> getListeners()
92      {
93          if ( this.listeners == null )
94          {
95              this.listeners = new LinkedList<Listener>();
96          }
97  
98          return this.listeners;
99      }
100 
101     /**
102      * Gets the log level of the instance.
103      *
104      * @return The log level of the instance.
105      *
106      * @see #getDefaultLogLevel()
107      * @see #setLogLevel(java.util.logging.Level)
108      * @see #isLoggable(java.util.logging.Level)
109      */
110     public final Level getLogLevel()
111     {
112         if ( this.logLevel == null )
113         {
114             this.logLevel = getDefaultLogLevel();
115 
116             if ( this.isLoggable( Level.CONFIG ) )
117             {
118                 this.log( Level.CONFIG,
119                           this.getDefaultLogLevelInfo( this.getLocale(), this.logLevel.getLocalizedName() ), null );
120 
121             }
122         }
123 
124         return this.logLevel;
125     }
126 
127     /**
128      * Sets the log level of the instance.
129      *
130      * @param value The new log level of the instance or {@code null}.
131      *
132      * @see #getLogLevel()
133      * @see #isLoggable(java.util.logging.Level)
134      */
135     public final void setLogLevel( final Level value )
136     {
137         this.logLevel = value;
138     }
139 
140     public final String getName()
141     {
142         return this.getCommandName();
143     }
144 
145     public final String getAbbreviatedName()
146     {
147         return this.getAbbreviatedCommandName();
148     }
149 
150     public final String getShortDescription( final Locale locale )
151     {
152         return this.getShortDescriptionMessage( locale );
153     }
154 
155     public final String getLongDescription( final Locale locale )
156     {
157         return this.getLongDescriptionMessage( locale );
158     }
159 
160     public final int execute( final CommandLine commandLine )
161     {
162         if ( commandLine == null )
163         {
164             throw new NullPointerException( "commandLine" );
165         }
166 
167         int status;
168 
169         try
170         {
171             if ( this.isLoggable( Level.INFO ) )
172             {
173                 this.log( Level.INFO, this.getSeparator( this.getLocale() ), null );
174                 this.log( Level.INFO, this.getApplicationTitle( this.getLocale() ), null );
175                 this.log( Level.INFO, this.getSeparator( this.getLocale() ), null );
176                 this.log( Level.INFO, this.getCommandInfoMessage( this.getLocale(), this.getCommandName() ), null );
177             }
178 
179             this.preExecuteCommand( commandLine );
180             this.executeCommand( commandLine );
181             status = STATUS_SUCCESS;
182         }
183         catch ( final Throwable t )
184         {
185             this.log( Level.SEVERE, null, t );
186             status = STATUS_FAILURE;
187         }
188         finally
189         {
190             try
191             {
192                 this.postExecuteCommand( commandLine );
193             }
194             catch ( final Throwable t )
195             {
196                 this.log( Level.SEVERE, null, t );
197                 status = STATUS_FAILURE;
198             }
199         }
200 
201         if ( this.isLoggable( Level.INFO ) )
202         {
203             if ( status == STATUS_SUCCESS )
204             {
205                 this.log( Level.INFO, this.getCommandSuccessMessage( this.getLocale(), this.getCommandName() ), null );
206             }
207             else if ( status == STATUS_FAILURE )
208             {
209                 this.log( Level.INFO, this.getCommandFailureMessage( this.getLocale(), this.getCommandName() ), null );
210             }
211 
212             this.log( Level.INFO, this.getSeparator( this.getLocale() ), null );
213         }
214 
215         return status;
216     }
217 
218     // SECTION-END
219     // SECTION-START[AbstractCommand]
220     /** Default log level. */
221     private static volatile Level defaultLogLevel;
222 
223     /**
224      * Gets the default log level events are logged at.
225      * <p>The default log level is controlled by system property
226      * {@code org.jomc.cli.commands.AbstractCommand.defaultLogLevel} holding the log level to log events at by
227      * default. If that property is not set, the {@code WARNING} default is returned.</p>
228      *
229      * @return The log level events are logged at by default.
230      *
231      * @see #getLogLevel()
232      * @see Level#parse(java.lang.String)
233      */
234     public static Level getDefaultLogLevel()
235     {
236         if ( defaultLogLevel == null )
237         {
238             defaultLogLevel = Level.parse(
239                 System.getProperty( "org.jomc.cli.command.AbstractJomcCommand.defaultLogLevel",
240                                     System.getProperty( "org.jomc.cli.commands.AbstractCommand.defaultLogLevel",
241                                                         Level.WARNING.getName() ) ) );
242 
243         }
244 
245         return defaultLogLevel;
246     }
247 
248     /**
249      * Sets the default log level events are logged at.
250      *
251      * @param value The new default level events are logged at or {@code null}.
252      *
253      * @see #getDefaultLogLevel()
254      */
255     public static void setDefaultLogLevel( final Level value )
256     {
257         defaultLogLevel = value;
258     }
259 
260     /**
261      * Checks if a message at a given level is provided to the listeners of the instance.
262      *
263      * @param level The level to test.
264      *
265      * @return {@code true}, if messages at {@code level} are provided to the listeners of the instance;
266      * {@code false}, if messages at {@code level} are not provided to the listeners of the instance.
267      *
268      * @throws NullPointerException if {@code level} is {@code null}.
269      *
270      * @see #getLogLevel()
271      * @see #setLogLevel(java.util.logging.Level)
272      */
273     protected boolean isLoggable( final Level level )
274     {
275         if ( level == null )
276         {
277             throw new NullPointerException( "level" );
278         }
279 
280         return level.intValue() >= this.getLogLevel().intValue();
281     }
282 
283     /**
284      * Notifies registered listeners.
285      *
286      * @param level The level of the event.
287      * @param message The message of the event or {@code null}.
288      * @param throwable The throwable of the event {@code null}.
289      *
290      * @throws NullPointerException if {@code level} is {@code null}.
291      *
292      * @see #getListeners()
293      * @see #isLoggable(java.util.logging.Level)
294      */
295     protected void log( final Level level, final String message, final Throwable throwable )
296     {
297         if ( level == null )
298         {
299             throw new NullPointerException( "level" );
300         }
301 
302         if ( this.isLoggable( level ) )
303         {
304             for ( Listener l : this.getListeners() )
305             {
306                 l.onLog( level, message, throwable );
307             }
308         }
309     }
310 
311     /**
312      * Called by the {@code execute} method prior to the {@code executeCommand} method.
313      *
314      * @param commandLine The command line to execute.
315      *
316      * @throws NullPointerException if {@code commandLine} is {@code null}.
317      * @throws CommandExecutionException if executing the command fails.
318      *
319      * @see #execute(org.apache.commons.cli.CommandLine)
320      */
321     protected void preExecuteCommand( final CommandLine commandLine ) throws CommandExecutionException
322     {
323         if ( commandLine == null )
324         {
325             throw new NullPointerException( "commandLine" );
326         }
327     }
328 
329     /**
330      * Called by the {@code execute} method prior to the {@code postExecuteCommand} method.
331      *
332      * @param commandLine The command line to execute.
333      *
334      * @throws CommandExecutionException if executing the command fails.
335      *
336      * @see #execute(org.apache.commons.cli.CommandLine)
337      */
338     protected abstract void executeCommand( final CommandLine commandLine ) throws CommandExecutionException;
339 
340     /**
341      * Called by the {@code execute} method after the {@code preExecuteCommand}/{@code executeCommand} methods even if
342      * those methods threw an exception.
343      *
344      * @param commandLine The command line to execute.
345      *
346      * @throws NullPointerException if {@code commandLine} is {@code null}.
347      * @throws CommandExecutionException if executing the command fails.
348      *
349      * @see #execute(org.apache.commons.cli.CommandLine)
350      */
351     protected void postExecuteCommand( final CommandLine commandLine ) throws CommandExecutionException
352     {
353         if ( commandLine == null )
354         {
355             throw new NullPointerException( "commandLine" );
356         }
357     }
358 
359     /**
360      * Gets a message of a given throwable recursively.
361      *
362      * @param t The {@code Throwable} to get the message of or {@code null}.
363      *
364      * @return The message associated with {@code t} or {@code null}.
365      */
366     protected static String getExceptionMessage( final Throwable t )
367     {
368         return t != null ? t.getMessage() != null ? t.getMessage() : getExceptionMessage( t.getCause() ) : null;
369     }
370 
371     // SECTION-END
372     // SECTION-START[Constructors]
373     // <editor-fold defaultstate="collapsed" desc=" Generated Constructors ">
374     /** Creates a new {@code AbstractCommand} instance. */
375     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
376     public AbstractCommand()
377     {
378         // SECTION-START[Default Constructor]
379         super();
380         // SECTION-END
381     }
382     // </editor-fold>
383     // SECTION-END
384     // SECTION-START[Dependencies]
385     // <editor-fold defaultstate="collapsed" desc=" Generated Dependencies ">
386     /**
387      * Gets the {@code <Locale>} dependency.
388      * <p>
389      *   This method returns the {@code <default>} object of the {@code <java.util.Locale>} specification at specification level 1.1.
390      *   That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.
391      * </p>
392      * <dl>
393      *   <dt><b>Final:</b></dt><dd>No</dd>
394      * </dl>
395      * @return The {@code <Locale>} dependency.
396      * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
397      */
398     @SuppressWarnings("unused")
399     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
400     private java.util.Locale getLocale()
401     {
402         final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" );
403         assert _d != null : "'Locale' dependency not found.";
404         return _d;
405     }
406     // </editor-fold>
407     // SECTION-END
408     // SECTION-START[Properties]
409     // <editor-fold defaultstate="collapsed" desc=" Generated Properties ">
410     /**
411      * Gets the value of the {@code <Abbreviated Command Name>} property.
412      * <p><dl>
413      *   <dt><b>Final:</b></dt><dd>No</dd>
414      * </dl></p>
415      * @return Abbreviated name of the command.
416      * @throws org.jomc.ObjectManagementException if getting the property instance fails.
417      */
418     @SuppressWarnings("unused")
419     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
420     private java.lang.String getAbbreviatedCommandName()
421     {
422         final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Abbreviated Command Name" );
423         assert _p != null : "'Abbreviated Command Name' property not found.";
424         return _p;
425     }
426     /**
427      * Gets the value of the {@code <Command Name>} property.
428      * <p><dl>
429      *   <dt><b>Final:</b></dt><dd>No</dd>
430      * </dl></p>
431      * @return Name of the command.
432      * @throws org.jomc.ObjectManagementException if getting the property instance fails.
433      */
434     @SuppressWarnings("unused")
435     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
436     private java.lang.String getCommandName()
437     {
438         final java.lang.String _p = (java.lang.String) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getProperty( this, "Command Name" );
439         assert _p != null : "'Command Name' property not found.";
440         return _p;
441     }
442     // </editor-fold>
443     // SECTION-END
444     // SECTION-START[Messages]
445     // <editor-fold defaultstate="collapsed" desc=" Generated Messages ">
446     /**
447      * Gets the text of the {@code <Application Title>} message.
448      * <p><dl>
449      *   <dt><b>Languages:</b></dt>
450      *     <dd>English (default)</dd>
451      *   <dt><b>Final:</b></dt><dd>No</dd>
452      * </dl></p>
453      * @param locale The locale of the message to return.
454      * @return The text of the {@code <Application Title>} message for {@code locale}.
455      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
456      */
457     @SuppressWarnings("unused")
458     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
459     private String getApplicationTitle( final java.util.Locale locale )
460     {
461         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Application Title", locale );
462         assert _m != null : "'Application Title' message not found.";
463         return _m;
464     }
465     /**
466      * Gets the text of the {@code <Command Failure Message>} message.
467      * <p><dl>
468      *   <dt><b>Languages:</b></dt>
469      *     <dd>English (default)</dd>
470      *     <dd>Deutsch</dd>
471      *   <dt><b>Final:</b></dt><dd>No</dd>
472      * </dl></p>
473      * @param locale The locale of the message to return.
474      * @param toolName Format argument.
475      * @return The text of the {@code <Command Failure Message>} message for {@code locale}.
476      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
477      */
478     @SuppressWarnings("unused")
479     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
480     private String getCommandFailureMessage( final java.util.Locale locale, final java.lang.String toolName )
481     {
482         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Failure Message", locale, toolName );
483         assert _m != null : "'Command Failure Message' message not found.";
484         return _m;
485     }
486     /**
487      * Gets the text of the {@code <Command Info Message>} message.
488      * <p><dl>
489      *   <dt><b>Languages:</b></dt>
490      *     <dd>English (default)</dd>
491      *     <dd>Deutsch</dd>
492      *   <dt><b>Final:</b></dt><dd>No</dd>
493      * </dl></p>
494      * @param locale The locale of the message to return.
495      * @param toolName Format argument.
496      * @return The text of the {@code <Command Info Message>} message for {@code locale}.
497      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
498      */
499     @SuppressWarnings("unused")
500     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
501     private String getCommandInfoMessage( final java.util.Locale locale, final java.lang.String toolName )
502     {
503         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Info Message", locale, toolName );
504         assert _m != null : "'Command Info Message' message not found.";
505         return _m;
506     }
507     /**
508      * Gets the text of the {@code <Command Success Message>} message.
509      * <p><dl>
510      *   <dt><b>Languages:</b></dt>
511      *     <dd>English (default)</dd>
512      *     <dd>Deutsch</dd>
513      *   <dt><b>Final:</b></dt><dd>No</dd>
514      * </dl></p>
515      * @param locale The locale of the message to return.
516      * @param toolName Format argument.
517      * @return The text of the {@code <Command Success Message>} message for {@code locale}.
518      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
519      */
520     @SuppressWarnings("unused")
521     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
522     private String getCommandSuccessMessage( final java.util.Locale locale, final java.lang.String toolName )
523     {
524         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Command Success Message", locale, toolName );
525         assert _m != null : "'Command Success Message' message not found.";
526         return _m;
527     }
528     /**
529      * Gets the text of the {@code <Default Log Level Info>} message.
530      * <p><dl>
531      *   <dt><b>Languages:</b></dt>
532      *     <dd>English (default)</dd>
533      *     <dd>Deutsch</dd>
534      *   <dt><b>Final:</b></dt><dd>No</dd>
535      * </dl></p>
536      * @param locale The locale of the message to return.
537      * @param defaultLogLevel Format argument.
538      * @return The text of the {@code <Default Log Level Info>} message for {@code locale}.
539      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
540      */
541     @SuppressWarnings("unused")
542     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
543     private String getDefaultLogLevelInfo( final java.util.Locale locale, final java.lang.String defaultLogLevel )
544     {
545         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Default Log Level Info", locale, defaultLogLevel );
546         assert _m != null : "'Default Log Level Info' message not found.";
547         return _m;
548     }
549     /**
550      * Gets the text of the {@code <Long Description Message>} message.
551      * <p><dl>
552      *   <dt><b>Languages:</b></dt>
553      *     <dd>English (default)</dd>
554      *   <dt><b>Final:</b></dt><dd>No</dd>
555      * </dl></p>
556      * @param locale The locale of the message to return.
557      * @return The text of the {@code <Long Description Message>} message for {@code locale}.
558      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
559      */
560     @SuppressWarnings("unused")
561     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
562     private String getLongDescriptionMessage( final java.util.Locale locale )
563     {
564         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Long Description Message", locale );
565         assert _m != null : "'Long Description Message' message not found.";
566         return _m;
567     }
568     /**
569      * Gets the text of the {@code <Separator>} message.
570      * <p><dl>
571      *   <dt><b>Languages:</b></dt>
572      *     <dd>English (default)</dd>
573      *   <dt><b>Final:</b></dt><dd>No</dd>
574      * </dl></p>
575      * @param locale The locale of the message to return.
576      * @return The text of the {@code <Separator>} message for {@code locale}.
577      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
578      */
579     @SuppressWarnings("unused")
580     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
581     private String getSeparator( final java.util.Locale locale )
582     {
583         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Separator", locale );
584         assert _m != null : "'Separator' message not found.";
585         return _m;
586     }
587     /**
588      * Gets the text of the {@code <Short Description Message>} message.
589      * <p><dl>
590      *   <dt><b>Languages:</b></dt>
591      *     <dd>English (default)</dd>
592      *   <dt><b>Final:</b></dt><dd>No</dd>
593      * </dl></p>
594      * @param locale The locale of the message to return.
595      * @return The text of the {@code <Short Description Message>} message for {@code locale}.
596      * @throws org.jomc.ObjectManagementException if getting the message instance fails.
597      */
598     @SuppressWarnings("unused")
599     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
600     private String getShortDescriptionMessage( final java.util.Locale locale )
601     {
602         final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "Short Description Message", locale );
603         assert _m != null : "'Short Description Message' message not found.";
604         return _m;
605     }
606     // </editor-fold>
607     // SECTION-END
608     // SECTION-START[Generated Command]
609     // <editor-fold defaultstate="collapsed" desc=" Generated Options ">
610     /**
611      * Gets the options of the command.
612      * <p><strong>Options:</strong>
613      *   <table border="1" width="100%" cellpadding="3" cellspacing="0">
614      *     <tr class="TableSubHeadingColor">
615      *       <th align="left" scope="col" nowrap><b>Specification</b></th>
616      *       <th align="left" scope="col" nowrap><b>Implementation</b></th>
617      *     </tr>
618      *   </table>
619      * </p>
620      * @return The options of the command.
621      */
622     @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.4", comments = "See http://www.jomc.org/jomc/1.4/jomc-tools-1.4" )
623     public org.apache.commons.cli.Options getOptions()
624     {
625         final org.apache.commons.cli.Options options = new org.apache.commons.cli.Options();
626         return options;
627     }
628     // </editor-fold>
629     // SECTION-END
630 }