Class CompositeCleanupStrategy
java.lang.Object
com.itextpdf.pdfcleanup.autosweep.CompositeCleanupStrategy
- All Implemented Interfaces:
-
com.itextpdf.kernel.pdf.canvas.parser.listener.IEventListener,com.itextpdf.kernel.pdf.canvas.parser.listener.ILocationExtractionStrategy,ICleanupStrategy
This class is a composite pattern for
ICleanupStrategy. It allows users to have multiple ICleanupStrategy implementations and bundle them as one.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(ICleanupStrategy strategy) Adds acleanup strategyto thiscomposite pattern.voideventOccurred(com.itextpdf.kernel.pdf.canvas.parser.data.IEventData data, com.itextpdf.kernel.pdf.canvas.parser.EventType type) com.itextpdf.kernel.colors.ColorgetRedactionColor(com.itextpdf.kernel.pdf.canvas.parser.listener.IPdfTextLocation location) Get the color in which redaction is to take placereset()Returns acleanup strategywhich represents a resetcomposite cleanup strategy.
-
Constructor Details
-
CompositeCleanupStrategy
public CompositeCleanupStrategy()Creates acomposite patternforcleanup strategies.
-
-
Method Details
-
add
Adds acleanup strategyto thiscomposite pattern.- Parameters:
-
strategy- acleanup strategyto be added to thiscomposite pattern.
-
getResultantLocations
- Specified by:
-
getResultantLocationsin interfacecom.itextpdf.kernel.pdf.canvas.parser.listener.ILocationExtractionStrategy
-
getRedactionColor
public com.itextpdf.kernel.colors.Color getRedactionColor(com.itextpdf.kernel.pdf.canvas.parser.listener.IPdfTextLocation location) Get the color in which redaction is to take place- Specified by:
-
getRedactionColorin interfaceICleanupStrategy - Parameters:
-
location- where to get the redaction color from - Returns:
-
a
Color
-
eventOccurred
public void eventOccurred(com.itextpdf.kernel.pdf.canvas.parser.data.IEventData data, com.itextpdf.kernel.pdf.canvas.parser.EventType type) - Specified by:
-
eventOccurredin interfacecom.itextpdf.kernel.pdf.canvas.parser.listener.IEventListener
-
getSupportedEvents
- Specified by:
-
getSupportedEventsin interfacecom.itextpdf.kernel.pdf.canvas.parser.listener.IEventListener
-
reset
Returns acleanup strategywhich represents a resetcomposite cleanup strategy.Note that all the inner
strategieswill be reset as well.- Specified by:
-
resetin interfaceICleanupStrategy - Returns:
-
a reset
composite strategy
-