@ThreadSafe public abstract class AbstractXSLProcessingStage extends BaseStage<Element>
DOMElementItem collection.
This stage requires the following properties be set prior to initialization:
xslResource| Modifier and Type | Class and Description |
|---|---|
class |
AbstractXSLProcessingStage.StatusInfoAppendingErrorListener
Transformer ErrorListener that sets an ErrorStatus or WarningStatus on its
Item depending on the TransformerException message. |
| Modifier and Type | Field and Description |
|---|---|
private Logger |
log
Class logger.
|
private Map<String,Object> |
transformAttributes
Attributes set on the
Transformer used by this stage. |
private Map<String,Boolean> |
transformFeatures
Features set on the
Transformer used by this stage. |
private Map<String,Object> |
transformParameters
Collection of named parameters to make available to the transform.
|
private URIResolver |
uriResolver
URIResolver to use in the transformer. |
private Resource |
xslResource
Resource that provides the XSL document.
|
private Templates |
xslTemplate
XSL template used to transform Elements.
|
| Constructor and Description |
|---|
AbstractXSLProcessingStage() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doDestroy() |
protected void |
doExecute(Collection<Item<Element>> itemCollection)
Performs the stage processing on the given Item collection.
|
protected void |
doInitialize() |
protected abstract void |
executeTransformer(Transformer transformer,
Collection<Item<Element>> itemCollection)
Executes the XSLT transform on the given collection of Items.
|
Map<String,Object> |
getTransformAttributes()
Gets the unmodifiable collection of attributes used by the XSLT transformer.
|
Map<String,Boolean> |
getTransformFeatures()
Gets the unmodifiable collection of features used by the XSLT transformer.
|
Map<String,Object> |
getTransformParameters()
Gets the unmodifiable collection of parameters used by the XSLT transformer.
|
URIResolver |
getURIResolver()
Gets the
URIResolver set for this transform, if any. |
Resource |
getXSLResource()
Gets the resource that provides the XSL document.
|
void |
setTransformAttributes(Map<String,Object> attributes)
Sets the collection of attributes used by the XSLT transformer.
|
void |
setTransformFeatures(Map<String,Boolean> features)
Sets the collection of features used by the XSLT transformer.
|
void |
setTransformParameters(Map<String,Object> parameters)
Sets the named parameters for the transform.
|
void |
setURIResolver(URIResolver resolver)
Set the
URIResolver for this transform, or null to specify none. |
void |
setXSLResource(Resource resource)
Sets the resource that provides the XSL document.
|
execute, getCollectionPredicate, setCollectionPredicatesetIdgetIddestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, isDestroyedprivate final Logger log
private Resource xslResource
private Templates xslTemplate
private Map<String,Object> transformAttributes
Transformer used by this stage.private Map<String,Boolean> transformFeatures
Transformer used by this stage.private Map<String,Object> transformParameters
@Nullable private URIResolver uriResolver
URIResolver to use in the transformer. Default value: null.@Nullable public Resource getXSLResource()
public void setXSLResource(@Nonnull Resource resource)
resource - resource that provides the XSL document@Nonnull @NonnullElements @Unmodifiable public Map<String,Object> getTransformAttributes()
public void setTransformAttributes(@Nullable@NullableElements Map<String,Object> attributes)
attributes - collection of attributes used by the XSLT transformer, may be null or contain null keys@Nonnull @NonnullElements @Unmodifiable public Map<String,Boolean> getTransformFeatures()
public void setTransformFeatures(@Nullable@NullableElements Map<String,Boolean> features)
features - collection of features used by the XSLT transformer, may be null or contain null keys@Nonnull @NonnullElements @Unmodifiable public Map<String,Object> getTransformParameters()
public void setTransformParameters(@Nullable@NullableElements Map<String,Object> parameters)
parameters - parameters for the transform, may be null or contain null keys@Nullable public URIResolver getURIResolver()
URIResolver set for this transform, if any.URIResolver, or nullpublic void setURIResolver(@Nullable URIResolver resolver)
URIResolver for this transform, or null to specify none.resolver - the URIResolver to use, or nullprotected void doExecute(@Nonnull@NonnullElements Collection<Item<Element>> itemCollection) throws StageProcessingException
The stage is guaranteed to be have been initialized and not destroyed when this is invoked.
doExecute in class BaseStage<Element>itemCollection - collection to be processedStageProcessingException - thrown if there is an unrecoverable problem when processing the stageprotected abstract void executeTransformer(@Nonnull Transformer transformer, @Nonnull@NonnullElements Collection<Item<Element>> itemCollection) throws StageProcessingException, TransformerConfigurationException
transformer - The transform to be applied to each Item. Already has all transformParameters set.itemCollection - the Items to which the transform should be appliedStageProcessingException - thrown if there is a problem applying the transform to ItemsTransformerConfigurationException - thrown if there is a problem with the Transform itselfprotected void doDestroy()
doDestroy in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponentprotected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponentnet.shibboleth.utilities.java.support.component.ComponentInitializationExceptionCopyright © 1999–2016. All rights reserved.