01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18:
19: package org.apache.jmeter.config;
20:
21: import java.beans.PropertyDescriptor;
22:
23: import org.apache.jmeter.testbeans.BeanInfoSupport;
24:
25: /**
26: * @author mstover
27: *
28: */
29: public class CSVDataSetBeanInfo extends BeanInfoSupport {
30:
31: // These names must agree case-wise with the variable and property names
32: private static final String FILENAME = "filename"; //$NON-NLS-1$
33: private static final String FILE_ENCODING = "fileEncoding"; //$NON-NLS-1$
34: private static final String VARIABLE_NAMES = "variableNames"; //$NON-NLS-1$
35: private static final String DELIMITER = "delimiter"; //$NON-NLS-1$
36: private static final String RECYCLE = "recycle"; //$NON-NLS-1$
37: private static final String STOPTHREAD = "stopThread"; //$NON-NLS-1$
38:
39: public CSVDataSetBeanInfo() {
40: super (CSVDataSet.class);
41: createPropertyGroup("csv_data", //$NON-NLS-1$
42: new String[] { FILENAME, FILE_ENCODING, VARIABLE_NAMES,
43: DELIMITER, RECYCLE, STOPTHREAD });
44:
45: PropertyDescriptor p = property(FILENAME);
46: p.setValue(NOT_UNDEFINED, Boolean.TRUE);
47: p.setValue(DEFAULT, ""); //$NON-NLS-1$
48: p.setValue(NOT_EXPRESSION, Boolean.TRUE);
49:
50: p = property(FILE_ENCODING);
51: p.setValue(NOT_UNDEFINED, Boolean.TRUE);
52: p.setValue(DEFAULT, ""); //$NON-NLS-1$
53: p.setValue(NOT_EXPRESSION, Boolean.TRUE);
54:
55: p = property(VARIABLE_NAMES);
56: p.setValue(NOT_UNDEFINED, Boolean.TRUE);
57: p.setValue(DEFAULT, ""); //$NON-NLS-1$
58: p.setValue(NOT_EXPRESSION, Boolean.TRUE);
59:
60: p = property(DELIMITER);
61: p.setValue(NOT_UNDEFINED, Boolean.TRUE);
62: p.setValue(DEFAULT, ","); //$NON-NLS-1$
63: p.setValue(NOT_EXPRESSION, Boolean.TRUE);
64:
65: p = property(RECYCLE);
66: p.setValue(NOT_UNDEFINED, Boolean.TRUE);
67: p.setValue(DEFAULT, Boolean.TRUE);
68: p.setValue(NOT_EXPRESSION, Boolean.TRUE);
69:
70: p = property(STOPTHREAD);
71: p.setValue(NOT_UNDEFINED, Boolean.TRUE);
72: p.setValue(DEFAULT, Boolean.FALSE);
73: p.setValue(NOT_EXPRESSION, Boolean.TRUE);
74: }
75: }
|