Package net.shibboleth.metadata.dom.saml
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
A
Stage capable of assembling a collection of EntityDescriptor elements in
to a single EntitiesDescriptor element.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringName to use for the EntitiesDescriptor.private ItemOrderingStrategy<Element>Strategy used to order a collection of Items.private static final org.slf4j.LoggerClass logger.private static final QNameName of the EntitiesDescriptor's Name attribute.private booleanWhether attempting to turn an empty item collection into anEntitiesDescriptorshould be treated as a processing error. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDescriptorName(Element entitiesDescriptor) Adds the Name attribute to the EntitiesDescriptor.protected voidPerforms the stage processing on the given Item collection.final StringGets the Name used for the generated descriptor.final ItemOrderingStrategy<Element>Gets the strategy used to order a collection of Items.final booleanGets whether attempting to turn an empty item collection, which would result in a schema-invalid childless EntitiesDescriptor, should be treated as processing error.voidsetDescriptorName(String name) Sets the Name used for the generated descriptor.voidsetItemOrderingStrategy(ItemOrderingStrategy<Element> strategy) Sets the strategy used to order a collection of Items.voidsetNoChildrenAProcessingError(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.Methods 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
-
NAME_ATTRIB_NAME
Name of the EntitiesDescriptor's Name attribute. -
LOG
@Nonnull private static final org.slf4j.Logger LOGClass logger. -
noChildrenAProcessingError
private boolean noChildrenAProcessingErrorWhether attempting to turn an empty item collection into anEntitiesDescriptorshould be treated as a processing error.Note that regardless of this setting, a childless
EntitiesDescriptorwill not be produced. It would in any case be schema-invalid.Default value:
true -
itemOrderingStrategy
Strategy used to order a collection of Items. The default strategy performs no ordering. -
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
Gets the strategy used to order a collection of Items.- Returns:
- strategy used to order a collection of Items
-
setItemOrderingStrategy
Sets the strategy used to order a collection of Items.- Parameters:
strategy- strategy used to order a collection of Items
-
getDescriptorName
Gets the Name used for the generated descriptor.- Returns:
- Name used for the generated descriptor, may be null
-
setDescriptorName
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:AbstractStagePerforms 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:
doExecutein classAbstractStage<Element>- Parameters:
items- collection to be processed- Throws:
StageProcessingException- thrown if there is an unrecoverable problem when processing the stage
-
addDescriptorName
Adds the Name attribute to the EntitiesDescriptor. This attribute is added ifdescriptorNameis not null.- Parameters:
entitiesDescriptor- the entity descriptor to which the
-