Class ObjectCleaner
java.lang.Object
com.evolveum.midpoint.common.cleanup.ObjectCleaner
Utility class that can be used to process objects and remove unwanted items.
By default, it removes all operational items and all items marked with optionalCleanup.
This behaviour can be configured via
removeAskActionItemsByDefault
and setPaths(List)
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
process
(@NotNull PrismContainer<?> container) Processes object (modifies it) and removes unwanted items.process
(@NotNull PrismContainerValue<?> containerValue) void
setIgnoreNamespaces
(boolean ignoreNamespaces) If set to true, namespaces will be ignored when searching for prism items using customizedCleanupPath
s.void
setListener
(CleanerListener listener) void
setPaths
(List<CleanupPath> paths) void
setRemoveAskActionItemsByDefault
(boolean removeAskActionItemsByDefault) If set to true, items marked with annotation "optionalCleanup" (e.g.void
setRemoveContainerIds
(boolean removeContainerIds)
-
Constructor Details
-
ObjectCleaner
public ObjectCleaner()
-
-
Method Details
-
isRemoveContainerIds
public boolean isRemoveContainerIds() -
setRemoveContainerIds
public void setRemoveContainerIds(boolean removeContainerIds) -
setListener
-
setPaths
-
setRemoveAskActionItemsByDefault
public void setRemoveAskActionItemsByDefault(boolean removeAskActionItemsByDefault) If set to true, items marked with annotation "optionalCleanup" (e.g.Definition.isOptionalCleanup()
is true) will be removed.- Parameters:
removeAskActionItemsByDefault
-
-
setIgnoreNamespaces
public void setIgnoreNamespaces(boolean ignoreNamespaces) If set to true, namespaces will be ignored when searching for prism items using customizedCleanupPath
s.- Parameters:
ignoreNamespaces
-
-
process
Processes object (modifies it) and removes unwanted items. -
process
-