1 package org.apache.archiva.webapp.ui.services.model;
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
21 import javax.xml.bind.annotation.XmlRootElement;
22 import java.io.Serializable;
25 * @author Olivier Lamy
28 @XmlRootElement( name = "fileMetadata" )
29 public class FileMetadata
30 implements Serializable
34 private String serverFileName;
40 private String deleteUrl;
42 private String deleteType;
44 private String errorKey;
46 private String groupId;
48 private String artifactId;
50 private String version;
52 private String packaging;
54 private String classifier;
56 private boolean pomFile;
63 public FileMetadata( String serverFileName )
65 this.serverFileName = serverFileName;
68 public FileMetadata( String name, long size, String url )
74 this.deleteType = "DELETE";
77 public String getName()
82 public void setName( String name )
92 public void setSize( long size )
97 public String getUrl()
102 public void setUrl( String url )
107 public String getDeleteUrl()
112 public void setDeleteUrl( String deleteUrl )
114 this.deleteUrl = deleteUrl;
117 public String getDeleteType()
122 public void setDeleteType( String deleteType )
124 this.deleteType = deleteType;
127 public String getErrorKey()
132 public void setErrorKey( String errorKey )
134 this.errorKey = errorKey;
137 public String getGroupId()
142 public void setGroupId( String groupId )
144 this.groupId = groupId;
147 public String getArtifactId()
152 public void setArtifactId( String artifactId )
154 this.artifactId = artifactId;
157 public String getVersion()
162 public void setVersion( String version )
164 this.version = version;
167 public String getPackaging()
172 public void setPackaging( String packaging )
174 this.packaging = packaging;
177 public String getClassifier()
182 public void setClassifier( String classifier )
184 this.classifier = classifier;
188 public boolean isPomFile()
193 public void setPomFile( boolean pomFile )
195 this.pomFile = pomFile;
198 public String getServerFileName()
200 return serverFileName;
203 public void setServerFileName( String serverFileName )
205 this.serverFileName = serverFileName;
209 public boolean equals( Object o )
215 if ( !( o instanceof FileMetadata ) )
220 FileMetadata that = (FileMetadata) o;
222 if ( !serverFileName.equals( that.serverFileName ) )
231 public int hashCode()
233 return serverFileName.hashCode();
237 public String toString()
239 final StringBuilder sb = new StringBuilder();
240 sb.append( "FileMetadata" );
241 sb.append( "{name='" ).append( name ).append( '\'' );
242 sb.append( ", serverFileName='" ).append( serverFileName ).append( '\'' );
243 sb.append( ", size=" ).append( size );
244 sb.append( ", url='" ).append( url ).append( '\'' );
245 sb.append( ", deleteUrl='" ).append( deleteUrl ).append( '\'' );
246 sb.append( ", deleteType='" ).append( deleteType ).append( '\'' );
247 sb.append( ", errorKey='" ).append( errorKey ).append( '\'' );
248 sb.append( ", groupId='" ).append( groupId ).append( '\'' );
249 sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
250 sb.append( ", version='" ).append( version ).append( '\'' );
251 sb.append( ", packaging='" ).append( packaging ).append( '\'' );
252 sb.append( ", classifier='" ).append( classifier ).append( '\'' );
253 sb.append( ", pomFile=" ).append( pomFile );
255 return sb.toString();