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 classifier;
48 private boolean pomFile;
55 public FileMetadata( String serverFileName )
57 this.serverFileName = serverFileName;
60 public FileMetadata( String name, long size, String url )
66 this.deleteType = "DELETE";
69 public String getName()
74 public void setName( String name )
84 public void setSize( long size )
89 public String getUrl()
94 public void setUrl( String url )
99 public String getDeleteUrl()
104 public void setDeleteUrl( String deleteUrl )
106 this.deleteUrl = deleteUrl;
109 public String getDeleteType()
114 public void setDeleteType( String deleteType )
116 this.deleteType = deleteType;
119 public String getErrorKey()
124 public void setErrorKey( String errorKey )
126 this.errorKey = errorKey;
129 public String getClassifier()
134 public void setClassifier( String classifier )
136 this.classifier = classifier;
140 public boolean isPomFile()
145 public void setPomFile( boolean pomFile )
147 this.pomFile = pomFile;
150 public String getServerFileName()
152 return serverFileName;
155 public void setServerFileName( String serverFileName )
157 this.serverFileName = serverFileName;
161 public boolean equals( Object o )
167 if ( !( o instanceof FileMetadata ) )
172 FileMetadata that = (FileMetadata) o;
174 if ( !serverFileName.equals( that.serverFileName ) )
183 public int hashCode()
185 return serverFileName.hashCode();
189 public String toString()
191 final StringBuilder sb = new StringBuilder();
192 sb.append( "FileMetadata" );
193 sb.append( "{name='" ).append( name ).append( '\'' );
194 sb.append( ", serverFileName='" ).append( serverFileName ).append( '\'' );
195 sb.append( ", size=" ).append( size );
196 sb.append( ", url='" ).append( url ).append( '\'' );
197 sb.append( ", deleteUrl='" ).append( deleteUrl ).append( '\'' );
198 sb.append( ", deleteType='" ).append( deleteType ).append( '\'' );
199 sb.append( ", errorKey='" ).append( errorKey ).append( '\'' );
200 sb.append( ", classifier='" ).append( classifier ).append( '\'' );
201 sb.append( ", pomFile=" ).append( pomFile );
203 return sb.toString();