1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.cling.invoker.mvnenc;
20
21 import java.util.List;
22 import java.util.Map;
23
24 import org.apache.maven.api.cli.InvokerRequest;
25 import org.apache.maven.cling.invoker.LookupContext;
26 import org.jline.consoleui.prompt.ConsolePrompt;
27 import org.jline.reader.LineReader;
28 import org.jline.utils.AttributedString;
29 import org.jline.utils.AttributedStringBuilder;
30 import org.jline.utils.AttributedStyle;
31
32 @SuppressWarnings("VisibilityModifier")
33 public class EncryptContext extends LookupContext {
34 protected EncryptContext(InvokerRequest invokerRequest) {
35 super(invokerRequest);
36 }
37
38 public Map<String, Goal> goals;
39
40 public List<AttributedString> header;
41 public AttributedStyle style;
42 public LineReader reader;
43 public ConsolePrompt prompt;
44
45 public void addInHeader(String text) {
46 addInHeader(AttributedStyle.DEFAULT, text);
47 }
48
49 public void addInHeader(AttributedStyle style, String text) {
50 AttributedStringBuilder asb = new AttributedStringBuilder();
51 asb.style(style).append(text);
52 header.add(asb.toAttributedString());
53 }
54 }