org.webpieces.plugins.properties.beans.ApplyDatabaseProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plugin-properties Show documentation
Show all versions of plugin-properties Show documentation
Webpieces database backed property store
package org.webpieces.plugins.properties.beans;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.webpieces.router.api.extensions.SimpleStorage;
class ApplyDatabaseProperties implements Runnable {
private static final Logger log = LoggerFactory.getLogger(BeanMetaData.class);
private SimpleStorage storage;
private Map> meta;
private PropertyInvoker propertyInvoker;
public ApplyDatabaseProperties(Map> meta, SimpleStorage storage, PropertyInvoker propertyInvoker) {
this.meta = meta;
this.storage = storage;
this.propertyInvoker = propertyInvoker;
}
@Override
public void run() {
try {
log.info("Starting to apply properties from database to beans. read Database first");
CompletableFuture