| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
package org.xwiki.extension.xar.question; |
| 21 |
|
|
| 22 |
|
import com.xpn.xwiki.doc.XWikiDocument; |
| 23 |
|
|
| 24 |
|
|
| 25 |
|
@version |
| 26 |
|
@since |
| 27 |
|
|
| |
|
| 80.8% |
Uncovered Elements: 5 (26) |
Complexity: 11 |
Complexity Density: 0.73 |
|
| 28 |
|
public class ConflictQuestion |
| 29 |
|
{ |
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 30 |
|
public enum GlobalAction |
| 31 |
|
{ |
| 32 |
|
CURRENT, |
| 33 |
|
PREVIOUS, |
| 34 |
|
NEXT, |
| 35 |
|
MERGED, |
| 36 |
|
CUSTOM |
| 37 |
|
}; |
| 38 |
|
|
| 39 |
|
|
| 40 |
|
|
| 41 |
|
private GlobalAction globalAction = GlobalAction.MERGED; |
| 42 |
|
|
| 43 |
|
private XWikiDocument customDocument; |
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
private XWikiDocument currentDocument; |
| 48 |
|
|
| 49 |
|
private XWikiDocument previousDocument; |
| 50 |
|
|
| 51 |
|
private XWikiDocument nextDocument; |
| 52 |
|
|
| 53 |
|
private XWikiDocument mergedDocument; |
| 54 |
|
|
| 55 |
|
private boolean always; |
| 56 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 57 |
16 |
public ConflictQuestion(XWikiDocument currentDocument, XWikiDocument previousDocument, XWikiDocument nextDocument,... |
| 58 |
|
XWikiDocument mergedDocument) |
| 59 |
|
{ |
| 60 |
16 |
this.currentDocument = currentDocument; |
| 61 |
16 |
this.previousDocument = previousDocument; |
| 62 |
16 |
this.nextDocument = nextDocument; |
| 63 |
16 |
this.mergedDocument = mergedDocument; |
| 64 |
|
} |
| 65 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 66 |
12 |
public XWikiDocument getCurrentDocument()... |
| 67 |
|
{ |
| 68 |
12 |
return this.currentDocument; |
| 69 |
|
} |
| 70 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 71 |
2 |
public XWikiDocument getPreviousDocument()... |
| 72 |
|
{ |
| 73 |
2 |
return this.previousDocument; |
| 74 |
|
} |
| 75 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 76 |
10 |
public XWikiDocument getNextDocument()... |
| 77 |
|
{ |
| 78 |
10 |
return this.nextDocument; |
| 79 |
|
} |
| 80 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 81 |
5 |
public XWikiDocument getMergedDocument()... |
| 82 |
|
{ |
| 83 |
5 |
return this.mergedDocument; |
| 84 |
|
} |
| 85 |
|
|
| 86 |
|
|
| 87 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 88 |
24 |
public GlobalAction getGlobalAction()... |
| 89 |
|
{ |
| 90 |
24 |
return this.globalAction; |
| 91 |
|
} |
| 92 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 93 |
15 |
public void setGlobalAction(GlobalAction globalAction)... |
| 94 |
|
{ |
| 95 |
15 |
this.globalAction = globalAction; |
| 96 |
|
} |
| 97 |
|
|
| 98 |
|
|
| 99 |
|
@since |
| 100 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 101 |
0 |
public XWikiDocument getCustomDocument()... |
| 102 |
|
{ |
| 103 |
0 |
return this.customDocument; |
| 104 |
|
} |
| 105 |
|
|
| 106 |
|
|
| 107 |
|
@since |
| 108 |
|
|
| |
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 109 |
0 |
public void setCustomDocument(XWikiDocument customDocument)... |
| 110 |
|
{ |
| 111 |
0 |
this.customDocument = customDocument; |
| 112 |
0 |
this.globalAction = GlobalAction.CUSTOM; |
| 113 |
|
} |
| 114 |
|
|
| 115 |
|
|
| 116 |
|
@return |
| 117 |
|
@link |
| 118 |
|
@since |
| 119 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 120 |
16 |
public boolean isAlways()... |
| 121 |
|
{ |
| 122 |
16 |
return this.always; |
| 123 |
|
} |
| 124 |
|
|
| 125 |
|
|
| 126 |
|
@param |
| 127 |
|
@link |
| 128 |
|
@since |
| 129 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 130 |
12 |
public void setAlways(boolean always)... |
| 131 |
|
{ |
| 132 |
12 |
this.always = always; |
| 133 |
|
} |
| 134 |
|
} |