Class WorkerContextImpl
java.lang.Object
com.itextpdf.tool.xml.pipeline.ctx.WorkerContextImpl
- All Implemented Interfaces:
WorkerContext
The global WorkerContext, a storage for CustomContexts. It extends
MapContext
but overrides the MapContext methods to throw
NotImplementedException
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
put
(String key, CustomContext context) Convenience method.void
setCurrentTag
(Tag t) Contains the current tag.
-
Field Details
-
mc
-
tag
-
-
Constructor Details
-
WorkerContextImpl
public WorkerContextImpl()
-
-
Method Details
-
get
- Specified by:
get
in interfaceWorkerContext
- Parameters:
klass
- the key to find the custom context for. (internally itextpdf.com uses the pipelines fully qualified klassName, so when you want to use our pipelines twice in the same 'line' you have to override it to change the key used)- Returns:
- a CustomContext for the given Class.
- Throws:
NoCustomContextException
- if no CustomContext is found.
-
put
Convenience method.- Specified by:
put
in interfaceWorkerContext
- Parameters:
key
- the key to store the CustomContext for.context
- the CustomContext to store.
-
setCurrentTag
Description copied from interface:WorkerContext
Contains the current tag.- Specified by:
setCurrentTag
in interfaceWorkerContext
- Parameters:
t
- the Tag
-
getCurrentTag
- Specified by:
getCurrentTag
in interfaceWorkerContext
- Returns:
- the current tag
-