use of org.flywaydb.core.api.resource.LoadableResource in project flyway by flyway.
the class SqlMigrationResolver method createPlaceholderReplacingLoadableResources.
private LoadableResource[] createPlaceholderReplacingLoadableResources(List<LoadableResource> loadableResources) {
List<LoadableResource> list = new ArrayList<>();
for (final LoadableResource loadableResource : loadableResources) {
LoadableResource placeholderReplacingLoadableResource = new LoadableResource() {
@Override
public Reader read() {
return PlaceholderReplacingReader.create(configuration, parsingContext, loadableResource.read());
}
@Override
public String getAbsolutePath() {
return loadableResource.getAbsolutePath();
}
@Override
public String getAbsolutePathOnDisk() {
return loadableResource.getAbsolutePathOnDisk();
}
@Override
public String getFilename() {
return loadableResource.getFilename();
}
@Override
public String getRelativePath() {
return loadableResource.getRelativePath();
}
};
list.add(placeholderReplacingLoadableResource);
}
return list.toArray(new LoadableResource[0]);
}
Aggregations