public class EntityRoleFilter extends Object implements MetadataFilter
| Modifier and Type | Field and Description |
|---|---|
private QName |
extRoleDescriptor
QName of extension role element.
|
private Logger |
log
Class logger.
|
private boolean |
removeEmptyEntitiesDescriptors
Whether to keep entities descriptors that contain no entity descriptors; default value: true.
|
private boolean |
removeRolelessEntityDescriptors
Whether to keep entity descriptors that contain no roles; default value: true.
|
private List<QName> |
roleWhiteList
List of roles that are NOT removed by this filter.
|
| Constructor and Description |
|---|
EntityRoleFilter(List<QName> keptRoles)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.opensaml.core.xml.XMLObject |
filter(org.opensaml.core.xml.XMLObject metadata) |
protected void |
filterEntitiesDescriptor(EntitiesDescriptor descriptor)
Filters entities descriptor.
|
protected void |
filterEntityDescriptor(EntityDescriptor descriptor)
Filters entity descriptor roles.
|
boolean |
getRemoveEmptyEntitiesDescriptors()
Gets whether to remove an entities descriptor if it does not contain any entity descriptor or entities
descriptors.
|
boolean |
getRemoveRolelessEntityDescriptors()
Gets whether to remove an entity descriptor if it does not contain any roles after filtering.
|
protected QName |
getRoleName(RoleDescriptor role)
Gets the effective name for the role.
|
List<QName> |
getRoleWhiteList()
Gets the unmodifiable list of roles that are NOT removed by this filter.
|
void |
setRemoveEmptyEntitiesDescriptors(boolean remove)
Sets whether to remove an entities descriptor if it does not contain any entity descriptor or entities
descriptors.
|
void |
setRemoveRolelessEntityDescriptors(boolean remove)
Sets whether to remove an entity descriptor if it does not contain any roles after filtering.
|
private final Logger log
private boolean removeRolelessEntityDescriptors
private boolean removeEmptyEntitiesDescriptors
private final QName extRoleDescriptor
public List<QName> getRoleWhiteList()
public boolean getRemoveRolelessEntityDescriptors()
public void setRemoveRolelessEntityDescriptors(boolean remove)
remove - whether to remove an entity descriptor if it does not contain any roles after filteringpublic boolean getRemoveEmptyEntitiesDescriptors()
public void setRemoveEmptyEntitiesDescriptors(boolean remove)
remove - whether to remove an entities descriptor if it does not contain any entity descriptor or entities
descriptorspublic org.opensaml.core.xml.XMLObject filter(org.opensaml.core.xml.XMLObject metadata)
throws FilterException
filter in interface MetadataFilterFilterExceptionprotected void filterEntitiesDescriptor(EntitiesDescriptor descriptor) throws FilterException
descriptor - entities descriptor to filterFilterException - thrown if an effective role name can not be determinedprotected void filterEntityDescriptor(EntityDescriptor descriptor) throws FilterException
descriptor - entity descriptor to filterFilterException - thrown if an effective role name can not be determinedprotected QName getRoleName(RoleDescriptor role) throws FilterException
role - role to get the effective name forFilterException - thrown if the effective role name can not be determinedCopyright © 1999–2014. All rights reserved.