feat(ORCID): new service to list external websites where an ORCID exists
1 unresolved thread
Merge request reports
Activity
assigned to @rodn
assigned to @Mathieu.Vonlanthen and unassigned @rodn
31 public class OrcidCheckerFactory { 32 private final static Map<String, Function<String, OrcidWebsiteChecker>> checkerTypes = new HashMap<>(); 33 34 public OrcidCheckerFactory() { 35 OrcidCheckerFactory.addOrcidWebsiteCheckerType("url-exists", baseUrl -> new OrcidUrlChecker(baseUrl)); 36 } 37 38 public OrcidWebsiteChecker getOrcidWebsiteChecker(OrcidWebsite orcidWebsite) { 39 Function<String, OrcidWebsiteChecker> checkerCreator = OrcidCheckerFactory.checkerTypes.get(orcidWebsite.getCheckerType()); 40 if (checkerCreator != null) { 41 return checkerCreator.apply(orcidWebsite.getCheckUrl()); 42 } 43 throw new IllegalArgumentException("No OrcidWebsiteChecker found for type: " + orcidWebsite.getCheckerType()); 44 } 45 46 public static void addOrcidWebsiteCheckerType(String type, Function<String, OrcidWebsiteChecker> checkerCreator) { changed this line in version 2 of the diff
added 1 commit
- ce442423 - add cache automatically evicted every 10min by default
added 6 commits
-
ce442423...cc7c7898 - 2 commits from branch
master
- 67f0ed2e - feat(ORCID): new service to list external websites where an ORCID exists
- bae5a914 - remove factory
- b9ade36e - rename checker type
- e12f7004 - add cache automatically evicted every 10min by default
Toggle commit list-
ce442423...cc7c7898 - 2 commits from branch
Please register or sign in to reply