From: Anthony E. <me...@an...> - 2002-03-27 20:13:45
|
> -----Original Message----- > From: Nick Bauman [mailto:ni...@co...] > Sent: Wednesday, March 27, 2002 2:38 PM > To: me...@an... > Subject: RE: [FormProc-developer] Changes for Localization support > > > > > > > >> -----Original Message----- > >> From: Nick Bauman [mailto:ni...@co...] > >> Sent: Wednesday, March 27, 2002 2:06 PM > >> To: me...@an... > >> Subject: Re: [FormProc-developer] Changes for Localization support > >> > >> > >> Anthony, > >> > >> I did the Locale thing in Integradata a while back. What made you > >> think of it / want to do it now? > > > > A desire to solidify the API prior to going to version 1.0. > > That seems vague. OK, how about this: I am responding to developer needs. The choice to do it now rather than later is because I want to lock in the API before 1.0. Is that less vague? > > > BTW - Does this mean that the Rule interface should be changed to the > > folowing: > > > > public RuleResult validate(Object value, Locale locale); > > I think that's how I have it. > > http://www.cortexity.com/cgi- > py/viewcvs.cgi/integradata/src/com/cortexity/integradata/rules/Rule.java? > rev=1.9&content-type=text/vnd.viewcvs-markup > > I see it as an Integradata Rule to FormProc is just another Validator. I have modified the CVS to reflect the Rule interface change. > >> > >> > Greetings all, > >> > > >> > I have just checked in some changes to the CVS server which modify > >> > the Validator and Storer interfaces so that validate() and store() > >> > methods now include a Locale object. If you have written any > >> > Validator or Storer implementations in Java then they will need to > >> > be modified to support this change. I have already modified all of > >> > the built in validators to handle this change. > >> > > >> > I am trying to get all of these API-breaking changes in prior to > >> > going to 1.0. The next release will be a 1.0 beta release, so get > >> > your changes in now if you think that it will break the API. > >> > > >> > In addition to the change above, the ValidationResult class now > >> > includes a getLocale() method which returns the Locale which was > >> > used during the validation. Right now the > >> > ValidationResult.getErrorMessage() method uses the value of > >> > Locale.getDefault() if you do not specify the Locale as an argument > >> > to the getErrorMessage() method. Do you think this should be > >> > changed so it uses the locale used during validation and then falls > >> > back to the Locale.getDefault() as a last resort? The > >> > getErrorMessage(Locale > >> > >> > >> Yes, always. I have no idea why you'd want it any other way. > > > > It was the other way before because the VaidatorResult did not know the > > Locale which was used during validation because that information was > > not being passed to the validator. I have modified the CVS for this change as well. Sincerely, Anthony Eden |