Steve Lawrence created DAFFODIL-3034:
----------------------------------------

             Summary: 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
             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)

Reply via email to