[wildfly-dev] Management model attribute groups

Brian Stansberry brian.stansberry at redhat.com
Wed Dec 10 09:45:13 EST 2014


On 12/10/14, 8:23 AM, Tomaž Cerar wrote:
>
> On Tue, Dec 9, 2014 at 9:00 PM, Brian Stansberry
> <brian.stansberry at redhat.com <mailto:brian.stansberry at redhat.com>> wrote:
>
>     5) Why would I use an attribute group instead of a child resource?
>
>     Because requiring users to add a child resource just to set a bunch of
>     values that are really part of the config of the parent resource forces
>     them to use a CLI batch to correctly configure the parent resource.
>
>
>
> One thing that I am not sure about this is, how do we do validation for
> things like this?
>
> Simple example would be "required" validation for attribute group.
> You want to enforce few attributes that are part of the group to be
> required.
>
> but on other hand you don't want to enforce them as part of resource:add
> operation.
> as they are only "required" when you are editing / adding attribute group.
>
> With current code we enforce required for all attributes on a resource
> that is being added.
> Which is bit inconvenient for when we have attribute groups and want to
> do it bit differently.
>
> So question is should we support selective validation based on groups or
> not?
>

This sounds more like a complex attribute or a child resource. The 
attributes control a discrete piece of functionality and
you need to be able to turn that on/off as a unit. The attributes are 
required if that functionality is turned on.

>
> --
> tomaz
>


-- 
Brian Stansberry
Senior Principal Software Engineer
JBoss by Red Hat


More information about the wildfly-dev mailing list