01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc;
05:
06: import org.apache.xmlbeans.XmlError;
07:
08: import com.tc.admin.common.XObjectTableModel;
09:
10: import java.util.List;
11:
12: public class ConfigProblemTableModel extends XObjectTableModel {
13: private static final String[] FIELDS = { "Message", "Line",
14: "Column" };
15:
16: public ConfigProblemTableModel() {
17: super (XmlError.class, FIELDS, FIELDS);
18: }
19:
20: public ConfigProblemTableModel(List errorList) {
21: this ();
22: setErrors(errorList);
23: }
24:
25: public void setErrors(List errorList) {
26: set(errorList.iterator());
27: }
28:
29: public XmlError getError(int row) {
30: return (XmlError) getObjectAt(row);
31: }
32: }
|