OpenKeyWord  Build_ID: 457, Datum: 01.02.2020 07:45:48
Dont repeat yourself. - Do it once and only once!
LogSequence.java
1 package okw.log.log2html;
2 
3 public class LogSequence extends LogBaseNode
4 {
5  private String type = "Sequence";
6 
7  LogSequence(LogBase Parent, String fpsWindowFN, String fpsSequenName, String... fpsParameter)
8  {
9  setParent(Parent);
10  myID = AllCount;
11 
12  // inkrementieren FunctionCount
13  this.SequenceCount();
14 
15  StringBuilder StrBuilder = new StringBuilder();
16 
17  StrBuilder.append( "[" + fpsWindowFN + "]-'" + fpsSequenName + "': ");
18 
19  if ( fpsParameter.length == 2 )
20  {
21  StrBuilder.append( "'" + fpsParameter[0] + "' = '" + fpsParameter[1] + "'" );
22  }
23  else
24  {
25  Boolean GreaterOne = false;
26  for ( String sParameter : fpsParameter )
27  {
28  if (GreaterOne)
29  {
30  StrBuilder.append( ", " );
31  }
32  else
33  {
34  GreaterOne = true;
35  }
36  StrBuilder.append( "'" + sParameter + "'" );
37  }
38  }
39 
40  this.Info = StrBuilder.toString();
41  }
42 
43 
44  @Override
45  protected void ErrorCount()
46  {
47  ErrorCount++;
48 
49  this.SequenceFail();
50 
51  this.bError = true;
52 
53  if ( myParent != null)
54  {
55  myParent.ErrorCount();
56  }
57  }
58 
59 
60  @Override
61  protected void ExceptionCount()
62  {
63  ExceptionCount++;
64 
65  this.SequenceFail();
66 
67  this.bException = true;
68 
69  if ( myParent != null)
70  {
71  myParent.ExceptionCount();
72  }
73  }
74 
75  @Override
76  protected void SequenceFail()
77  {
78  if ( ! (this.bError || this.bException ) )
79  myParent.SequenceFail();
80  }
81 
82 
83 
84  @Override
85  protected String getJSONNodeProperties()
86  {
87  StringBuilder myJSON = new StringBuilder();
88 
89  myJSON.append( this.jsonElementComma( "type", this.type ) );
90  myJSON.append( this.jsonElementComma( "info", this.Info ) );
91 
92  return myJSON.toString();
93  }
94  }
okw.log.log2html.LogBaseNode
Definition: LogBaseNode.java:3
okw.log.log2html.LogBase
Definition: LogBase.java:7
okw.log.log2html.LogSequence
Definition: LogSequence.java:3