/** {@inheritDoc} */ public boolean apply(RoleDescriptor input) { if (input == null) { return false; } QName schemaType = input.getSchemaType(); if (schemaType != null && Objects.equals(role, schemaType)) { return true; } return Objects.equals(role, input.getElementQName()); }
/** * Gets the effective name for the role. This is either the element QName for roles defined within the SAML metadata * specification or the element schema type QName for those that are not. * * @param role role to get the effective name for * * @return effective name of the role * * @throws FilterException thrown if the effective role name can not be determined */ protected QName getRoleName(@Nonnull final RoleDescriptor role) throws FilterException { QName roleName = role.getElementQName(); if (extRoleDescriptor.equals(roleName)) { roleName = role.getSchemaType(); if (roleName == null) { throw new FilterException("Role descriptor element was " + extRoleDescriptor + " but did not contain a schema type. This is illegal."); } } return roleName; }
/** {@inheritDoc} */ public boolean apply(@Nullable final Endpoint endpoint) { if (endpoint == null) { return false; } final RoleDescriptor role = (RoleDescriptor) endpoint.getParent(); if (role == null) { return false; } QName roleType = role.getSchemaType(); if (roleType == null) { roleType = role.getElementQName(); } QName endpointType = endpoint.getSchemaType(); if (endpointType == null) { endpointType = endpoint.getElementQName(); } final Set<QName> indexableEndpoints = endpointTypes.get(roleType); if (indexableEndpoints != null && indexableEndpoints.contains(endpointType)) { return true; } return false; }
/** {@inheritDoc} */ @Nullable @NonnullElements @Unmodifiable @NotLive public Set<MetadataIndexKey> generateKeys(@Nonnull EntityDescriptor descriptor) { Constraint.isNotNull(descriptor, "EntityDescriptor was null"); HashSet<MetadataIndexKey> result = new HashSet<>(); for (RoleDescriptor role : descriptor.getRoleDescriptors()) { QName type = role.getSchemaType(); if (type != null) { result.add(new RoleMetadataIndexKey(type)); } else { result.add(new RoleMetadataIndexKey(role.getElementQName())); } } return result; }
List<XMLObject> children = extensions.getUnknownXMLObjects(SourceID.DEFAULT_ELEMENT_NAME); if (children != null && !children.isEmpty()) { QName role = descriptor.getSchemaType() != null ? roleDescriptor.getSchemaType() : roleDescriptor.getElementQName(); log.trace("Processing SourceID extensions for entityID '{}' with role '{}'",
((SSODescriptor)roleDescriptor).getArtifactResolutionServices(); if (arsList != null && !arsList.isEmpty()) { QName role = descriptor.getSchemaType() != null ? roleDescriptor.getSchemaType() : roleDescriptor.getElementQName(); log.trace("Processing ArtifactResolutionService locations for entityID '{}' with role '{}'",
final HashSet<MetadataIndexKey> result = new HashSet<>(); for (final RoleDescriptor role : descriptor.getRoleDescriptors()) { QName roleType = role.getSchemaType(); if (roleType == null) { roleType = role.getElementQName();
peerContext.setRole(roleDescriptor.getSchemaType() != null ? roleDescriptor.getSchemaType() : roleDescriptor.getElementQName());