Class EmptyContainerStrippingStage

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

@ThreadSafe public class EmptyContainerStrippingStage extends AbstractIteratingStage<Element>
A stage which removes all empty instances of the named container element from DOM metadata.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private String
    Name of the element to strip.
    private String
    Namespace of the element to strip.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Processes a given Item.
    protected void
     
    final String
    Get the name of the element to strip.
    final String
    Get the namespace of the element to strip.
    private boolean
    Determines whether a given DOM element has any element children.
    void
    Set the name of the element to strip.
    void
    Set the namespace of the element to strip.

    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

    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

    • elementNamespace

      @NonnullAfterInit @NotEmpty private String elementNamespace
      Namespace of the element to strip.
    • elementName

      @NonnullAfterInit @NotEmpty private String elementName
      Name of the element to strip.
  • Constructor Details

    • EmptyContainerStrippingStage

      public EmptyContainerStrippingStage()
  • Method Details

    • getElementNamespace

      @Nullable public final String getElementNamespace()
      Get the namespace of the element to strip.
      Returns:
      namespace of the element to strip
    • setElementNamespace

      public void setElementNamespace(@Nonnull @NotEmpty String namespace)
      Set the namespace of the element to strip.
      Parameters:
      namespace - namespace of the element to strip
    • getElementName

      @Nullable public final String getElementName()
      Get the name of the element to strip.
      Returns:
      the name of the element to strip
    • setElementName

      public void setElementName(@Nonnull @NotEmpty String name)
      Set the name of the element to strip.
      Parameters:
      name - the name of the element to strip
    • hasChildElements

      private boolean hasChildElements(@Nonnull Element element)
      Determines whether a given DOM element has any element children.
      Parameters:
      element - Element to check for child elements.
      Returns:
      true if and only if the Element has child elements.
    • 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
    • doInitialize

      protected void doInitialize() throws net.shibboleth.shared.component.ComponentInitializationException
      Overrides:
      doInitialize in class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
      Throws:
      net.shibboleth.shared.component.ComponentInitializationException