@ThreadSafe public class ContactPersonFilterStage extends BaseIteratingStage<Element>
Note, only the values TECHNICAL, SUPPORT, ADMINISTRATIVE, BILLING, and
OTHER are valid contact person types. Attempting to designate a type other than these will result in that
type being ignored. ContactPerson elements which do not contain the required contactType
attribute are always removed.
To remove all contact persons enable type whitelisting and provide an empty designated type set.
| Modifier and Type | Field and Description |
|---|---|
static String |
ADMINISTRATIVE
'administrative' person type constant.
|
private Set<String> |
allowedTypes
Allowed contact person types.
|
static String |
BILLING
'billing' person type constant.
|
private Set<String> |
designatedTypes
Person types which are white/black listed depending on the value of
whitelistingTypes. |
private Logger |
log
Class logger.
|
static String |
OTHER
'other' person type constant.
|
static String |
SUPPORT
'support' person type constant.
|
static String |
TECHNICAL
'technical' person type constant.
|
private boolean |
whitelistingTypes
Whether
designatedTypes should be considered a whitelist. |
| Constructor and Description |
|---|
ContactPersonFilterStage() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doDestroy() |
protected boolean |
doExecute(Item<Element> item)
Processes a given Item.
|
Collection<String> |
getDesignateTypes()
Gets the list of designated person types.
|
protected boolean |
isRetainedContactPersonType(Element contactPerson)
Check whether the given contact person is designated as a type that is to be retained or not.
|
boolean |
isWhitelistingTypes()
Gets whether the list of designated roles should be considered a whitelist.
|
protected void |
processEntitiesDescriptor(Element entitiesDescriptor)
Iterates over all child EntitiesDescriptor, passing each to
processEntitiesDescriptor(Element), and
EntityDescriptor, passing each to processEntityDescriptor(Element). |
protected void |
processEntityDescriptor(Element entityDescriptor)
Processes an EntityDescriptor by removing any ContactPerson that is within it.
|
void |
setDesignatedTypes(Collection<String> types)
Sets the list of designated entity roles.
|
void |
setWhitelistingTypes(boolean whitelisting)
Sets whether the list of designated roles should be considered a whitelist.
|
doExecuteexecute, getCollectionPredicate, setCollectionPredicatesetIddoInitialize, getIddestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, isDestroyedpublic static final String TECHNICAL
public static final String SUPPORT
public static final String ADMINISTRATIVE
public static final String BILLING
public static final String OTHER
private final Logger log
private Set<String> designatedTypes
whitelistingTypes.private boolean whitelistingTypes
designatedTypes should be considered a whitelist. Default value: true@Nonnull @NonnullElements @Unmodifiable public Collection<String> getDesignateTypes()
public void setDesignatedTypes(@Nullable@NullableElements Collection<String> types)
types - list of designated entity rolespublic boolean isWhitelistingTypes()
public void setWhitelistingTypes(boolean whitelisting)
whitelisting - true if the designated entities should be considered a whitelist, false otherwiseprotected boolean doExecute(@Nonnull Item<Element> item) throws StageProcessingException
doExecute in class BaseIteratingStage<Element>item - Item on which to operateStageProcessingException - thrown if there is a problem with the stage processingprotected void processEntitiesDescriptor(@Nonnull Element entitiesDescriptor)
processEntitiesDescriptor(Element), and
EntityDescriptor, passing each to processEntityDescriptor(Element).entitiesDescriptor - EntitiesDescriptor being processedprotected void processEntityDescriptor(@Nonnull Element entityDescriptor)
entityDescriptor - entity descriptor being processedprotected boolean isRetainedContactPersonType(@Nonnull Element contactPerson)
contactPerson - the contact personprotected void doDestroy()
doDestroy in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponentCopyright © 1999–2016. All rights reserved.