This project has retired. For details please refer to its
Attic page.
FileMetadata xref
1 package org.apache.archiva.web.model;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import javax.xml.bind.annotation.XmlRootElement;
22 import java.io.Serializable;
23
24
25
26
27
28 @XmlRootElement( name = "fileMetadata" )
29 public class FileMetadata
30 implements Serializable
31 {
32 private String name;
33
34 private String serverFileName;
35
36 private long size;
37
38 private String url;
39
40 private String deleteUrl;
41
42 private String deleteType;
43
44 private String errorKey;
45
46 private String classifier;
47
48 private String packaging;
49
50 private boolean pomFile;
51
52 public FileMetadata()
53 {
54
55 }
56
57 public FileMetadata( String serverFileName )
58 {
59 this.serverFileName = serverFileName;
60 }
61
62 public FileMetadata( String name, long size, String url )
63 {
64 this.name = name;
65 this.size = size;
66 this.url = url;
67 this.deleteUrl = url;
68 this.deleteType = "DELETE";
69 }
70
71 public String getName()
72 {
73 return name;
74 }
75
76 public void setName( String name )
77 {
78 this.name = name;
79 }
80
81 public long getSize()
82 {
83 return size;
84 }
85
86 public void setSize( long size )
87 {
88 this.size = size;
89 }
90
91 public String getUrl()
92 {
93 return url;
94 }
95
96 public void setUrl( String url )
97 {
98 this.url = url;
99 }
100
101 public String getDeleteUrl()
102 {
103 return deleteUrl;
104 }
105
106 public void setDeleteUrl( String deleteUrl )
107 {
108 this.deleteUrl = deleteUrl;
109 }
110
111 public String getDeleteType()
112 {
113 return deleteType;
114 }
115
116 public void setDeleteType( String deleteType )
117 {
118 this.deleteType = deleteType;
119 }
120
121 public String getErrorKey()
122 {
123 return errorKey;
124 }
125
126 public void setErrorKey( String errorKey )
127 {
128 this.errorKey = errorKey;
129 }
130
131 public String getClassifier()
132 {
133 return classifier;
134 }
135
136 public void setClassifier( String classifier )
137 {
138 this.classifier = classifier;
139 }
140
141
142 public boolean isPomFile()
143 {
144 return pomFile;
145 }
146
147 public void setPomFile( boolean pomFile )
148 {
149 this.pomFile = pomFile;
150 }
151
152 public String getServerFileName()
153 {
154 return serverFileName;
155 }
156
157 public void setServerFileName( String serverFileName )
158 {
159 this.serverFileName = serverFileName;
160 }
161
162 public String getPackaging()
163 {
164 return packaging;
165 }
166
167 public void setPackaging( String packaging )
168 {
169 this.packaging = packaging;
170 }
171
172 @Override
173 public boolean equals( Object o )
174 {
175 if ( this == o )
176 {
177 return true;
178 }
179 if ( !( o instanceof FileMetadata ) )
180 {
181 return false;
182 }
183
184 FileMetadata that = (FileMetadata) o;
185
186 if ( !serverFileName.equals( that.serverFileName ) )
187 {
188 return false;
189 }
190
191 return true;
192 }
193
194 @Override
195 public int hashCode()
196 {
197 return serverFileName.hashCode();
198 }
199
200 @Override
201 public String toString()
202 {
203 final StringBuilder sb = new StringBuilder( "FileMetadata{" );
204 sb.append( "name='" ).append( name ).append( '\'' );
205 sb.append( ", serverFileName='" ).append( serverFileName ).append( '\'' );
206 sb.append( ", size=" ).append( size );
207 sb.append( ", url='" ).append( url ).append( '\'' );
208 sb.append( ", deleteUrl='" ).append( deleteUrl ).append( '\'' );
209 sb.append( ", deleteType='" ).append( deleteType ).append( '\'' );
210 sb.append( ", errorKey='" ).append( errorKey ).append( '\'' );
211 sb.append( ", classifier='" ).append( classifier ).append( '\'' );
212 sb.append( ", packaging='" ).append( packaging ).append( '\'' );
213 sb.append( ", pomFile=" ).append( pomFile );
214 sb.append( '}' );
215 return sb.toString();
216 }
217 }