On 01/27/2012 12:50 PM, Julien Viet wrote:
On Jan 27, 2012, at 10:58 AM, Christophe Laprun wrote:
> On Jan 26, 2012, at 7:51 PM, Julien Viet wrote:
>
>> On Jan 26, 2012, at 6:58 PM, Christophe Laprun wrote:
>>
>>> Hi all,
>>>
>>> I'm currently working on
https://issues.jboss.org/browse/GTNPORTAL-1673
and I'm quite puzzled by the different rules that are in place to validate usernames.
Not only are these rules not consistent across fields which display usernames (some are
validated using UsernameValidator, some are validated using ExpressionValidator) but
I'm also confused about the need to validate read-only fields (which presumably will
only display valid information since it doesn't come from the user, right?). What are
the rules for a valid username and where are they documented? What are the restrictions
and why are they in place?
>>>
>> - Trong should answer those questions when he comes back from the Tet (Vietnam
new year) next monday.
> OK.
>
>>> The second issue is that some of our users (rightly) want to validate user
names according to their own rules instead of arbitrary and opaque rules that we impose on
them for reasons that are entirely too unclear to me and probably to our users. To address
this issue, I need to find a way to dynamically inject validators for some of the fields
based on user-definable configuration. I'm currently thinking about using a service
that would be initialized by the kernel and take its configuration from
${gatein.conf.dir}. Any opposition to this design? Any better idea?
>> 1/ I have no a priori idea about it except that at some point this should use
Bean Validation API. Do you needs require to introduce new Java classes or interfaces
considered as public or is it all declarative ? if yes we should not try to overlap with
what BV provides and try to reuse the whole or a part of the API.
> I was thinking about Bean Validation but there are several issues with this:
> 1. It would mean changing completely the validation architecture of WebUI, which
would be a significant undertaking.
> 2. While we're still stuck with EE 5, this means an added dependency
> 3. I'm not familiar with it yet ;)
you are already talking about serious changes (introducing a new API, a new service, a
new configuration).
our point of view is that we should not take an intermediate path and instead either
1/ we minimize the changes and answer the initial case asked "make UI validation
regular expressions configurable by users" .
Agreed
2/ we make it the proper way avoiding to develop a feature that will
be not thrown away in 6 months.
Not sure what it means, but there are 2 levels:
1 - Can we loose restriction now without taking risks (hard to tell)
2 - Long term thinking
We need to address 1 ASAP.
>> 2/ what is your target with respect to GateIn 3.2 forthcoming release ?
> Target is customer need for EPP 5.2.1 so probably GateIn 3.2 (depending on timing of
the 3.2 release).
GateIn 3.2 has been postponed for months now, we wanted to have a release early Janueary.
How many weeks are we considering to postpone it ?
No postponing
Thomas
>> 3/ you can write a specification to formulate the needs and define a solution
> The ideal solution would probably be using Bean Validation, though, again, I need to
look at it some more. The needs are fairly simple, our customers don't like to be
arbitrarily restricted by what *we* think a username should be, so they want to be able to
change the username validation. This actually extends to other parts of the portal as
Marko as already shown with portal names. Basically, we currently put restrictions on
theses things but:
> 1. theses restrictions are not documented anywhere
> 2. they don't necessarily fit with our users' needs and should therefore be
configurable
In any case I want this to be specified in a document called "specification" in
which we define the functional and technical part.
> Cordialement / Best,
> Chris
>
> ==
> Principal Software Engineer / JBoss Enterprise Middleware Red Hat, Inc.
> Follow GateIn:
http://blog.gatein.org /
http://twitter.com/gatein
> Follow me:
http://metacosm.info/metacosm /
http://twitter.com/metacosm
>
_______________________________________________
gatein-dev mailing list
gatein-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/gatein-dev