BrightSide Workbench Full Report + Source Code
org.turro.cleanup.AbstractCleanup Class Referenceabstract
Inheritance diagram for org.turro.cleanup.AbstractCleanup:
Collaboration diagram for org.turro.cleanup.AbstractCleanup:

Public Member Functions

void setConsole (ICleanupConsole console)
 
void cleanOrphans ()
 
void cleanFromCommons (String entityPath, CleanupMode mode, Set< Commons > commons)
 
Set< String > pathsForRoot (String root, Commons common)
 
- Public Member Functions inherited from org.turro.cleanup.IElephantCleanup
boolean isMine (Object entity)
 
void cleanEntity (Object entity, CleanupMode mode)
 

Protected Member Functions

ICleanupConsole getConsole ()
 
Set< String > getOrphans (Set< String > entities, Set< String > mapped)
 
void cleanOrphansFor (String root, Set< String > entities)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 33 of file AbstractCleanup.java.

Member Function Documentation

◆ cleanFromCommons()

void org.turro.cleanup.AbstractCleanup.cleanFromCommons ( String  entityPath,
CleanupMode  mode,
Set< Commons >  commons 
)

Implements org.turro.cleanup.IElephantCleanup.

Reimplemented in org.turro.cleanup.CommonsCleanup, and org.turro.cleanup.AttachmentCleanup.

Definition at line 51 of file AbstractCleanup.java.

51  {
52  }

◆ cleanOrphans()

◆ cleanOrphansFor()

void org.turro.cleanup.AbstractCleanup.cleanOrphansFor ( String  root,
Set< String >  entities 
)
protected

Definition at line 64 of file AbstractCleanup.java.

64  {
65  if(!entities.isEmpty()) {
66  for(Commons common : Commons.values()) {
67  Set<String> mapped = Cleanup.getEntityPathsFor(root, common);
68  getOrphans(entities, mapped).forEach(entityPath -> {
69 // System.out.print(common);
70 // System.out.println(entityPath);
71  Cleanup.executeForCommons(entityPath, null, CleanupMode.ONLY_EXECUTE, Set.of(common));
72  });
73  }
74  }
75  }
Set< String > getOrphans(Set< String > entities, Set< String > mapped)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getConsole()

ICleanupConsole org.turro.cleanup.AbstractCleanup.getConsole ( )
protected

Definition at line 42 of file AbstractCleanup.java.

42  {
43  return console;
44  }
Here is the caller graph for this function:

◆ getOrphans()

Set<String> org.turro.cleanup.AbstractCleanup.getOrphans ( Set< String >  entities,
Set< String >  mapped 
)
protected

Definition at line 59 of file AbstractCleanup.java.

59  {
60  mapped.removeAll(entities);
61  return mapped;
62  }
Here is the caller graph for this function:

◆ pathsForRoot()

Set<String> org.turro.cleanup.AbstractCleanup.pathsForRoot ( String  root,
Commons  common 
)

Implements org.turro.cleanup.IElephantCleanup.

Reimplemented in org.turro.cleanup.CommonsCleanup, and org.turro.cleanup.AttachmentCleanup.

Definition at line 55 of file AbstractCleanup.java.

55  {
56  return Collections.EMPTY_SET;
57  }

◆ setConsole()

void org.turro.cleanup.AbstractCleanup.setConsole ( ICleanupConsole  console)

Implements org.turro.cleanup.IElephantCleanup.

Definition at line 38 of file AbstractCleanup.java.

38  {
39  this.console = console;
40  }

The documentation for this class was generated from the following file: