1 package okw.log.log2html;
3 import org.apache.commons.text.StringEscapeUtils;
7 private String type =
"ResultList";
15 this.Info = fpsListHeader;
18 public void setReturn(String fpsReturn)
23 protected void SetFail()
27 protected void SetPass()
32 protected String getHTMLResult()
34 StringBuilder sbResult =
new StringBuilder();
36 String lvsIndention = this.getLevelIndention();
40 sbResult.append( lvsIndention +
"<div class='" + this.getClass().getSimpleName() +
"'>\n" );
41 sbResult.append( lvsIndention + myIndentionBase +
"<div class='Header'>\n" );
44 if (!this.myLogs.isEmpty())
46 sbResult.append( lvsIndention + myIndentionBase + myIndentionBase +
"<div class='FoldMe' onClick='div_change(" + myID.toString() +
")'></div>\n" );
49 sbResult.append( lvsIndention + myIndentionBase + myIndentionBase +
"<div class='Info_ResultList'>" + StringEscapeUtils.escapeHtml4(
this.Info) +
"</div>\n" );
51 sbResult.append( lvsIndention + myIndentionBase + myIndentionBase +
"</div>\n" );
54 sbResult.append( lvsIndention + myIndentionBase + myIndentionBase +
"<div class='Body' id='" + myID.toString() +
"' style='display: none;'>\n" );
56 for(
LogBase myLog: this.myLogs )
58 sbResult.append( myLog.getHTMLResult() );
61 sbResult.append( lvsIndention + myIndentionBase + myIndentionBase +
"</div>\n" );
63 sbResult.append( lvsIndention + myIndentionBase + myIndentionBase +
"</div>\n" );
66 return sbResult.toString();
71 protected String getJSONNodeProperties()
73 StringBuilder myJSON =
new StringBuilder();
75 myJSON.append( this.jsonElementComma(
"type", this.type ) );
76 myJSON.append( this.jsonElementComma(
"info", this.Info ) );
78 return myJSON.toString();