Skip to content
Snippets Groups Projects

feat(ORCID): new service to list external websites where an ORCID exists

Merged Nicolas.Rod requested to merge rodn-service-to-list-orcid-external-websites into master
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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) {
  • Nicolas.Rod added 1 commit

    added 1 commit

    Compare with previous version

  • Nicolas.Rod added 1 commit

    added 1 commit

    Compare with previous version

  • Nicolas.Rod added 1 commit

    added 1 commit

    • ce442423 - add cache automatically evicted every 10min by default

    Compare with previous version

  • Nicolas.Rod added 6 commits

    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

    Compare with previous version

  • Please register or sign in to reply
    Loading