19 package org.turro.cleanup;
21 import java.util.List;
23 import java.util.stream.Collectors;
24 import org.turro.log.WebLoggers;
25 import org.turro.path.Path;
26 import org.turro.reflection.Instances;
36 .stream().filter(cleanup -> cleanup.isMine(entity))
37 .peek(cleanup -> cleanup.setConsole(console)).toList();
42 .stream().filter(cleanup -> cleanup.isMine(entity))
44 cleanup.setConsole(console);
45 cleanup.cleanEntity(entity, mode);
50 if(Path.pathFrom(entityPath).getSize() != 2)
return;
55 cleanup.setConsole(console);
56 cleanup.cleanFromCommons(entityPath, mode, commons);
63 .stream().forEach(cleanup -> {
65 cleanup.cleanOrphans();
72 .stream().flatMap(cleanup -> cleanup.pathsForRoot(root, common).stream())
73 .collect(Collectors.toSet());
static List< IElephantCleanup > getFor(Object entity, ICleanupConsole console)
static void executeForEntity(Object entity, ICleanupConsole console, CleanupMode mode)
static void executeForCommons(String entityPath, ICleanupConsole console, CleanupMode mode, Set< IElephantCleanup.Commons > commons)
static Set< String > getEntityPathsFor(String root, IElephantCleanup.Commons common)
static WebLoggers info(Object entity)