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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(ICleanupStrategy strategy) Adds acleanup strategy
to thiscomposite pattern
.void
eventOccurred
(com.itextpdf.kernel.pdf.canvas.parser.data.IEventData data, com.itextpdf.kernel.pdf.canvas.parser.EventType type) com.itextpdf.kernel.colors.Color
getRedactionColor
(com.itextpdf.kernel.pdf.canvas.parser.listener.IPdfTextLocation location) Get the color in which redaction is to take placereset()
Returns acleanup strategy
which represents a resetcomposite cleanup strategy
.
-
Constructor Details
-
CompositeCleanupStrategy
public CompositeCleanupStrategy()Creates acomposite pattern
forcleanup strategies
.
-
-
Method Details
-
add
Adds acleanup strategy
to thiscomposite pattern
.- Parameters:
-
strategy
- acleanup strategy
to be added to thiscomposite pattern
.
-
getResultantLocations
- Specified by:
-
getResultantLocations
in 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:
-
getRedactionColor
in 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:
-
eventOccurred
in interfacecom.itextpdf.kernel.pdf.canvas.parser.listener.IEventListener
-
getSupportedEvents
- Specified by:
-
getSupportedEvents
in interfacecom.itextpdf.kernel.pdf.canvas.parser.listener.IEventListener
-
reset
Returns acleanup strategy
which represents a resetcomposite cleanup strategy
.Note that all the inner
strategies
will be reset as well.- Specified by:
-
reset
in interfaceICleanupStrategy
- Returns:
-
a reset
composite strategy
-