Skip to content

Commit

Permalink
Merge branch 'master' of github.com:JaneliaSciComp/workstation
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristian Goina committed Dec 2, 2022
2 parents 363ea25 + 5038635 commit fd41e0d
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 21 deletions.
2 changes: 1 addition & 1 deletion modules/CommonLibraries/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@
<publicPackage>org.janelia.model.security.util</publicPackage>
<publicPackage>org.janelia.model.util</publicPackage>
<publicPackage>org.janelia.jacsstorage.datarequest</publicPackage>
<publicPackage>org.janelia.jacsstorage.newclient</publicPackage>
<publicPackage>org.janelia.jacsstorage.clients.api</publicPackage>
<publicPackage>org.janelia.it.jacs.compute.access</publicPackage>
<publicPackage>org.janelia.it.jacs.compute.api</publicPackage>
<publicPackage>org.janelia.it.jacs.compute.api.support</publicPackage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
import org.janelia.filecacheutils.FileProxy;
import org.janelia.filecacheutils.LocalFileCache;
import org.janelia.jacsstorage.newclient.JadeStorageService;
import org.janelia.jacsstorage.newclient.StorageService;
import org.janelia.jacsstorage.clients.api.JadeStorageService;
import org.janelia.workstation.core.api.http.HttpClientProxy;
import org.janelia.workstation.core.events.Events;
import org.janelia.workstation.core.events.lifecycle.ConsolePropsLoaded;
Expand Down Expand Up @@ -142,9 +141,7 @@ public InputStream openFileInputStream(String standardPathName, boolean forceRef
*/
public JadeStorageService getStorageService() {
String remoteStorageUrl = ConsoleProperties.getInstance().getProperty("jadestorage.rest.url");
StorageService storageService = new StorageService(remoteStorageUrl, null);
JadeStorageService jadeStorage = new JadeStorageService(storageService,
return new JadeStorageService(remoteStorageUrl, null,
AccessManager.getSubjectKey(), AccessManager.getAccessManager().getToken());
return jadeStorage;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ RemoteLocation saveFile(URL url, File file)
/**
* Save the specified stream to the server.
*
* This method is protected (instead of private) so that it can
* be used for testing.
*
* @param url server URL for the new file.
* @param fileStream file contents to save.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.janelia.workstation.n5viewer;

import com.google.common.eventbus.Subscribe;
import org.janelia.jacsstorage.newclient.JadeStorageService;
import org.janelia.jacsstorage.clients.api.JadeStorageService;
import org.janelia.model.domain.files.N5Container;
import org.janelia.saalfeldlab.n5.N5Reader;
import org.janelia.saalfeldlab.n5.N5TreeNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.janelia.workstation.n5viewer;

import org.janelia.jacsstorage.newclient.JadeStorageService;
import org.janelia.jacsstorage.newclient.StorageService;
import org.janelia.jacsstorage.clients.api.JadeStorageService;
import org.janelia.model.domain.files.N5Container;
import org.janelia.saalfeldlab.n5.N5DatasetDiscoverer;
import org.janelia.saalfeldlab.n5.N5Reader;
Expand Down Expand Up @@ -88,12 +87,11 @@ protected boolean createKeys(List<N5TreeNode> list) {
log.debug("Creating children keys for N5ContainerNode");

String remoteStorageUrl = ConsoleProperties.getInstance().getProperty("jadestorage.rest.url");
StorageService storageService = new StorageService(remoteStorageUrl, null);
JadeStorageService jadeStorage = new JadeStorageService(storageService,
JadeStorageService jadeStorage = new JadeStorageService(remoteStorageUrl, null,
AccessManager.getSubjectKey(), AccessManager.getAccessManager().getToken());

// TODO: use this after we implement server side discovery
// StorageLocation storageLocation = jadeStorage.getStorageObjectByPath(n5Container.getFilepath());
// StorageLocation storageLocation = jadeStorage.getStorageLocationByPath(n5Container.getFilepath());
// String relativePath = storageLocation.getRelativePath(n5Container.getFilepath());
// N5TreeNode n5RootNode = jadeStorage.getN5Tree(storageLocation, relativePath);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import org.janelia.jacsstorage.newclient.JadeStorageService;
import org.janelia.jacsstorage.newclient.StorageLocation;
import org.janelia.jacsstorage.newclient.StorageObject;
import org.janelia.jacsstorage.newclient.StorageObjectNotFoundException;
import org.janelia.jacsstorage.clients.api.JadeStorageService;
import org.janelia.jacsstorage.clients.api.StorageLocation;
import org.janelia.jacsstorage.clients.api.StorageObject;
import org.janelia.jacsstorage.clients.api.StorageObjectNotFoundException;
import org.janelia.saalfeldlab.n5.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -53,7 +53,7 @@ public N5JadeReader(final JadeStorageService jadeStorage,
super(gsonBuilder);
this.jadeStorage = jadeStorage;
this.basePath = basePath;
this.storageLocation = jadeStorage.getStorageObjectByPath(basePath);
this.storageLocation = jadeStorage.getStorageLocationByPath(basePath);

if (storageLocation == null) {
throw new IOException("Could not find Jade location for path: "+basePath);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@

<janeliaws.jacs-messaging.version>2.5.0</janeliaws.jacs-messaging.version>

<janeliaws.jacs-storage.version>1.18.0.RELEASE</janeliaws.jacs-storage.version>
<janeliaws.jacs-storage.version>1.19.0.RELEASE</janeliaws.jacs-storage.version>

<!--==== Plugin Versions ==================================================================================-->

Expand Down

0 comments on commit fd41e0d

Please sign in to comment.