Loading src/main/java/it/inaf/oats/vospace/CreateNodeController.java +0 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ import it.inaf.oats.vospace.exception.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import net.ivoa.xml.vospace.v2.Property; import java.util.List; @RestController public class CreateNodeController extends BaseNodeController { Loading src/main/java/it/inaf/oats/vospace/UriService.java +12 −13 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ import it.inaf.oats.vospace.exception.PermissionDeniedException; import it.inaf.oats.vospace.persistence.LocationDAO; import it.inaf.oats.vospace.persistence.NodeDAO; import it.inaf.oats.vospace.persistence.model.Location; import it.inaf.oats.vospace.persistence.model.LocationType; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; Loading Loading @@ -78,20 +79,18 @@ public class UriService { Node node = nodeDao.listNode(relativePath).orElseThrow(() -> new NodeNotFoundException(relativePath)); Location location = locationDAO.getNodeLocation(relativePath).orElseThrow(() -> new InternalFaultException("No registered location found for vos_path " + relativePath)); Location location = locationDAO.getNodeLocation(relativePath).orElse(null); String endpoint; switch (location.getType()) { case PORTAL: if (location != null && location.getType() == LocationType.PORTAL) { String fileName = nodeDao.getNodeOsName(relativePath); endpoint = "http://" + location.getSource().getHostname() + location.getSource().getBasePath(); if (!endpoint.endsWith("/")) { endpoint += "/"; } endpoint += fileName; break; default: } else { endpoint = fileServiceUrl + urlEncodePath(relativePath); } Loading Loading
src/main/java/it/inaf/oats/vospace/CreateNodeController.java +0 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ import it.inaf.oats.vospace.exception.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import net.ivoa.xml.vospace.v2.Property; import java.util.List; @RestController public class CreateNodeController extends BaseNodeController { Loading
src/main/java/it/inaf/oats/vospace/UriService.java +12 −13 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ import it.inaf.oats.vospace.exception.PermissionDeniedException; import it.inaf.oats.vospace.persistence.LocationDAO; import it.inaf.oats.vospace.persistence.NodeDAO; import it.inaf.oats.vospace.persistence.model.Location; import it.inaf.oats.vospace.persistence.model.LocationType; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; Loading Loading @@ -78,20 +79,18 @@ public class UriService { Node node = nodeDao.listNode(relativePath).orElseThrow(() -> new NodeNotFoundException(relativePath)); Location location = locationDAO.getNodeLocation(relativePath).orElseThrow(() -> new InternalFaultException("No registered location found for vos_path " + relativePath)); Location location = locationDAO.getNodeLocation(relativePath).orElse(null); String endpoint; switch (location.getType()) { case PORTAL: if (location != null && location.getType() == LocationType.PORTAL) { String fileName = nodeDao.getNodeOsName(relativePath); endpoint = "http://" + location.getSource().getHostname() + location.getSource().getBasePath(); if (!endpoint.endsWith("/")) { endpoint += "/"; } endpoint += fileName; break; default: } else { endpoint = fileServiceUrl + urlEncodePath(relativePath); } Loading