Coverage Report - org.apache.maven.archetype.common.ArchetypeConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
ArchetypeConfiguration
0 %
0/52
0 %
0/18
1,083
 
 1  
 /*
 2  
  =================== DO NOT EDIT THIS FILE ====================
 3  
  Generated by Modello 1.3 on 2010-04-23 01:00:20,
 4  
  any modifications will be overwritten.
 5  
  ==============================================================
 6  
  */
 7  
 
 8  
 package org.apache.maven.archetype.common;
 9  
 
 10  
 /**
 11  
  * Class ArchetypeConfiguration.
 12  
  * 
 13  
  * @version $Revision$ $Date$
 14  
  */
 15  0
 public class ArchetypeConfiguration
 16  
     implements java.io.Serializable
 17  
 {
 18  
 
 19  
       //--------------------------/
 20  
      //- Class/Member Variables -/
 21  
     //--------------------------/
 22  
 
 23  
     /**
 24  
      * Field GroupId.
 25  
      */
 26  
     private String GroupId;
 27  
 
 28  
     /**
 29  
      * Field ArtifactId.
 30  
      */
 31  
     private String ArtifactId;
 32  
 
 33  
     /**
 34  
      * Field Version.
 35  
      */
 36  
     private String Version;
 37  
 
 38  
     /**
 39  
      * Field Name.
 40  
      */
 41  
     private String Name;
 42  
 
 43  
     /**
 44  
      * Field goals.
 45  
      */
 46  
     private String goals;
 47  
 
 48  
     /**
 49  
      * Field RequiredProperties.
 50  
      */
 51  
     private java.util.List/*<String>*/ RequiredProperties;
 52  
 
 53  
 
 54  
       //-----------/
 55  
      //- Methods -/
 56  
     //-----------/
 57  
 
 58  
     /**
 59  
      * Method addRequiredProperty.
 60  
      * 
 61  
      * @param string
 62  
      */
 63  
     public void addRequiredProperty( String string )
 64  
     {
 65  0
         getRequiredProperties().add( string );
 66  0
     } //-- void addRequiredProperty( String )
 67  
 
 68  
     /**
 69  
      * Get the ArtifactId field.
 70  
      * 
 71  
      * @return String
 72  
      */
 73  
     public String getArtifactId()
 74  
     {
 75  0
         return this.ArtifactId;
 76  
     } //-- String getArtifactId()
 77  
 
 78  
     /**
 79  
      * Get the goals field.
 80  
      * 
 81  
      * @return String
 82  
      */
 83  
     public String getGoals()
 84  
     {
 85  0
         return this.goals;
 86  
     } //-- String getGoals()
 87  
 
 88  
     /**
 89  
      * Get the GroupId field.
 90  
      * 
 91  
      * @return String
 92  
      */
 93  
     public String getGroupId()
 94  
     {
 95  0
         return this.GroupId;
 96  
     } //-- String getGroupId()
 97  
 
 98  
     /**
 99  
      * Get the Name field.
 100  
      * 
 101  
      * @return String
 102  
      */
 103  
     public String getName()
 104  
     {
 105  0
         return this.Name;
 106  
     } //-- String getName()
 107  
 
 108  
     /**
 109  
      * Method getRequiredProperties.
 110  
      * 
 111  
      * @return List
 112  
      */
 113  
     public java.util.List/*<String>*/ getRequiredProperties()
 114  
     {
 115  0
         if ( this.RequiredProperties == null )
 116  
         {
 117  0
             this.RequiredProperties = new java.util.ArrayList/*<String>*/();
 118  
         }
 119  
 
 120  0
         return this.RequiredProperties;
 121  
     } //-- java.util.List/*<String>*/ getRequiredProperties()
 122  
 
 123  
     /**
 124  
      * Get the Version field.
 125  
      * 
 126  
      * @return String
 127  
      */
 128  
     public String getVersion()
 129  
     {
 130  0
         return this.Version;
 131  
     } //-- String getVersion()
 132  
 
 133  
     /**
 134  
      * Method removeRequiredProperty.
 135  
      * 
 136  
      * @param string
 137  
      */
 138  
     public void removeRequiredProperty( String string )
 139  
     {
 140  0
         getRequiredProperties().remove( string );
 141  0
     } //-- void removeRequiredProperty( String )
 142  
 
 143  
     /**
 144  
      * Set the ArtifactId field.
 145  
      * 
 146  
      * @param ArtifactId
 147  
      */
 148  
     public void setArtifactId( String ArtifactId )
 149  
     {
 150  0
         this.ArtifactId = ArtifactId;
 151  0
     } //-- void setArtifactId( String )
 152  
 
 153  
     /**
 154  
      * Set the goals field.
 155  
      * 
 156  
      * @param goals
 157  
      */
 158  
     public void setGoals( String goals )
 159  
     {
 160  0
         this.goals = goals;
 161  0
     } //-- void setGoals( String )
 162  
 
 163  
     /**
 164  
      * Set the GroupId field.
 165  
      * 
 166  
      * @param GroupId
 167  
      */
 168  
     public void setGroupId( String GroupId )
 169  
     {
 170  0
         this.GroupId = GroupId;
 171  0
     } //-- void setGroupId( String )
 172  
 
 173  
     /**
 174  
      * Set the Name field.
 175  
      * 
 176  
      * @param Name
 177  
      */
 178  
     public void setName( String Name )
 179  
     {
 180  0
         this.Name = Name;
 181  0
     } //-- void setName( String )
 182  
 
 183  
     /**
 184  
      * Set the RequiredProperties field.
 185  
      * 
 186  
      * @param RequiredProperties
 187  
      */
 188  
     public void setRequiredProperties( java.util.List/*<String>*/ RequiredProperties )
 189  
     {
 190  0
         this.RequiredProperties = RequiredProperties;
 191  0
     } //-- void setRequiredProperties( java.util.List )
 192  
 
 193  
     /**
 194  
      * Set the Version field.
 195  
      * 
 196  
      * @param Version
 197  
      */
 198  
     public void setVersion( String Version )
 199  
     {
 200  0
         this.Version = Version;
 201  0
     } //-- void setVersion( String )
 202  
 
 203  
     
 204  
     public void reset ()
 205  
     {
 206  0
         properties.clear ();
 207  0
     }
 208  
 
 209  0
     private java.util.Properties properties = new java.util.Properties ();
 210  
 
 211  
     public void setProperty ( String requiredProperty, String propertyValue )
 212  
     {
 213  0
         properties.setProperty ( requiredProperty, propertyValue );
 214  0
     }
 215  
 
 216  
     public String getProperty (String property)
 217  
     {
 218  0
         return properties.getProperty ( property, null );
 219  
     }
 220  
 
 221  
     public java.util.Properties getProperties ()
 222  
     {
 223  0
         return properties;
 224  
     }
 225  
 
 226  
     public java.util.Properties toProperties ()
 227  
     {
 228  0
         java.util.Properties result = new java.util.Properties ();
 229  0
         result.putAll ( properties );
 230  0
         result.setProperty (
 231  
             Constants.ARCHETYPE_GROUP_ID,
 232  
             (org.codehaus.plexus.util.StringUtils.isNotEmpty( getGroupId () ) ? getGroupId () : "" )
 233  
         );
 234  0
         result.setProperty (
 235  
             Constants.ARCHETYPE_ARTIFACT_ID,
 236  
             (org.codehaus.plexus.util.StringUtils.isNotEmpty( getArtifactId () ) ? getArtifactId () : "" )
 237  
         );
 238  0
         result.setProperty (
 239  
             Constants.ARCHETYPE_VERSION,
 240  
             (org.codehaus.plexus.util.StringUtils.isNotEmpty( getVersion () ) ? getVersion () : "" )
 241  
         );
 242  
 
 243  0
         properties.setProperty (
 244  
             Constants.ARCHETYPE_POST_GENERATION_GOALS,
 245  
             (org.codehaus.plexus.util.StringUtils.isNotEmpty( getGoals() ) ? getGoals() : "" )
 246  
         );
 247  
 
 248  0
         return result;
 249  
     }
 250  
 
 251  
     public boolean isConfigured ()
 252  
     {
 253  0
         boolean configured = true;
 254  
 
 255  0
         java.util.Iterator requiredProperties = getRequiredProperties().iterator();
 256  0
         while ( configured && requiredProperties.hasNext () )
 257  
         {
 258  0
             String requiredProperty = (String) requiredProperties.next ();
 259  
 
 260  0
             configured = configured &&
 261  
                 org.codehaus.plexus.util.StringUtils.isNotEmpty(
 262  
                     properties.getProperty ( requiredProperty )
 263  
                 );
 264  0
         }
 265  
 
 266  0
         return configured;
 267  
     }
 268  
 
 269  
     public boolean isConfigured ( String requiredProperties )
 270  
     {
 271  0
         return org.codehaus.plexus.util.StringUtils.isNotEmpty (
 272  
                     properties.getProperty ( requiredProperties )
 273  
                 );
 274  
     }
 275  
 
 276  0
     private java.util.Properties defaultProperties = new java.util.Properties ();
 277  
 
 278  
     public void setDefaultProperty ( String requiredProperty, String propertyValue )
 279  
     {
 280  0
         defaultProperties.setProperty ( requiredProperty, propertyValue );
 281  0
     }
 282  
 
 283  
     public String getDefaultValue (String requiredProperty)
 284  
     {
 285  0
         return defaultProperties.getProperty ( requiredProperty, null );
 286  
     }
 287  
 
 288  
     public java.util.Properties getDefaultValues ()
 289  
     {
 290  0
         return defaultProperties;
 291  
     }
 292  
                     
 293  
 }