Community
Participate
Working Groups
AbstractModelConstraints are fairly heavy-weight objects, and sometimes it makes sense (esp. in large constraint libraries) to group related constraints into a single class to reduce the number of classes that need to be loaded and to localize functionally related code. This can currently be done by assigning multiple constraint IDs to the same constraint class, and invoking different rules according to the 'current constraint ID' indicated by the validation context. However, there are also cases in which violation of a single (logical) constraint has multiple different manifestations, which need to be reported individually from a single invocation of the constraint. For this purpose, it should be very straight-forward to permit a constraint to return a MultiStatus of IConstraintStatus objects, each with (potentially) a different severity, message, target, and constraint locus. Suitable API should be provided to enable clients to create IConstraintStatuses for composition into a MultiStatus.
Est.: .5w
Committed the fix to HEAD. Look for new factory methods on the ConstraintStatus class to create additional statuses and to aggregate multiple results into a multi-status. A multi-status nested to any depth can now be returned from the validate() method of a constraint. It is recommended to use the multi-status created by the factory method because it implements the IConstraintStatus API.
Move to verified as per bug 206558.