public class EntityRoleFilter extends Object implements MetadataFilter
Constructor and Description |
---|
EntityRoleFilter(List<QName> keptRoles)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
doFilter(XMLObject metadata)
Filters the given metadata, perhaps to remove elements that are not wanted.
|
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.
|
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 void doFilter(XMLObject metadata) throws FilterException
doFilter
in interface MetadataFilter
metadata
- the metadata to be filtered.FilterException
- thrown if an error occurs during the filtering processprotected 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 © 2018 JBoss by Red Hat. All rights reserved.