1 17 package org.alfresco.repo.node.integrity; 18 19 import java.util.List ; 20 21 26 public class IntegrityRecord 27 { 28 private String msg; 29 private List <StackTraceElement []> traces; 30 31 34 public IntegrityRecord(String msg) 35 { 36 this.msg = msg; 37 this.traces = null; 38 } 39 40 45 public void setTraces(List <StackTraceElement []> traces) 46 { 47 this.traces = traces; 48 } 49 50 public String getMessage() 51 { 52 return msg; 53 } 54 55 58 public String toString() 59 { 60 StringBuilder sb = new StringBuilder (msg.length() * 2); 61 if (traces == null) 62 { 63 sb.append(msg); 64 } 65 else 66 { 67 sb.append(msg); 68 for (StackTraceElement [] trace : traces) 69 { 70 sb.append("\n Trace of possible cause:"); 71 for (int i = 0; i < trace.length; i++) 72 { 73 sb.append("\n ").append(trace[i]); 74 } 75 } 76 } 77 return sb.toString(); 78 } 79 } 80 | Popular Tags |