/** {@inheritDoc} */ @Override public boolean apply(@Nullable final EntityDescriptor input) { if (input != null) { for (final EntityGroupName group : input.getObjectMetadata().get(EntityGroupName.class)) { if (groupNames.contains(group.getName())) { return true; } } } return false; }
/** * Retrieves validation information from the provided role descriptor. * * @param roleDescriptor the role descriptor from which to resolve information. * @param accumulator accumulator of PKIX validation information to return * @throws ResolverException thrown if the key, certificate, or CRL information is represented in an unsupported * format * */ protected void resolvePKIXInfo(final Collection<PKIXValidationInformation> accumulator, final RoleDescriptor roleDescriptor) throws ResolverException { if (roleDescriptor.getParent() instanceof EntityDescriptor) { final EntityDescriptor entityDescriptor = (EntityDescriptor) roleDescriptor.getParent(); resolvePKIXInfo(accumulator, entityDescriptor.getExtensions()); // These would have been cached on the EntityDescriptor by another mechanism, // for example via pre-processing by the MetadataResolver. final LockableClassToInstanceMultiMap<Object> entityDescriptorObjectMetadata = entityDescriptor.getObjectMetadata(); final ReadWriteLock rwlock = entityDescriptorObjectMetadata.getReadWriteLock(); try { rwlock.readLock().lock(); accumulator.addAll(entityDescriptorObjectMetadata.get(PKIXValidationInformation.class)); } finally { rwlock.readLock().unlock(); } } }
return; entity.getObjectMetadata().put(new AttributesMapContainer<>(maps));
/** * Handle an {@link EntityDescriptor}. * * @param entityDescriptor the entity descriptor being processed * * @throws FilterException if there is a fatal error during processing */ protected void handleEntityDescriptor(final EntityDescriptor entityDescriptor) throws FilterException { XMLObject currentParent = entityDescriptor.getParent(); while (currentParent != null) { if (currentParent instanceof EntitiesDescriptor) { for (final XMLObject keyAuthority : getKeyAuthorities((EntitiesDescriptor) currentParent)) { entityDescriptor.getObjectMetadata().putAll(keyAuthority.getObjectMetadata() .get(PKIXValidationInformation.class)); } } currentParent = currentParent.getParent(); } }