James Moger
2012-04-25 e191104cd356faa2e261cc37585143878e23298d
commit | author | age
008322 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;
20
21 import org.eclipse.jgit.revwalk.RevCommit;
22
d9f687 23 /**
JM 24  * AnnotatedLine is a serializable model class that represents a the most recent
25  * author, date, and commit id of a line in a source file.
26  * 
27  * @author James Moger
28  * 
29  */
008322 30 public class AnnotatedLine implements Serializable {
JM 31
32     private static final long serialVersionUID = 1L;
33
34     public final String commitId;
35     public final String author;
36     public final Date when;
37     public final int lineNumber;
38     public final String data;
39
40     public AnnotatedLine(RevCommit commit, int lineNumber, String data) {
41         this.commitId = commit.getName();
42         this.author = commit.getAuthorIdent().getName();
43         this.when = commit.getAuthorIdent().getWhen();
44         this.lineNumber = lineNumber;
45         this.data = data;
46     }
47 }