01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.jdo;
12:
13: import java.beans.SimpleBeanInfo;
14: import java.beans.PropertyDescriptor;
15: import java.beans.IntrospectionException;
16:
17: import com.versant.core.common.BindingSupportImpl;
18: import com.versant.core.jdo.LogDownloader;
19:
20: /**
21: * Property info for LogDownloader.
22: * @keep-all
23: */
24: public class LogDownloaderBeanInfo extends SimpleBeanInfo {
25:
26: public LogDownloaderBeanInfo() {
27: }
28:
29: public PropertyDescriptor[] getPropertyDescriptors() {
30: try {
31: String[] s = new String[] {
32: "eventPollSecs",
33: "Event poll seconds",
34: "Time in seconds between polls of the event ring buffer",
35: "metricPollSecs",
36: "Metric poll seconds",
37: "Time in seconds between polls of the metric snapshot ring buffer",
38: "append",
39: "Append",
40: "Append to end of existing event text file (if any)",
41: "maxFileSizeK",
42: "Max file size in K",
43: "Maximum size for a file before rollover to backup",
44: "backups",
45: "Number of backups",
46: "Number of old log files to keep (filename.jdolog.1, filename.jdolog.2, ...)",
47: "filename",
48: "Filename",
49: "Data is written to files based on this name (default is jdogenie_<server>)",
50: "eventBinary",
51: "Write event binary file",
52: "Write events to a binary file (filename.jdolog, open in management console)",
53: "eventText",
54: "Write event text file",
55: "Write events to text file (filename.txt, for tail -f)",
56: "metricBinary",
57: "Write metric binary file",
58: "Write metric snapshots to binary file (filename.jdoperf, open in management console)",
59: "dateFormat",
60: "Date format",
61: "Date format for event text file (for java.text.SimpleDateFormat)", };
62: int n = s.length / 3;
63: PropertyDescriptor[] ans = new PropertyDescriptor[n];
64: int q = 0;
65: for (int i = 0; i < n; i++, q += 3) {
66: PropertyDescriptor p = new PropertyDescriptor(s[q],
67: LogDownloader.class);
68: p.setDisplayName(s[q + 1]);
69: p.setShortDescription(s[q + 2]);
70: ans[i] = p;
71: }
72: return ans;
73: } catch (IntrospectionException e) {
74: throw BindingSupportImpl.getInstance().internal(
75: e.getClass().getName() + ": " + e.getMessage(), e);
76: }
77: }
78:
79: }
|