[
https://issues.apache.org/jira/browse/DAFFODIL-3034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Lawrence resolved DAFFODIL-3034.
--------------------------------------
Resolution: Fixed
Fixed in commit f072b4b18695205181bd0be260063eea0d2da4a4
> Need a public API get to list of available validators
> -----------------------------------------------------
>
> Key: DAFFODIL-3034
> URL: https://issues.apache.org/jira/browse/DAFFODIL-3034
> Project: Daffodil
> Issue Type: Bug
> Components: API
> Reporter: Steve Lawrence
> Priority: Major
> Fix For: 4.0.0
>
>
> I've found an instance of Daffodil API users that used
> ValidationMode.values() to dynamically get the available validation modes.
> This was somewhat limited in that it wouldn't return custom validators, but
> it was still kindof dynamic and useful. But our new Validators class has
> nothing similar--it only has static functions to test if a known validator
> exists or get a validator, but no way to list the available validators.
> We should add a new function (maybe Validators.list()) that returns a List of
> all validators available via SPI.
> This isn't tested, but I think the implementation can be something pretty
> basic like this:
> {code:java}
> public static List<String> list() {
> return new ArrayList<String>(impls.keySet());
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)