mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Add catch ...
This commit is contained in:
parent
a60f001f2c
commit
c12b73c1ff
@ -142,27 +142,35 @@ public class AdminController extends BaseController {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Iterate over the list of maps ...
|
try {
|
||||||
final List<Collaboration> collaborations = mindmapService.findCollaborations(user);
|
// Iterate over the list of maps ...
|
||||||
for (Collaboration collaboration : collaborations) {
|
final List<Collaboration> collaborations = mindmapService.findCollaborations(user);
|
||||||
final Mindmap mindmap = collaboration.getMindMap();
|
for (Collaboration collaboration : collaborations) {
|
||||||
if (MindmapFilter.MY_MAPS.accept(mindmap, user)) {
|
final Mindmap mindmap = collaboration.getMindMap();
|
||||||
|
if (MindmapFilter.MY_MAPS.accept(mindmap, user)) {
|
||||||
|
|
||||||
final Calendar yearAgo = Calendar.getInstance();
|
final Calendar yearAgo = Calendar.getInstance();
|
||||||
yearAgo.add(Calendar.MONTH, -8);
|
yearAgo.add(Calendar.MONTH, -8);
|
||||||
// The use has only two maps... When they have been modified ..
|
// The use has only two maps... When they have been modified ..
|
||||||
System.out.println("Checking map id:" + mindmap.getId());
|
System.out.println("Checking map id:" + mindmap.getId());
|
||||||
if (mindmap.getLastModificationTime().before(yearAgo) && !mindmap.isPublic()) {
|
if (mindmap.getLastModificationTime().before(yearAgo) && !mindmap.isPublic()) {
|
||||||
System.out.println("Old map. Is simple ?:" + mindmap.getId());
|
System.out.println("Old map. Is simple ?:" + mindmap.getId());
|
||||||
|
|
||||||
if (isWelcomeMap(mindmap) || isSimpleMap(mindmap)) {
|
if (isWelcomeMap(mindmap) || isSimpleMap(mindmap)) {
|
||||||
System.out.println("Purged map id:" + mindmap.getId() + ", userId:" + user.getId());
|
System.out.println("Purged map id:" + mindmap.getId() + ", userId:" + user.getId());
|
||||||
if (apply) {
|
if (apply) {
|
||||||
mindmapService.removeMindmap(mindmap, user);
|
mindmapService.removeMindmap(mindmap, user);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
||||||
|
} catch (WiseMappingException e) {
|
||||||
|
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user