| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
package org.devacfr.maven.skins.reflow.context; |
| 20 |
|
|
| 21 |
|
import javax.annotation.Nonnull; |
| 22 |
|
|
| 23 |
|
import org.devacfr.maven.skins.reflow.ISkinConfig; |
| 24 |
|
import org.devacfr.maven.skins.reflow.SkinConfigTool; |
| 25 |
|
import org.devacfr.maven.skins.reflow.model.Toc; |
| 26 |
|
import org.devacfr.maven.skins.reflow.model.TocSidebar; |
| 27 |
|
|
| 28 |
|
import static java.util.Objects.requireNonNull; |
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 33 |
|
@author |
| 34 |
|
@since |
| 35 |
|
|
| |
|
| 75% |
Uncovered Elements: 4 (16) |
Complexity: 6 |
Complexity Density: 0,6 |
|
| 36 |
|
public class FrameContext extends Context<FrameContext> { |
| 37 |
|
|
| 38 |
|
|
| 39 |
|
private final String documentParent; |
| 40 |
|
|
| 41 |
|
|
| 42 |
|
private final Toc<?> toc; |
| 43 |
|
|
| 44 |
|
|
| 45 |
|
@param |
| 46 |
|
|
| 47 |
|
@param |
| 48 |
|
|
| 49 |
|
|
| |
|
| 77,8% |
Uncovered Elements: 2 (9) |
Complexity: 3 |
Complexity Density: 0,43 |
|
| 50 |
1 |
public FrameContext(final @Nonnull ISkinConfig config, @Nonnull final String documentParent) {... |
| 51 |
1 |
super(config, ContextType.frame); |
| 52 |
1 |
final String type = config.getPropertyValue(Toc.COMPONENT, String.class, "sidebar"); |
| 53 |
|
|
| 54 |
1 |
if ("top".equals(type) || "sidebar".equals(type)) { |
| 55 |
1 |
toc = new TocSidebar(config); |
| 56 |
|
} else { |
| 57 |
0 |
toc = new Toc<Toc<?>>("", "") {}; |
| 58 |
|
} |
| 59 |
|
|
| 60 |
1 |
this.documentParent = requireNonNull(documentParent); |
| 61 |
|
|
| 62 |
1 |
this.addChildren(this.toc); |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
|
| 66 |
|
@return@link |
| 67 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 68 |
1 |
public String getDocumentParent() {... |
| 69 |
1 |
return documentParent; |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
|
| 73 |
|
@return@link |
| 74 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 75 |
0 |
public String getSlugDocumentParent() {... |
| 76 |
0 |
return SkinConfigTool.slugFilename(documentParent); |
| 77 |
|
} |
| 78 |
|
|
| 79 |
|
|
| 80 |
|
@return@link |
| 81 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 82 |
2 |
public Toc<?> getToc() {... |
| 83 |
2 |
return toc; |
| 84 |
|
} |
| 85 |
|
} |