iay / mdq-server

Metadata Query Protocol server implementation using Shibboleth MDA
6 stars 6 forks source link

use @Duration and converters on period configuration parameters #19

Closed iay closed 9 years ago

iay commented 10 years ago

At present, there are a couple of duration parameters expressed in terms of longs representing milliseconds, for example MetadataService.refreshInterval, which might be initialised with "3600000". This is rather inconvenient and it would be much nicer to be able to say "P1H" in ISO8601 notation.

We can do this if we use the Shibboleth @Duration annotation on the bean definition and an appropriate conversionService definition imported from idp-conf.

iay commented 9 years ago

As well as @Duration, we should probably use @NonNegative or @Positive as appropriate.