1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.scm.command.blame;
20
21 import java.io.Serializable;
22 import java.util.Date;
23
24
25
26
27
28 public class BlameLine implements Serializable {
29
30 private static final long serialVersionUID = 2675122069344705612L;
31
32 private Date date;
33
34 private String revision;
35
36 private String author;
37
38 private String committer;
39
40
41
42
43
44
45 public BlameLine(Date date, String revision, String author) {
46 this(date, revision, author, author);
47 }
48
49
50
51
52
53
54
55
56 public BlameLine(Date date, String revision, String author, String committer) {
57 setDate(date);
58 setRevision(revision);
59 setAuthor(author);
60 setCommitter(committer);
61 }
62
63 public String getRevision() {
64 return revision;
65 }
66
67 public void setRevision(String revision) {
68 this.revision = revision;
69 }
70
71 public String getAuthor() {
72 return author;
73 }
74
75 public void setAuthor(String author) {
76 this.author = author;
77 }
78
79 public String getCommitter() {
80 return committer;
81 }
82
83 public void setCommitter(String committer) {
84 this.committer = committer;
85 }
86
87
88
89
90 public Date getDate() {
91 if (date != null) {
92 return (Date) date.clone();
93 }
94 return null;
95 }
96
97 public void setDate(Date date) {
98 if (date != null) {
99 this.date = new Date(date.getTime());
100 } else {
101 this.date = null;
102 }
103 }
104 }