1 // =================== DO NOT EDIT THIS FILE ==================== 2 // Generated by Modello 2.1.2, 3 // any modifications will be overwritten. 4 // ============================================================== 5 6 package org.apache.maven.cli.internal.extension.model; 7 8 /** 9 * Describes a build extension to utilise. 10 * 11 * @version $Revision$ $Date$ 12 */ 13 @SuppressWarnings( "all" ) 14 public class CoreExtension 15 implements java.io.Serializable 16 { 17 18 //--------------------------/ 19 //- Class/Member Variables -/ 20 //--------------------------/ 21 22 /** 23 * The group ID of the extension's artifact. 24 */ 25 private String groupId; 26 27 /** 28 * The artifact ID of the extension. 29 */ 30 private String artifactId; 31 32 /** 33 * The version of the extension. 34 */ 35 private String version; 36 37 /** 38 * The class loading strategy: 'self-first' (the default), 39 * 'parent-first' (loads classes from the parent, then from the 40 * extension) or 'plugin' (follows the rules from extensions 41 * defined as plugins). 42 */ 43 private String classLoadingStrategy = "self-first"; 44 45 46 //-----------/ 47 //- Methods -/ 48 //-----------/ 49 50 /** 51 * Get the artifact ID of the extension. 52 * 53 * @return String 54 */ 55 public String getArtifactId() 56 { 57 return this.artifactId; 58 } //-- String getArtifactId() 59 60 /** 61 * Get the class loading strategy: 'self-first' (the default), 62 * 'parent-first' (loads classes from the parent, then from the 63 * extension) or 'plugin' (follows the rules from extensions 64 * defined as plugins). 65 * 66 * @return String 67 */ 68 public String getClassLoadingStrategy() 69 { 70 return this.classLoadingStrategy; 71 } //-- String getClassLoadingStrategy() 72 73 /** 74 * Get the group ID of the extension's artifact. 75 * 76 * @return String 77 */ 78 public String getGroupId() 79 { 80 return this.groupId; 81 } //-- String getGroupId() 82 83 /** 84 * Get the version of the extension. 85 * 86 * @return String 87 */ 88 public String getVersion() 89 { 90 return this.version; 91 } //-- String getVersion() 92 93 /** 94 * Set the artifact ID of the extension. 95 * 96 * @param artifactId a artifactId object. 97 */ 98 public void setArtifactId( String artifactId ) 99 { 100 this.artifactId = artifactId; 101 } //-- void setArtifactId( String ) 102 103 /** 104 * Set the class loading strategy: 'self-first' (the default), 105 * 'parent-first' (loads classes from the parent, then from the 106 * extension) or 'plugin' (follows the rules from extensions 107 * defined as plugins). 108 * 109 * @param classLoadingStrategy a classLoadingStrategy object. 110 */ 111 public void setClassLoadingStrategy( String classLoadingStrategy ) 112 { 113 this.classLoadingStrategy = classLoadingStrategy; 114 } //-- void setClassLoadingStrategy( String ) 115 116 /** 117 * Set the group ID of the extension's artifact. 118 * 119 * @param groupId a groupId object. 120 */ 121 public void setGroupId( String groupId ) 122 { 123 this.groupId = groupId; 124 } //-- void setGroupId( String ) 125 126 /** 127 * Set the version of the extension. 128 * 129 * @param version a version object. 130 */ 131 public void setVersion( String version ) 132 { 133 this.version = version; 134 } //-- void setVersion( String ) 135 136 137 138 /** 139 * Gets the identifier of the extension. 140 * 141 * @return The extension id in the form {@code <groupId>:<artifactId>:<version>}, never {@code null}. 142 */ 143 public String getId() 144 { 145 StringBuilder id = new StringBuilder( 128 ); 146 147 id.append( ( getGroupId() == null ) ? "[unknown-group-id]" : getGroupId() ); 148 id.append( ":" ); 149 id.append( ( getArtifactId() == null ) ? "[unknown-artifact-id]" : getArtifactId() ); 150 id.append( ":" ); 151 id.append( ( getVersion() == null ) ? "[unknown-version]" : getVersion() ); 152 153 return id.toString(); 154 } 155 156 157 }