OpenKeyWord  Build_ID: 457, Datum: 01.02.2020 07:45:48
Dont repeat yourself. - Do it once and only once!
ResultListDebug.java
1 package okw.log.log2html;
2 
3 import org.apache.commons.text.StringEscapeUtils;
4 
5 public class ResultListDebug extends LogBaseNode
6 {
7 
8  private String type = "ResultList";
9 
10  String myReturn = "";
11 
12  ResultListDebug( LogBase Parent, String fpsListHeader )
13  {
14  setParent(Parent);
15  myID = AllCount;
16 
17  this.Info = fpsListHeader;
18  }
19 
20  public void setReturn(String fpsReturn)
21  {
22  myReturn = fpsReturn;
23  }
24 
25  protected void SetFail()
26  {
27  }
28 
29  protected void SetPass()
30  {
31  }
32 
33  protected String getHTMLResult()
34  {
35  StringBuilder sbResult = new StringBuilder();
36 
37  String lvsIndention = this.getLevelIndention();
38 
39  //sbResult.append( lvsIndention + "<blockquote class='" + this.getClass().getSimpleName() + "'>\n" );
40 
41  sbResult.append( lvsIndention + "<div class='" + this.getClass().getSimpleName() + "'>\n" );
42  sbResult.append( lvsIndention + myIndentionBase +"<div class='Header'>\n" );
43 
44  // Aufklappen wenn myLogs Werte enthält...
45  if (!this.myLogs.isEmpty())
46  {
47  sbResult.append( lvsIndention + myIndentionBase + myIndentionBase + "<div class='FoldMe' onClick='div_change(" + myID.toString() + ")'></div>\n" );
48  }
49 
50  sbResult.append( lvsIndention + myIndentionBase + myIndentionBase + "<div class='Info_ResultListDebug'>" + StringEscapeUtils.escapeHtml4(this.Info) + "</div>\n" );
51 
52  sbResult.append( lvsIndention + myIndentionBase + myIndentionBase + "</div>\n" ); // end Header
53 
54  // Body der Klappbox
55  sbResult.append( lvsIndention + myIndentionBase + myIndentionBase +"<div class='Body' id='" + myID.toString() +"' style='display: none;'>\n" );
56 
57  for( LogBase myLog: this.myLogs )
58  {
59  sbResult.append( myLog.getHTMLResult() );
60  }
61 
62  sbResult.append( lvsIndention + myIndentionBase + myIndentionBase + "</div>\n" ); // end Body
63 
64  sbResult.append( lvsIndention + myIndentionBase + myIndentionBase + "</div>\n" ); // end Rahmen
65  //sbResult.append( lvsIndention + "</blockquote>\n");
66 
67  return sbResult.toString();
68  }
69 
70 
71  @Override
72  protected String getJSONNodeProperties()
73  {
74  StringBuilder myJSON = new StringBuilder();
75 
76  myJSON.append( this.jsonElementComma( "type", this.type ) );
77  myJSON.append( this.jsonElementComma( "info", this.Info ) );
78 
79  return myJSON.toString();
80  }
81 
82 }
okw.log.log2html.LogBaseNode
Definition: LogBaseNode.java:3
okw.log.log2html.ResultListDebug
Definition: ResultListDebug.java:5
okw.log.log2html.LogBase
Definition: LogBase.java:7