Package org.citrusframework.io
Class CitrusResourceEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.citrusframework.io.CitrusResourceEditor
- All Implemented Interfaces:
PropertyEditor
Editor for
Resource descriptors, to automatically convert String locations e.g. file:C:/myfile.txt
or classpath:myfile.txt to Resource properties instead of using a String location property.
The path may contain ${...} placeholders, to be resolved as org.springframework.core.env.Environment
properties: e.g. ${user.dir}. Unresolvable placeholders are ignored by default.
Delegates to a Resources to do the Resource creation. The implementation follows the
implementation of ResourceEditor.- Since:
- 4.0
- Author:
- Thorsten Schlathoelter
-
Constructor Summary
ConstructorsConstructorDescriptionCitrusResourceEditor(org.springframework.core.env.PropertyResolver propertyResolver) CitrusResourceEditor(org.springframework.core.env.PropertyResolver propertyResolver, boolean ignoreUnresolvablePlaceholders) -
Method Summary
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
-
Constructor Details
-
CitrusResourceEditor
public CitrusResourceEditor() -
CitrusResourceEditor
public CitrusResourceEditor(@Nullable org.springframework.core.env.PropertyResolver propertyResolver) -
CitrusResourceEditor
public CitrusResourceEditor(@Nullable org.springframework.core.env.PropertyResolver propertyResolver, boolean ignoreUnresolvablePlaceholders)
-
-
Method Details
-
setAsText
- Specified by:
setAsTextin interfacePropertyEditor- Overrides:
setAsTextin classPropertyEditorSupport
-
resolvePath
-
getAsText
- Specified by:
getAsTextin interfacePropertyEditor- Overrides:
getAsTextin classPropertyEditorSupport
-