mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-07 23:29:10 +01:00
add the interface StoreFactory and refactor storeFactories
This commit is contained in:
@@ -45,6 +45,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import sonia.scm.store.ConfigurationEntryStore;
|
||||
import sonia.scm.store.ConfigurationEntryStoreFactory;
|
||||
import sonia.scm.store.StoreParameters;
|
||||
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
@@ -87,9 +88,13 @@ public class SecureKeyResolver extends SigningKeyResolverAdapter
|
||||
* @param storeFactory store factory
|
||||
*/
|
||||
@Inject
|
||||
@SuppressWarnings("unchecked")
|
||||
public SecureKeyResolver(ConfigurationEntryStoreFactory storeFactory)
|
||||
{
|
||||
this.store = storeFactory.getStore(SecureKey.class, STORE_NAME);
|
||||
store = storeFactory.getStore(new StoreParameters()
|
||||
.withType(SecureKey.class)
|
||||
.withName(STORE_NAME)
|
||||
.build());
|
||||
}
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user