commit | author | age
|
4cac0d
|
1 |
/*
|
JM |
2 |
* Copyright 2011 gitblit.com.
|
|
3 |
*
|
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5 |
* you may not use this file except in compliance with the License.
|
|
6 |
* You may obtain a copy of the License at
|
|
7 |
*
|
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9 |
*
|
|
10 |
* Unless required by applicable law or agreed to in writing, software
|
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13 |
* See the License for the specific language governing permissions and
|
|
14 |
* limitations under the License.
|
|
15 |
*/
|
|
16 |
package com.gitblit.models;
|
|
17 |
|
|
18 |
import java.io.Serializable;
|
|
19 |
import java.util.Date;
|
609a16
|
20 |
import java.util.List;
|
4cac0d
|
21 |
|
JM |
22 |
/**
|
ee458f
|
23 |
* FeedEntryModel represents an entry in a syndication (RSS) feed.
|
4cac0d
|
24 |
*
|
JM |
25 |
* @author James Moger
|
|
26 |
*/
|
ee458f
|
27 |
public class FeedEntryModel implements Serializable, Comparable<FeedEntryModel> {
|
4cac0d
|
28 |
|
JM |
29 |
public String repository;
|
|
30 |
public String branch;
|
|
31 |
public String title;
|
|
32 |
public String author;
|
|
33 |
public Date published;
|
|
34 |
public String link;
|
|
35 |
public String content;
|
|
36 |
public String contentType;
|
609a16
|
37 |
public List<String> tags;
|
4cac0d
|
38 |
|
JM |
39 |
private static final long serialVersionUID = 1L;
|
|
40 |
|
ee458f
|
41 |
public FeedEntryModel() {
|
4cac0d
|
42 |
}
|
JM |
43 |
|
|
44 |
@Override
|
ee458f
|
45 |
public int compareTo(FeedEntryModel o) {
|
4cac0d
|
46 |
return o.published.compareTo(published);
|
JM |
47 |
}
|
|
48 |
|
|
49 |
@Override
|
|
50 |
public int hashCode() {
|
|
51 |
return link.hashCode();
|
|
52 |
}
|
|
53 |
|
|
54 |
@Override
|
|
55 |
public boolean equals(Object o) {
|
ee458f
|
56 |
if (o instanceof FeedEntryModel) {
|
4cac0d
|
57 |
return hashCode() == o.hashCode();
|
JM |
58 |
}
|
|
59 |
return false;
|
|
60 |
}
|
|
61 |
}
|