1 package org.apache.archiva.model; 2 3 /* 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 */ 21 22 /** 23 * The Plugin. 24 * 25 * @version $Revision$ $Date$ 26 */ 27 @SuppressWarnings( "all" ) 28 public class Plugin 29 implements java.io.Serializable 30 { 31 32 //--------------------------/ 33 //- Class/Member Variables -/ 34 //--------------------------/ 35 36 /** 37 * 38 * The prefix for a plugin 39 * . 40 */ 41 private String prefix; 42 43 /** 44 * 45 * The artifactId for a plugin 46 * . 47 */ 48 private String artifactId; 49 50 /** 51 * 52 * The name for a plugin 53 * . 54 */ 55 private String name; 56 57 58 //-----------/ 59 //- Methods -/ 60 //-----------/ 61 62 /** 63 * Method equals. 64 * 65 * @param other 66 * @return boolean 67 */ 68 public boolean equals( Object other ) 69 { 70 if ( this == other ) 71 { 72 return true; 73 } 74 75 if ( !( other instanceof Plugin ) ) 76 { 77 return false; 78 } 79 80 Plugin="../../../../org/apache/archiva/model/Plugin.html#Plugin">Plugin that = (Plugin) other; 81 boolean result = true; 82 83 result = result && ( getArtifactId() == null ? that.getArtifactId() == null : getArtifactId().equals( that.getArtifactId() ) ); 84 85 return result; 86 } //-- boolean equals( Object ) 87 88 /** 89 * Get the artifactId for a plugin. 90 * 91 * @return String 92 */ 93 public String getArtifactId() 94 { 95 return this.artifactId; 96 } //-- String getArtifactId() 97 98 /** 99 * Get the name for a plugin. 100 * 101 * @return String 102 */ 103 public String getName() 104 { 105 return this.name; 106 } //-- String getName() 107 108 /** 109 * Get the prefix for a plugin. 110 * 111 * @return String 112 */ 113 public String getPrefix() 114 { 115 return this.prefix; 116 } //-- String getPrefix() 117 118 /** 119 * Method hashCode. 120 * 121 * @return int 122 */ 123 public int hashCode() 124 { 125 int result = 17; 126 127 result = 37 * result + ( artifactId != null ? artifactId.hashCode() : 0 ); 128 129 return result; 130 } //-- int hashCode() 131 132 /** 133 * Set the artifactId for a plugin. 134 * 135 * @param artifactId 136 */ 137 public void setArtifactId( String artifactId ) 138 { 139 this.artifactId = artifactId; 140 } //-- void setArtifactId( String ) 141 142 /** 143 * Set the name for a plugin. 144 * 145 * @param name 146 */ 147 public void setName( String name ) 148 { 149 this.name = name; 150 } //-- void setName( String ) 151 152 /** 153 * Set the prefix for a plugin. 154 * 155 * @param prefix 156 */ 157 public void setPrefix( String prefix ) 158 { 159 this.prefix = prefix; 160 } //-- void setPrefix( String ) 161 162 /** 163 * Method toString. 164 * 165 * @return String 166 */ 167 public java.lang.String toString() 168 { 169 StringBuilder buf = new StringBuilder( 128 ); 170 171 buf.append( "artifactId = '" ); 172 buf.append( getArtifactId() ); 173 buf.append( "'" ); 174 175 return buf.toString(); 176 } //-- java.lang.String toString() 177 178 }