From 49fe139f52afcb444478400d10db41263ef1162d Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 5 Jun 2014 15:28:46 +0200 Subject: Add Authenticator to the open() method params of ClusterStorage. Passed in through the TransactionManager. This allows user-login to storages. Fixes #192 --- src/main/java/com/c2kernel/persistency/ClusterStorageManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/c2kernel/persistency/ClusterStorageManager.java') diff --git a/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java b/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java index 20857c6..c9ede04 100644 --- a/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java +++ b/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java @@ -15,6 +15,7 @@ import com.c2kernel.events.History; import com.c2kernel.persistency.outcome.Outcome; import com.c2kernel.persistency.outcome.Viewpoint; import com.c2kernel.process.Gateway; +import com.c2kernel.process.auth.Authenticator; import com.c2kernel.utils.Logger; import com.c2kernel.utils.SoftCache; import com.c2kernel.utils.WeakCache; @@ -38,7 +39,7 @@ public class ClusterStorageManager { * Initialises all ClusterStorage handlers listed by class name in the property "ClusterStorages" * This property is usually process specific, and so should be in the server/client.conf and not the connect file. */ - public ClusterStorageManager() throws ClusterStorageException { + public ClusterStorageManager(Authenticator auth) throws ClusterStorageException { Object clusterStorageProp = Gateway.getProperties().getObject("ClusterStorage"); if (clusterStorageProp == null || clusterStorageProp.equals("")) { throw new ClusterStorageException("ClusterStorageManager.init() - no ClusterStorages defined. No persistency!"); @@ -64,7 +65,7 @@ public class ClusterStorageManager { int clusterNo = 0; for (ClusterStorage newStorage : rootStores) { try { - newStorage.open(); + newStorage.open(auth); } catch (ClusterStorageException ex) { Logger.error(ex); throw new ClusterStorageException("ClusterStorageManager.init() - Error initialising storage handler " + newStorage.getClass().getName() + -- cgit v1.2.3