Coverage Report - org.apache.maven.plugin.tools.model.Parameter
 
Classes in this File Line Coverage Branch Coverage Complexity
Parameter
0% 
N/A 
1
 
 1  
 /*
 2  
  * $Id$
 3  
  */
 4  
 
 5  
 package org.apache.maven.plugin.tools.model;
 6  
 
 7  
   //---------------------------------/
 8  
  //- Imported classes and packages -/
 9  
 //---------------------------------/
 10  
 
 11  
 import java.util.Date;
 12  
 
 13  
 /**
 14  
  * 
 15  
  *               A parameter used by a mojo, and configurable from the
 16  
  * command line or POM configuration sections.
 17  
  *       
 18  
  * 
 19  
  * @version $Revision$ $Date$
 20  
  */
 21  0
 public class Parameter implements java.io.Serializable {
 22  
 
 23  
 
 24  
       //--------------------------/
 25  
      //- Class/Member Variables -/
 26  
     //--------------------------/
 27  
 
 28  
     /**
 29  
      * Field name
 30  
      */
 31  
     private String name;
 32  
 
 33  
     /**
 34  
      * Field alias
 35  
      */
 36  
     private String alias;
 37  
 
 38  
     /**
 39  
      * Field property
 40  
      */
 41  
     private String property;
 42  
 
 43  
     /**
 44  
      * Field required
 45  
      */
 46  0
     private boolean required = false;
 47  
 
 48  
     /**
 49  
      * Field readonly
 50  
      */
 51  0
     private boolean readonly = false;
 52  
 
 53  
     /**
 54  
      * Field expression
 55  
      */
 56  
     private String expression;
 57  
 
 58  
     /**
 59  
      * Field defaultValue
 60  
      */
 61  
     private String defaultValue;
 62  
 
 63  
     /**
 64  
      * Field type
 65  
      */
 66  
     private String type;
 67  
 
 68  
     /**
 69  
      * Field description
 70  
      */
 71  
     private String description;
 72  
 
 73  
     /**
 74  
      * Field deprecation
 75  
      */
 76  
     private String deprecation;
 77  
 
 78  
 
 79  
       //-----------/
 80  
      //- Methods -/
 81  
     //-----------/
 82  
 
 83  
     /**
 84  
      * Get An alternate name for the parameter.
 85  
      */
 86  
     public String getAlias()
 87  
     {
 88  0
         return this.alias;
 89  
     } //-- String getAlias() 
 90  
 
 91  
     /**
 92  
      * Get 
 93  
      *             An expression in the form ${instance.property}
 94  
      * for extracting a value for this parameter, especially from
 95  
      *             a runtime instance within the build system. (eg.
 96  
      * ${project.build.directory} references 
 97  
      *             project.getBuild().getDirectory())
 98  
      *           
 99  
      */
 100  
     public String getDefaultValue()
 101  
     {
 102  0
         return this.defaultValue;
 103  
     } //-- String getDefaultValue() 
 104  
 
 105  
     /**
 106  
      * Get A deprecation message for this mojo parameter.
 107  
      */
 108  
     public String getDeprecation()
 109  
     {
 110  0
         return this.deprecation;
 111  
     } //-- String getDeprecation() 
 112  
 
 113  
     /**
 114  
      * Get The description for this parameter.
 115  
      */
 116  
     public String getDescription()
 117  
     {
 118  0
         return this.description;
 119  
     } //-- String getDescription() 
 120  
 
 121  
     /**
 122  
      * Get 
 123  
      *             The command-line reference to this parameter.
 124  
      *           
 125  
      */
 126  
     public String getExpression()
 127  
     {
 128  0
         return this.expression;
 129  
     } //-- String getExpression() 
 130  
 
 131  
     /**
 132  
      * Get The parameter name
 133  
      */
 134  
     public String getName()
 135  
     {
 136  0
         return this.name;
 137  
     } //-- String getName() 
 138  
 
 139  
     /**
 140  
      * Get The JavaBeans property name to use to configure the mojo
 141  
      * with this parameter.
 142  
      */
 143  
     public String getProperty()
 144  
     {
 145  0
         return this.property;
 146  
     } //-- String getProperty() 
 147  
 
 148  
     /**
 149  
      * Get 
 150  
      *             The java type for this parameter.
 151  
      *           
 152  
      */
 153  
     public String getType()
 154  
     {
 155  0
         return this.type;
 156  
     } //-- String getType() 
 157  
 
 158  
     /**
 159  
      * Get 
 160  
      *             Whether this parameter can be directly edited.
 161  
      * If false, this param is either derived from another POM
 162  
      * element, or refers to a runtime instance of the build
 163  
      * system.
 164  
      *           
 165  
      */
 166  
     public boolean isReadonly()
 167  
     {
 168  0
         return this.readonly;
 169  
     } //-- boolean isReadonly() 
 170  
 
 171  
     /**
 172  
      * Get Whether this parameter is required.
 173  
      */
 174  
     public boolean isRequired()
 175  
     {
 176  0
         return this.required;
 177  
     } //-- boolean isRequired() 
 178  
 
 179  
     /**
 180  
      * Set An alternate name for the parameter.
 181  
      * 
 182  
      * @param alias
 183  
      */
 184  
     public void setAlias(String alias)
 185  
     {
 186  0
         this.alias = alias;
 187  0
     } //-- void setAlias(String) 
 188  
 
 189  
     /**
 190  
      * Set 
 191  
      *             An expression in the form ${instance.property}
 192  
      * for extracting a value for this parameter, especially from
 193  
      *             a runtime instance within the build system. (eg.
 194  
      * ${project.build.directory} references 
 195  
      *             project.getBuild().getDirectory())
 196  
      *           
 197  
      * 
 198  
      * @param defaultValue
 199  
      */
 200  
     public void setDefaultValue(String defaultValue)
 201  
     {
 202  0
         this.defaultValue = defaultValue;
 203  0
     } //-- void setDefaultValue(String) 
 204  
 
 205  
     /**
 206  
      * Set A deprecation message for this mojo parameter.
 207  
      * 
 208  
      * @param deprecation
 209  
      */
 210  
     public void setDeprecation(String deprecation)
 211  
     {
 212  0
         this.deprecation = deprecation;
 213  0
     } //-- void setDeprecation(String) 
 214  
 
 215  
     /**
 216  
      * Set The description for this parameter.
 217  
      * 
 218  
      * @param description
 219  
      */
 220  
     public void setDescription(String description)
 221  
     {
 222  0
         this.description = description;
 223  0
     } //-- void setDescription(String) 
 224  
 
 225  
     /**
 226  
      * Set 
 227  
      *             The command-line reference to this parameter.
 228  
      *           
 229  
      * 
 230  
      * @param expression
 231  
      */
 232  
     public void setExpression(String expression)
 233  
     {
 234  0
         this.expression = expression;
 235  0
     } //-- void setExpression(String) 
 236  
 
 237  
     /**
 238  
      * Set The parameter name
 239  
      * 
 240  
      * @param name
 241  
      */
 242  
     public void setName(String name)
 243  
     {
 244  0
         this.name = name;
 245  0
     } //-- void setName(String) 
 246  
 
 247  
     /**
 248  
      * Set The JavaBeans property name to use to configure the mojo
 249  
      * with this parameter.
 250  
      * 
 251  
      * @param property
 252  
      */
 253  
     public void setProperty(String property)
 254  
     {
 255  0
         this.property = property;
 256  0
     } //-- void setProperty(String) 
 257  
 
 258  
     /**
 259  
      * Set 
 260  
      *             Whether this parameter can be directly edited.
 261  
      * If false, this param is either derived from another POM
 262  
      * element, or refers to a runtime instance of the build
 263  
      * system.
 264  
      *           
 265  
      * 
 266  
      * @param readonly
 267  
      */
 268  
     public void setReadonly(boolean readonly)
 269  
     {
 270  0
         this.readonly = readonly;
 271  0
     } //-- void setReadonly(boolean) 
 272  
 
 273  
     /**
 274  
      * Set Whether this parameter is required.
 275  
      * 
 276  
      * @param required
 277  
      */
 278  
     public void setRequired(boolean required)
 279  
     {
 280  0
         this.required = required;
 281  0
     } //-- void setRequired(boolean) 
 282  
 
 283  
     /**
 284  
      * Set 
 285  
      *             The java type for this parameter.
 286  
      *           
 287  
      * 
 288  
      * @param type
 289  
      */
 290  
     public void setType(String type)
 291  
     {
 292  0
         this.type = type;
 293  0
     } //-- void setType(String) 
 294  
 
 295  
 
 296  0
     private String modelEncoding = "UTF-8";
 297  
 
 298  
     public void setModelEncoding( String modelEncoding )
 299  
     {
 300  0
         this.modelEncoding = modelEncoding;
 301  0
     }
 302  
 
 303  
     public String getModelEncoding()
 304  
     {
 305  0
         return modelEncoding;
 306  
     }}