本文整理汇总了Java中org.apache.jmeter.testbeans.gui.FileEditor类的典型用法代码示例。如果您正苦于以下问题:Java FileEditor类的具体用法?Java FileEditor怎么用?Java FileEditor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FileEditor类属于org.apache.jmeter.testbeans.gui包,在下文中一共展示了FileEditor类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CryptoWSSecurityPostProcessorBeanInfo
import org.apache.jmeter.testbeans.gui.FileEditor; //导入依赖的package包/类
public CryptoWSSecurityPostProcessorBeanInfo(Class<? extends CryptoWSSecurityPostProcessor> clazz) {
super(clazz);
createPropertyGroup("Certificate", new String[]{
"keystoreFile", "keystorePassword", "certPassword"
});
PropertyDescriptor p;
p = property("keystoreFile");
p.setPropertyEditorClass(FileEditor.class);
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, "");
p = property("keystorePassword");
p.setPropertyEditorClass(PasswordEditor.class);
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, "");
p = property("certPassword");
p.setPropertyEditorClass(PasswordEditor.class);
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, "");
}
示例2: TimestampTimerBeanInfo
import org.apache.jmeter.testbeans.gui.FileEditor; //导入依赖的package包/类
public TimestampTimerBeanInfo() {
super(TimestampTimer.class);
createPropertyGroup("timestamp_timer", new String[] {"usageMode", "filename" });
PropertyDescriptor p = property("filename");
p = property("usageMode", TimestampTimer.Mode.class); //$NON-NLS-1$
p.setValue(DEFAULT, Integer.valueOf(TimestampTimer.Mode.TimestampsSharedWithinThreadGroup.ordinal()));
p.setValue(NOT_UNDEFINED, Boolean.TRUE); // must be defined
p = property("filename");
p.setValue(NOT_EXPRESSION, Boolean.FALSE);
p.setValue(NOT_UNDEFINED, Boolean.TRUE); // must be defined
p.setValue(DEFAULT, "");
p.setPropertyEditorClass(FileEditor.class);
}
示例3: CryptoWSSecurityPreProcessorBeanInfo
import org.apache.jmeter.testbeans.gui.FileEditor; //导入依赖的package包/类
public CryptoWSSecurityPreProcessorBeanInfo(Class<? extends CryptoWSSecurityPreProcessor> clazz) {
super(clazz);
createPropertyGroup("Certificate", new String[]{
"keystoreFile", "keystorePassword", "certAlias", "certPassword"
});
PropertyDescriptor p;
p = property("keystoreFile");
p.setPropertyEditorClass(FileEditor.class);
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, "");
p = property("keystorePassword");
p.setPropertyEditorClass(PasswordEditor.class);
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, "");
p = property("certAlias");
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, "");
p = property("certPassword");
p.setPropertyEditorClass(PasswordEditor.class);
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, "");
p = property(PARTSTOSECURE); // this is expected to be added to a property group by subclasses
p.setPropertyEditorClass(TableEditor.class);
p.setValue(TableEditor.CLASSNAME, SecurityPart.class.getName());
p.setValue(TableEditor.HEADERS, new String[]{"Name", "Namespace", "Encode"});
p.setValue(TableEditor.OBJECT_PROPERTIES, new String[]{"name", "namespace", "modifier"});
}
示例4: AccessLogSamplerBeanInfo
import org.apache.jmeter.testbeans.gui.FileEditor; //导入依赖的package包/类
public AccessLogSamplerBeanInfo() {
super(AccessLogSampler.class);
log.debug("Entered access log sampler bean info");
try {
createPropertyGroup("defaults", // $NON-NLS-1$
new String[] { "domain", "portString", "imageParsing" });// $NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
createPropertyGroup("plugins", // $NON-NLS-1$
new String[] { "parserClassName", "filterClassName" }); // $NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
createPropertyGroup("accesslogfile", // $NON-NLS-1$
new String[] { "logFile" }); // $NON-NLS-1$
PropertyDescriptor p;
p = property("parserClassName");
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, AccessLogSampler.DEFAULT_CLASS);
p.setValue(NOT_OTHER, Boolean.TRUE);
p.setValue(NOT_EXPRESSION, Boolean.TRUE);
final List<String> logParserClasses = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] { LogParser.class });
if (log.isDebugEnabled()) {
log.debug("found parsers: " + logParserClasses);
}
p.setValue(TAGS, logParserClasses.toArray(new String[logParserClasses.size()]));
p = property("filterClassName"); // $NON-NLS-1$
p.setValue(NOT_UNDEFINED, Boolean.FALSE);
p.setValue(DEFAULT, ""); // $NON-NLS-1$
p.setValue(NOT_EXPRESSION, Boolean.TRUE);
List<String> classes = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(),
new Class[] { Filter.class }, false);
p.setValue(TAGS, classes.toArray(new String[classes.size()]));
p = property("logFile"); // $NON-NLS-1$
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, "");
p.setPropertyEditorClass(FileEditor.class);
p = property("domain"); // $NON-NLS-1$
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, "");
p = property("portString"); // $NON-NLS-1$
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, ""); // $NON-NLS-1$
p = property("imageParsing"); // $NON-NLS-1$
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, Boolean.FALSE);
p.setValue(NOT_OTHER, Boolean.TRUE);
} catch (IOException e) {
log.warn("couldn't find classes and set up properties", e);
throw new RuntimeException("Could not find classes with class finder", e);
}
log.debug("Got to end of access log samper bean info init");
}
示例5: ScriptingBeanInfoSupport
import org.apache.jmeter.testbeans.gui.FileEditor; //导入依赖的package包/类
protected ScriptingBeanInfoSupport(Class<? extends TestBean> beanClass, String[] LANGUAGE_TAGS) {
super(beanClass);
PropertyDescriptor p;
p = property("scriptLanguage"); // $NON-NLS-1$
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, ""); // $NON-NLS-1$
p.setValue(TAGS, LANGUAGE_TAGS);
createPropertyGroup("scriptingLanguage", // $NON-NLS-1$
new String[] { "scriptLanguage" }); // $NON-NLS-1$
p = property("parameters"); // $NON-NLS-1$
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, ""); // $NON-NLS-1$
createPropertyGroup("parameterGroup", // $NON-NLS-1$
new String[] { "parameters" }); // $NON-NLS-1$
p = property("filename"); // $NON-NLS-1$
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, ""); // $NON-NLS-1$
p.setPropertyEditorClass(FileEditor.class);
createPropertyGroup("filenameGroup", // $NON-NLS-1$
new String[] { "filename" }); // $NON-NLS-1$
/*
* If we are creating a JSR223 element, add the cache key property.
*
* Note that this cannot be done in the JSR223BeanInfoSupport class
* because that causes problems with the group; its properties are
* not always set up before they are needed. This cause various
* issues with the GUI:
* - wrong field attributes (should not allow null)
* - sometimes GUI is completely mangled
* - field appears at start rather than at end.
* - the following warning is logged:
* jmeter.testbeans.gui.GenericTestBeanCustomizer:
* org.apache.jmeter.util.JSR223TestElement#cacheKey does not appear to have been configured
*
* Adding the group here solves these issues, and it's also
* possible to add the key just before the script panel
* to which it relates.
*
* It's not yet clear why this should be, but it looks as though
* createPropertyGroup does not work properly if it is called from
* any subclasses of this class.
*
*/
if (JSR223TestElement.class.isAssignableFrom(beanClass) ) {
p = property("cacheKey"); // $NON-NLS-1$
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, ""); // $NON-NLS-1$
createPropertyGroup("cacheKey_group", // $NON-NLS-1$
new String[] { "cacheKey" }); // $NON-NLS-1$
}
p = property("script"); // $NON-NLS-1$
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, ""); // $NON-NLS-1$
p.setPropertyEditorClass(TextAreaEditor.class);
createPropertyGroup("scripting", // $NON-NLS-1$
new String[] { "script" }); // $NON-NLS-1$
}