001package org.apache.archiva.model; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022/** 023 * The Plugin. 024 * 025 * @version $Revision$ $Date$ 026 */ 027@SuppressWarnings( "all" ) 028public class Plugin 029 implements java.io.Serializable 030{ 031 032 //--------------------------/ 033 //- Class/Member Variables -/ 034 //--------------------------/ 035 036 /** 037 * 038 * The prefix for a plugin 039 * . 040 */ 041 private String prefix; 042 043 /** 044 * 045 * The artifactId for a plugin 046 * . 047 */ 048 private String artifactId; 049 050 /** 051 * 052 * The name for a plugin 053 * . 054 */ 055 private String name; 056 057 058 //-----------/ 059 //- Methods -/ 060 //-----------/ 061 062 /** 063 * Method equals. 064 * 065 * @param other 066 * @return boolean 067 */ 068 public boolean equals( Object other ) 069 { 070 if ( this == other ) 071 { 072 return true; 073 } 074 075 if ( !( other instanceof Plugin ) ) 076 { 077 return false; 078 } 079 080 Plugin that = (Plugin) other; 081 boolean result = true; 082 083 result = result && ( getArtifactId() == null ? that.getArtifactId() == null : getArtifactId().equals( that.getArtifactId() ) ); 084 085 return result; 086 } //-- boolean equals( Object ) 087 088 /** 089 * Get the artifactId for a plugin. 090 * 091 * @return String 092 */ 093 public String getArtifactId() 094 { 095 return this.artifactId; 096 } //-- String getArtifactId() 097 098 /** 099 * 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}