01: /*
02: * Created on Oct 30, 2004
03: *
04: * TODO To change the template for this generated file go to
05: * Window - Preferences - Java - Code Style - Code Templates
06: */
07: package org.xdev.base.schema;
08:
09: import java.util.HashMap;
10:
11: /**
12: * @author Administrator
13: *
14: * TODO To change the template for this generated type comment go to
15: * Window - Preferences - Java - Code Style - Code Templates
16: */
17: public class ActionSchema extends AbstractComponentSchema {
18:
19: /**
20: * @param id
21: * @param properties
22: * @param componentType
23: */
24: public ActionSchema(String id, HashMap properties,
25: Class componentType) {
26: super (id, properties, componentType);
27: // TODO Auto-generated constructor stub
28: }
29:
30: /* (non-Javadoc)
31: * @see org.xdev.base.schema.AbstractComponentSchema#getSchemaProperties()
32: */
33: public SchemaProperty[] getSchemaProperties() {
34:
35: SchemaProperty logLevel = new SchemaProperty("log-level",
36: SchemaProperty.DataType.LIST);
37:
38: logLevel.setTitle("Logging Level");
39: logLevel
40: .setDescription("Logging level of the component as defined by Log4J");
41:
42: logLevel.AddValue(new SchemaPropertyValue(".DEBUG",
43: "Everything"));
44: logLevel.AddValue(new SchemaPropertyValue(".INFO",
45: "Up to Information Messages"));
46: logLevel.AddValue(new SchemaPropertyValue(".WARN",
47: "Up to Warning Messages"));
48: logLevel.AddValue(new SchemaPropertyValue(".ERROR",
49: "Up to Error Messages"));
50: logLevel.AddValue(new SchemaPropertyValue(".FATAL",
51: "Only Fatal Exceptions"));
52:
53: SchemaProperty logClassFilter = new SchemaProperty("log-class",
54: SchemaProperty.DataType.REGEX);
55:
56: logClassFilter.setTitle("Logging Class Filter");
57: logClassFilter
58: .setDescription("Filters the component logging output by the class name defined as a regular expression.");
59:
60: SchemaProperty logRegExFilter = new SchemaProperty("log-regex",
61: SchemaProperty.DataType.REGEX);
62:
63: logRegExFilter.setTitle("Logging Output Filter");
64: logRegExFilter
65: .setDescription("Filters the component logging output by the content of the output by a filter defined as a regular expression.");
66:
67: SchemaProperty catchExc = new SchemaProperty("catch-exception",
68: SchemaProperty.DataType.BOOL);
69:
70: catchExc.setTitle("Ignore Errors");
71: catchExc
72: .setDescription("Defines whether the component throws the exception or not. Default is true.");
73:
74: return new SchemaProperty[] { logLevel, logClassFilter,
75: logRegExFilter, catchExc };
76: }
77:
78: /* (non-Javadoc)
79: * @see org.xdev.base.schema.AbstractComponentSchema#getSchemaChildren()
80: */
81: public SchemaChild[] getSchemaChildren() {
82: return new SchemaChild[0];
83: }
84:
85: }
|