Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assay: resolve a single provider/protocol before creating protocol schema #6057

Merged
merged 4 commits into from
Nov 15, 2024

Conversation

labkey-nicka
Copy link
Contributor

@labkey-nicka labkey-nicka commented Nov 15, 2024

Rationale

When attempting to resolve a TableInfo from a Domain for the AssayDomainKind we currently iterate over all the assay definitions in a container and for each provider we call provider.createProtocolSchema() and then hydrate full TableInfo instances until we find a match.

This refactors the approach to first resolve the singularly desired provider and only induce the provider.createProtocolSchema() call for that provider to then resolve the TableInfo.

Related Pull Requests

Changes

  • Refactor away AssayManager.getTableInfoForDomainId() by directly resolving the assay protocol/provider in AssayDomainKind.getTableInfo() and then instantiating a new schema for only that assay.
  • Separate AbstractAssayProvider.getDomains() into getDomains() and getDomainsAndDefaultValues() to make getDomains() more clear in its role and what it will return (i.e. a List<Domain> rather than a List<Pair<Domain, Map<DomainProperty, Object>>>)
  • Update assay-assayList.api matching on protocol "name" and provider "type" to be case-insensitive.
  • Add null checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants