Package net.shibboleth.metadata.dom
Class NamespacesStrippingStage
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
net.shibboleth.metadata.dom.NamespacesStrippingStage
- 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 which removes all evidence of a given collection of XML namespaces from each metadata item.
The stage can operate either to remove (the default) or keep the designated namespaces.
Elements, attributes and namespace prefix definitions associated with a given namespace will be removed
or retained depending on the keeping property.
Attributes without an explicit namespace prefix will never be removed by this stage.
Note that because the collection is specified as @NonnullElements, this stage can not
be used in removing mode to remove elements in the default namespace. It will always remove
elements in the default namespace if used in the keeping mode.
- Since:
- 0.9.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanWhether we are keeping (true) or removing (false).Designated XML namespaces to process. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Collection<String>Gets the collection of designated namespaces.final booleanIndicate whether the stage is keeping the designated namespaces or removing them (the default).protected booleanremovingNamespace(String namespace) Determine whether a particular namespace should be stripped.voidsetKeeping(boolean keep) Set whether the stage is whether the stage is keeping the designated namespaces or removing them (the default).voidsetNamespaces(Collection<String> nss) Sets the collection of designated namespaces.Methods inherited from class net.shibboleth.metadata.dom.AbstractNamespacesStrippingStage
doExecuteMethods 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
-
namespaces
Designated XML namespaces to process. -
keeping
private boolean keepingWhether we are keeping (true) or removing (false). Default: removing (false).
-
-
Constructor Details
-
NamespacesStrippingStage
public NamespacesStrippingStage()
-
-
Method Details
-
getNamespaces
Gets the collection of designated namespaces.- Returns:
- collection of designated namespaces
-
setNamespaces
Sets the collection of designated namespaces.- Parameters:
nss- collection of designated namespaces
-
isKeeping
public final boolean isKeeping()Indicate whether the stage is keeping the designated namespaces or removing them (the default).- Returns:
trueif keeping,falsefor removing (the default)- Since:
- 0.10.0
-
setKeeping
public void setKeeping(boolean keep) Set whether the stage is whether the stage is keeping the designated namespaces or removing them (the default).- Parameters:
keep-trueif keeping,falsefor removing (the default)- Since:
- 0.10.0
-
removingNamespace
Description copied from class:AbstractNamespacesStrippingStageDetermine whether a particular namespace should be stripped.- Specified by:
removingNamespacein classAbstractNamespacesStrippingStage- Parameters:
namespace- potentially stripped namespace- Returns:
trueif this namespace should be stripped
-