Package net.shibboleth.metadata.dom
Class AbstractNamespacesStrippingStage
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.metadata.pipeline.AbstractStage<T>
net.shibboleth.metadata.pipeline.AbstractIteratingStage<Element>
net.shibboleth.metadata.dom.AbstractNamespacesStrippingStage
- All Implemented Interfaces:
Stage<Element>,net.shibboleth.shared.component.Component,net.shibboleth.shared.component.DestructableComponent,net.shibboleth.shared.component.IdentifiableComponent,net.shibboleth.shared.component.IdentifiedComponent,net.shibboleth.shared.component.InitializableComponent
- Direct Known Subclasses:
NamespacesStrippingStage,NamespaceStrippingStage
@ThreadSafe
public abstract class AbstractNamespacesStrippingStage
extends AbstractIteratingStage<Element>
An abstract stage which removes all evidence of given XML namespaces from each metadata item.
Determining the affected namespaces is delegated to subclasses. Elements, attributes and
namespace prefix definitions associated with a given namespace will be removed
or retained as determined by the
removingNamespace(java.lang.String) function.
Attributes without an explicit namespace prefix will never be removed.- Since:
- 0.9.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidProcesses a givenItem.private voidprocessAttributes(Element element) Process the attributes on an element.private voidprocessElement(Element element, int depth) Process an individual DOM element.protected abstract booleanremovingNamespace(String namespace) Determine whether a particular namespace should be stripped.Methods inherited from class net.shibboleth.metadata.pipeline.AbstractIteratingStage
doExecuteMethods inherited from class net.shibboleth.metadata.pipeline.AbstractStage
execute, getCollectionPredicate, setCollectionPredicateMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getIdMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
LOG
@Nonnull private static final org.slf4j.Logger LOGClass logger.
-
-
Constructor Details
-
AbstractNamespacesStrippingStage
public AbstractNamespacesStrippingStage()
-
-
Method Details
-
removingNamespace
Determine whether a particular namespace should be stripped.- Parameters:
namespace- potentially stripped namespace- Returns:
trueif this namespace should be stripped
-
doExecute
Description copied from class:AbstractIteratingStageProcesses a givenItem.- Specified by:
doExecutein classAbstractIteratingStage<Element>- Parameters:
item-Itemon which to operate
-
processAttributes
Process the attributes on an element. Assumes that the element itself does not reside in the target namespace, and that all child elements have already been processed.- Parameters:
element- theElementto process
-
processElement
Process an individual DOM element.- Parameters:
element- element to processdepth- processing depth, starting with 0 for the document element.
-