Skip to content

Commit

Permalink
SHIBUI-521(622) wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dima767 committed Jun 26, 2018
1 parent 551cec5 commit 9bfef72
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
import java.util.List;
import java.util.Optional;

/**
* A facade that aggregates {@link MetadataResolverValidator}s available to call just one of them supporting the type of a given resolver.
* If no {@link MetadataResolverValidator}s are configured, conciders provided MetadataResolver as valid.
* <p>
* Uses chain-of-responsibility design pattern
*
* @author Dmitriy Kopylenko
*/
public class MetadataResolverValidationService<T extends MetadataResolver> {

private List<MetadataResolverValidator> validators;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
package edu.internet2.tier.shibboleth.admin.ui.domain.resolvers;

/**
* An SPI to validate different types of {@link MetadataResolver}s.
* <p>
* Typical usage is - multiple validators for concrete type of resolvers are configured in Spring Application Context,
* aggregated by {@link MetadataResolverValidationService} facade and then that facade is injected into upstream consumers of it
* such as REST controllers, etc.
*
* @author Dmitriy Kopylenko
*/
public interface MetadataResolverValidator<T extends MetadataResolver> {

boolean supports(T resolver);
Expand Down

0 comments on commit 9bfef72

Please sign in to comment.