summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/persistency/ClusterStorageManager.java
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-06-05 15:28:46 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-06-05 15:28:46 +0200
commit49fe139f52afcb444478400d10db41263ef1162d (patch)
treea30df8a66d1ebb4ac29990b288bd5acc7bb44c44 /src/main/java/com/c2kernel/persistency/ClusterStorageManager.java
parentd4fa3bd9dd48f4d5e26850a23f5ba48a9c10ad64 (diff)
Add Authenticator to the open() method params of ClusterStorage. Passed
in through the TransactionManager. This allows user-login to storages. Fixes #192
Diffstat (limited to 'src/main/java/com/c2kernel/persistency/ClusterStorageManager.java')
-rw-r--r--src/main/java/com/c2kernel/persistency/ClusterStorageManager.java5
1 files changed, 3 insertions, 2 deletions
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() +