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

Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from org.turro.cleanup.AbstractCleanup
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 35 of file CommonsCleanup.java.

Member Function Documentation

◆ cleanEntity()

void org.turro.cleanup.CommonsCleanup.cleanEntity ( Object  entity,
CleanupMode  mode 
)

Implements org.turro.cleanup.IElephantCleanup.

Definition at line 43 of file CommonsCleanup.java.

43  {
44 
45  }

◆ cleanFromCommons()

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

Reimplemented from org.turro.cleanup.AbstractCleanup.

Definition at line 48 of file CommonsCleanup.java.

48  {
49  if(commons.contains(Commons.TAGS)) {
50  CleanupAction.from("Removing tags...",
51  () -> Tags.removeTags(entityPath))
52  .execute(getConsole(), mode);
53  }
54  if(commons.contains(Commons.SKILLS)) {
55  CleanupAction.from("Removing skills...",
56  () -> Skills.removeSkills(entityPath))
57  .execute(getConsole(), mode);
58  }
59  if(commons.contains(Commons.PARTICIPATIONS)) {
60  CleanupAction.from("Removing participations...",
61  () -> ParticipationInfo.cleanup(entityPath))
62  .execute(getConsole(), mode);
63  }
64  if(commons.contains(Commons.RELATED)) {
65  CleanupAction.from("Removing related...",
66  () -> Relateds.empty().removeAny(entityPath))
67  .execute(getConsole(), mode);
68  }
69  if(commons.contains(Commons.LOGS)) {
70  CleanupAction.from("Removing log information...",
71  () -> SystemLogger.cleanup(entityPath))
72  .execute(getConsole(), mode);
73  }
74  }
Here is the call graph for this function:

◆ isMine()

boolean org.turro.cleanup.CommonsCleanup.isMine ( Object  entity)

Implements org.turro.cleanup.IElephantCleanup.

Definition at line 38 of file CommonsCleanup.java.

38  {
39  return false;
40  }

◆ pathsForRoot()

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

Reimplemented from org.turro.cleanup.AbstractCleanup.

Definition at line 77 of file CommonsCleanup.java.

77  {
78  return switch (common) {
79  case TAGS -> Tags.getAllPaths(root);
80  case SKILLS -> Skills.getAllPaths(root);
81  case PARTICIPATIONS -> ParticipationInfo.getAllPaths(root);
82  case RELATED -> Relateds.getAllPaths(root);
83  case LOGS -> SystemLogModel.getAllPaths(root);
84  default -> Collections.EMPTY_SET;
85  };
86  }
Here is the call graph for this function:

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