Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
BlameManager | 35 | 0 | - | 0 | 0 |
1 | /* | |
2 | * See the NOTICE file distributed with this work for additional | |
3 | * information regarding copyright ownership. | |
4 | * | |
5 | * This is free software; you can redistribute it and/or modify it | |
6 | * under the terms of the GNU Lesser General Public License as | |
7 | * published by the Free Software Foundation; either version 2.1 of | |
8 | * the License, or (at your option) any later version. | |
9 | * | |
10 | * This software is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | * Lesser General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU Lesser General Public | |
16 | * License along with this software; if not, write to the Free | |
17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | |
18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | |
19 | */ | |
20 | ||
21 | package org.xwiki.blame; | |
22 | ||
23 | import java.util.List; | |
24 | ||
25 | import org.xwiki.component.annotation.Role; | |
26 | ||
27 | /** | |
28 | * Annotate/Blame/Praise tool that allow building annotated content from the content of all revision starting with | |
29 | * the most recent one. | |
30 | * | |
31 | * @version $Id: ce6f7ddedab16cbd216764ec4dc430912eec0a32 $ | |
32 | * @since 6.2M2 | |
33 | */ | |
34 | @Role | |
35 | public interface BlameManager | |
36 | { | |
37 | /** | |
38 | * Annotate content with current revision based on a diff with a previous revision. | |
39 | * | |
40 | * @param <R> type of the revision object that old metadata about the revision. | |
41 | * @param <E> type of the element to annotate (ie: String holding a line). | |
42 | * @param content the annotated content (up to the revision preceding the one given), use null to start a new | |
43 | * blame. | |
44 | * @param revision the revision metadata to associate with the given revision. | |
45 | * @param previous the content of the previous revision to diff against the currently annotated content, use the | |
46 | * latest revision to start a new blame. | |
47 | * @return the updated annotated content. | |
48 | */ | |
49 | <R, E> AnnotatedContent<R, E> blame(AnnotatedContent<R, E> content, R revision, List<E> previous); | |
50 | } |