Skip to content
Snippets Groups Projects
Commit 975167ce authored by Piotr Gawron's avatar Piotr Gawron
Browse files

additional info when returning info about gene variants

parent 51cf3f68
No related branches found
No related tags found
1 merge request!5Frontend refactor
......@@ -89,13 +89,12 @@ public class OverlayController extends BaseController {
}
@RequestMapping(value = "/getOverlayElement", method = { RequestMethod.GET, RequestMethod.POST }, produces = { MediaType.APPLICATION_JSON_VALUE })
public Object getFullElement(@RequestParam(value = "token") String token,
@RequestParam(value = "projectId") String projectId,
@RequestParam(value = "modelId") String modelId,
@RequestParam(value = "overlayId") String overlayId, @RequestParam(value = "elementId") String elementId,
@RequestParam(value = "elementType") String elementType, @RequestParam(value = "columns", defaultValue = "") String columns)
throws SecurityException, QueryException {
return overlayController.getOverlayElement(token, projectId, Integer.valueOf(modelId), Integer.valueOf(overlayId), Integer.valueOf(elementId), elementType, columns);
public Map<String, Object> getFullElement(@RequestParam(value = "token") String token, @RequestParam(value = "projectId") String projectId,
@RequestParam(value = "modelId") String modelId, @RequestParam(value = "overlayId") String overlayId,
@RequestParam(value = "elementId") String elementId, @RequestParam(value = "elementType") String elementType,
@RequestParam(value = "columns", defaultValue = "") String columns) throws SecurityException, QueryException {
return overlayController
.getOverlayElement(token, projectId, Integer.valueOf(modelId), Integer.valueOf(overlayId), Integer.valueOf(elementId), elementType, columns);
}
/**
......
......@@ -28,6 +28,7 @@ import lcsb.mapviewer.services.interfaces.ILayoutService.CreateLayoutParams;
import lcsb.mapviewer.services.interfaces.IModelService;
import lcsb.mapviewer.services.interfaces.IUserService;
import lcsb.mapviewer.services.search.data.ElementIdentifier.ElementIdentifierType;
import lcsb.mapviewer.services.search.layout.FullLayoutAliasView;
import lcsb.mapviewer.services.search.layout.LightLayoutAliasView;
import lcsb.mapviewer.services.search.layout.LightLayoutReactionView;
import lcsb.mapviewer.services.utils.data.ColorSchemaType;
......@@ -271,8 +272,8 @@ public class OverlayRestImpl extends BaseRestImpl {
return result;
}
public Object getOverlayElement(String token, String projectId, Integer modelId, Integer overlayId, Integer elementId, String elementType, String columns)
throws QueryException, SecurityException {
public Map<String, Object> getOverlayElement(String token, String projectId, Integer modelId, Integer overlayId, Integer elementId, String elementType,
String columns) throws QueryException, SecurityException {
AuthenticationToken authenticationToken = userService.getToken(token);
Model topModel = modelService.getLastModelByProjectId(projectId, authenticationToken);
......@@ -281,8 +282,12 @@ public class OverlayRestImpl extends BaseRestImpl {
}
Model model = topModel.getSubmodelById(modelId);
Map<String, Object> result = new HashMap<>();
if (ElementIdentifierType.ALIAS.getJsName().equals(elementType)) {
return layoutService.getFullAliasForLayout(model, elementId, overlayId, authenticationToken);
FullLayoutAliasView layoutAliasView = layoutService.getFullAliasForLayout(model, elementId, overlayId, authenticationToken);
result.put("type", ElementIdentifierType.ALIAS);
result.put("overlayContent", layoutAliasView);
return result;
} else {
throw new QueryException("Unknown element type: " + elementType);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment