Commit ea5daf77 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '1533-background-order' into 'devel_16.0.x'

Resolve "archived map is uploaded with incorrect order of backgrounds"

See merge request !1339
parents 9071865b 03c0c7e6
Pipeline #46655 passed with stage
in 35 minutes and 35 seconds
minerva (16.0.0~beta.2) stable; urgency=medium minerva (16.0.0~beta.2) stable; urgency=medium
* Bug fix: correct background order for old projects restored (#1533)
* Bug fix: search chemicals by target returned chemicals not bounded by * Bug fix: search chemicals by target returned chemicals not bounded by
disease (#1535) disease (#1535)
* Bug fix: problem with export map with submaps fixed (#1540) * Bug fix: problem with export map with submaps fixed (#1540)
......
...@@ -67,6 +67,16 @@ import lcsb.mapviewer.services.ObjectExistsException; ...@@ -67,6 +67,16 @@ import lcsb.mapviewer.services.ObjectExistsException;
import lcsb.mapviewer.services.ObjectNotFoundException; import lcsb.mapviewer.services.ObjectNotFoundException;
import lcsb.mapviewer.services.QueryException; import lcsb.mapviewer.services.QueryException;
import lcsb.mapviewer.services.interfaces.IElementService; import lcsb.mapviewer.services.interfaces.IElementService;
import lcsb.mapviewer.services.interfaces.IProjectBackgroundService;
import lcsb.mapviewer.services.interfaces.IProjectService;
import lcsb.mapviewer.services.interfaces.IReactionService;
import lcsb.mapviewer.services.interfaces.IUserService;
import lcsb.mapviewer.services.*;
import lcsb.mapviewer.services.interfaces.*;
import lcsb.mapviewer.services.ObjectExistsException;
import lcsb.mapviewer.services.ObjectNotFoundException;
import lcsb.mapviewer.services.QueryException;
import lcsb.mapviewer.services.interfaces.IElementService;
import lcsb.mapviewer.services.interfaces.IProjectService; import lcsb.mapviewer.services.interfaces.IProjectService;
import lcsb.mapviewer.services.interfaces.IReactionService; import lcsb.mapviewer.services.interfaces.IReactionService;
import lcsb.mapviewer.services.interfaces.IUserService; import lcsb.mapviewer.services.interfaces.IUserService;
...@@ -107,22 +117,26 @@ public class ProjectRestImpl extends BaseRestImpl { ...@@ -107,22 +117,26 @@ public class ProjectRestImpl extends BaseRestImpl {
private ProjectDao projectDao; private ProjectDao projectDao;
private IProjectBackgroundService projectBackgroundService;
private UploadedFileEntryDao uploadedFileEntryDao; private UploadedFileEntryDao uploadedFileEntryDao;
private ServletContext context; private ServletContext context;
public ProjectRestImpl(IProjectService projectService, public ProjectRestImpl(IProjectService projectService,
ProjectDao projectDao, ProjectDao projectDao,
UploadedFileEntryDao uploadedFileEntryDao, UploadedFileEntryDao uploadedFileEntryDao,
IUserService userService, IUserService userService,
MeSHParser meshParser, MeSHParser meshParser,
IElementService elementService, IElementService elementService,
IProjectBackgroundService projectBackgroundService,
IReactionService reactionService, IReactionService reactionService,
ServletContext context) { ServletContext context) {
this.projectService = projectService; this.projectService = projectService;
this.projectDao = projectDao; this.projectDao = projectDao;
this.meshParser = meshParser; this.meshParser = meshParser;
this.userService = userService; this.userService = userService;
this.projectBackgroundService = projectBackgroundService;
this.uploadedFileEntryDao = uploadedFileEntryDao; this.uploadedFileEntryDao = uploadedFileEntryDao;
this.elementService = elementService; this.elementService = elementService;
this.reactionService = reactionService; this.reactionService = reactionService;
...@@ -792,10 +806,8 @@ public class ProjectRestImpl extends BaseRestImpl { ...@@ -792,10 +806,8 @@ public class ProjectRestImpl extends BaseRestImpl {
} }
public List<ProjectBackground> getBackgrounds(String projectId) throws ObjectNotFoundException { public List<ProjectBackground> getBackgrounds(String projectId) throws ObjectNotFoundException {
List<ProjectBackground> result = getProjectByProjectId(projectId).getProjectBackgrounds(); List<ProjectBackground> result = projectBackgroundService.getProjectBackgroundsByProject(getProjectByProjectId(projectId));
for (ProjectBackground projectBackground : result) { result.sort(ProjectBackground.ORDER_COMPARATOR);
Hibernate.initialize(projectBackground.getProjectBackgroundImageLayer());
}
return result; return result;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment