Class LMSAdapterRegistry
java.lang.Object
com.nicholasalfonso.lato.integration.LMSAdapterRegistry
Registry that resolves the correct
LMSAdapter for a given iCalendar feed.-
Constructor Summary
ConstructorsConstructorDescriptionLMSAdapterRegistry(List<LMSAdapter> adapters) Creates the registry from all available LMS adapter beans. -
Method Summary
Modifier and TypeMethodDescriptionresolve(String feedContent, Integration.LMSProvider preferredProvider) Resolves an adapter for the given feed, preferring the specified provider when possible.
-
Constructor Details
-
LMSAdapterRegistry
Creates the registry from all available LMS adapter beans.- Parameters:
adapters- injected list of LMS adapter implementations
-
-
Method Details
-
resolve
Resolves an adapter for the given feed, preferring the specified provider when possible.- Parameters:
feedContent- the raw iCalendar feed contentpreferredProvider- optional preferred LMS provider, ornullto auto-detect- Returns:
- the adapter capable of parsing the feed
- Throws:
org.springframework.web.server.ResponseStatusException- if no adapter supports the feed
-