Interface IDataHandler<I,O>
- All Known Subinterfaces:
IValidatingDataHandler
- All Known Implementing Classes:
AbstractDataHandler
,DOMDataHandler
,PropertiesDataHandler
public interface IDataHandler<I,O>
Configuration data handler.
- Author:
- POLARION SOFTWARE
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionreadLocation
(ILocation location, IDataHandlerContext context) Reads the location in the form suitable to be passed towriteLocation(ILocation, Object, IDataHandlerContext)
readLocations
(List<ILocation> locations, IDataHandlerContext context) Read configuration from given locations Merges the hierarchy of configurations into onevoid
writeLocation
(ILocation location, I data, IDataHandlerContext context) Writes data to given location.
-
Method Details
-
readLocations
Read configuration from given locations Merges the hierarchy of configurations into one- Parameters:
locations
- The config hierarchy. The first location is the most concrete, following elements are more and more generic. The caller ensures, that only relevant configurations are passed in.Empty
locations
means, there is no valid file. In such a case eithernull
or default config can be returned.context
- context- Returns:
- merged configuration object
- Since:
- 3.1.2
-
readLocation
Reads the location in the form suitable to be passed towriteLocation(ILocation, Object, IDataHandlerContext)
- Parameters:
location
- The location, nevernull
.context
- context- Returns:
- the data read from the specified location
- Since:
- 3.1.2
-
writeLocation
void writeLocation(@NotNull ILocation location, @NotNull I data, @NotNull IDataHandlerContext context) Writes data to given location.- Parameters:
location
- The location, nevernull
.data
- Data as created by the user or byreadLocation(ILocation, IDataHandlerContext)
.context
- context- Since:
- 3.1.2
-