- Finish exclusive locking support.
This commit is contained in:
committed by
Paulo Gustavo Veiga
parent
e5e2e86fce
commit
a179875fee
@@ -45,6 +45,11 @@ public class MindmapServiceImpl
|
||||
private NotificationService notificationService;
|
||||
|
||||
private String adminUser;
|
||||
final private LockManager lockManager;
|
||||
|
||||
public MindmapServiceImpl() {
|
||||
this.lockManager = new LockManagerImpl();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermissions(@Nullable User user, int mapId, @NotNull CollaborationRole grantedRole) {
|
||||
@@ -94,6 +99,11 @@ public class MindmapServiceImpl
|
||||
if (mindMap.getTitle() == null || mindMap.getTitle().length() == 0) {
|
||||
throw new WiseMappingException("The tile can not be empty");
|
||||
}
|
||||
|
||||
// Update edition timeout ...
|
||||
final LockManager lockManager = this.getLockManager();
|
||||
lockManager.updateExpirationTimeout(mindMap, Utils.getUser());
|
||||
|
||||
mindmapManager.updateMindmap(mindMap, saveHistory);
|
||||
}
|
||||
|
||||
@@ -264,6 +274,12 @@ public class MindmapServiceImpl
|
||||
mindmapManager.updateCollaboration(collaboration);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public LockManager getLockManager() {
|
||||
return this.lockManager;
|
||||
}
|
||||
|
||||
private Collaboration getCollaborationBy(String email, Set<Collaboration> collaborations) {
|
||||
Collaboration collaboration = null;
|
||||
|
||||
|
Reference in New Issue
Block a user