Class AbstractNamespacesStrippingStage

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
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
    Modifier and Type
    Field
    Description
    private static final org.slf4j.Logger
    Class logger.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Processes a given Item.
    private void
    Process the attributes on an element.
    private void
    processElement(Element element, int depth)
    Process an individual DOM element.
    protected abstract boolean
    Determine whether a particular namespace should be stripped.

    Methods inherited from class net.shibboleth.metadata.pipeline.AbstractIteratingStage

    doExecute

    Methods inherited from class net.shibboleth.metadata.pipeline.AbstractStage

    execute, getCollectionPredicate, setCollectionPredicate

    Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

    setId

    Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

    doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException

    Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

    checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitialized

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.shibboleth.shared.component.DestructableComponent

    destroy, isDestroyed

    Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

    getId

    Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

    initialize, isInitialized
  • Field Details

    • LOG

      @Nonnull private static final org.slf4j.Logger LOG
      Class logger.
  • Constructor Details

    • AbstractNamespacesStrippingStage

      public AbstractNamespacesStrippingStage()
  • Method Details

    • removingNamespace

      protected abstract boolean removingNamespace(@Nullable String namespace)
      Determine whether a particular namespace should be stripped.
      Parameters:
      namespace - potentially stripped namespace
      Returns:
      true if this namespace should be stripped
    • doExecute

      protected void doExecute(@Nonnull Item<Element> item)
      Description copied from class: AbstractIteratingStage
      Processes a given Item.
      Specified by:
      doExecute in class AbstractIteratingStage<Element>
      Parameters:
      item - Item on which to operate
    • processAttributes

      private void processAttributes(@Nonnull Element element)
      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 - the Element to process
    • processElement

      private void processElement(@Nonnull Element element, int depth)
      Process an individual DOM element.
      Parameters:
      element - element to process
      depth - processing depth, starting with 0 for the document element.