Class EntitiesDescriptorAssemblerStage

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.metadata.pipeline.AbstractStage<Element>
net.shibboleth.metadata.dom.saml.EntitiesDescriptorAssemblerStage
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 EntitiesDescriptorAssemblerStage extends AbstractStage<Element>
A Stage capable of assembling a collection of EntityDescriptor elements in to a single EntitiesDescriptor element.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private String
    Name to use for the EntitiesDescriptor.
    Strategy used to order a collection of Items.
    private static final org.slf4j.Logger
    Class logger.
    private static final QName
    Name of the EntitiesDescriptor's Name attribute.
    private boolean
    Whether attempting to turn an empty item collection into an EntitiesDescriptor should be treated as a processing error.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addDescriptorName(Element entitiesDescriptor)
    Adds the Name attribute to the EntitiesDescriptor.
    protected void
    Performs the stage processing on the given Item collection.
    final String
    Gets the Name used for the generated descriptor.
    Gets the strategy used to order a collection of Items.
    final boolean
    Gets whether attempting to turn an empty item collection, which would result in a schema-invalid childless EntitiesDescriptor, should be treated as processing error.
    void
    Sets the Name used for the generated descriptor.
    void
    Sets the strategy used to order a collection of Items.
    void
    Sets whether attempting to turn an empty item collection, which would result in a schema-invalid childless EntitiesDescriptor, should be treated as processing error.

    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

    • NAME_ATTRIB_NAME

      @Nonnull private static final QName NAME_ATTRIB_NAME
      Name of the EntitiesDescriptor's Name attribute.
    • LOG

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

      private boolean noChildrenAProcessingError
      Whether attempting to turn an empty item collection into an EntitiesDescriptor should be treated as a processing error.

      Note that regardless of this setting, a childless EntitiesDescriptor will not be produced. It would in any case be schema-invalid.

      Default value: true

    • itemOrderingStrategy

      @Nonnull private ItemOrderingStrategy<Element> itemOrderingStrategy
      Strategy used to order a collection of Items. The default strategy performs no ordering.
    • descriptorName

      @Nullable private String descriptorName
      Name to use for the EntitiesDescriptor.
  • Constructor Details

    • EntitiesDescriptorAssemblerStage

      public EntitiesDescriptorAssemblerStage()
  • Method Details

    • isNoChildrenAProcessingError

      public final boolean isNoChildrenAProcessingError()
      Gets whether attempting to turn an empty item collection, which would result in a schema-invalid childless EntitiesDescriptor, should be treated as processing error.
      Returns:
      whether attempting to process an empty item collection should be treated as processing error
    • setNoChildrenAProcessingError

      public void setNoChildrenAProcessingError(boolean isError)
      Sets whether attempting to turn an empty item collection, which would result in a schema-invalid childless EntitiesDescriptor, should be treated as processing error.
      Parameters:
      isError - whether attempting to process an empty item collection should be treated as processing error
    • getItemOrderingStrategy

      @Nonnull public final ItemOrderingStrategy<Element> getItemOrderingStrategy()
      Gets the strategy used to order a collection of Items.
      Returns:
      strategy used to order a collection of Items
    • setItemOrderingStrategy

      public void setItemOrderingStrategy(@Nonnull ItemOrderingStrategy<Element> strategy)
      Sets the strategy used to order a collection of Items.
      Parameters:
      strategy - strategy used to order a collection of Items
    • getDescriptorName

      @Nullable public final String getDescriptorName()
      Gets the Name used for the generated descriptor.
      Returns:
      Name used for the generated descriptor, may be null
    • setDescriptorName

      public void setDescriptorName(@Nullable String name)
      Sets the Name used for the generated descriptor.
      Parameters:
      name - Name used for the generated descriptor
    • doExecute

      protected void doExecute(@Nonnull @NonnullElements List<Item<Element>> items) throws StageProcessingException
      Description copied from class: AbstractStage
      Performs the stage processing on the given Item collection.

      The stage is guaranteed to be have been initialized and not destroyed when this is invoked.

      Specified by:
      doExecute in class AbstractStage<Element>
      Parameters:
      items - collection to be processed
      Throws:
      StageProcessingException - thrown if there is an unrecoverable problem when processing the stage
    • addDescriptorName

      protected void addDescriptorName(@Nonnull Element entitiesDescriptor)
      Adds the Name attribute to the EntitiesDescriptor. This attribute is added if descriptorName is not null.
      Parameters:
      entitiesDescriptor - the entity descriptor to which the