Bug 536228 - (RHQ-600) RFE: validation for persistent fields
RFE: validation for persistent fields
Status: NEW
Product: RHQ Project
Classification: Other
Component: Core Server (Show other bugs)
All All
medium Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
: Task
Depends On:
Blocks: jon3
  Show dependency treegraph
Reported: 2008-06-19 10:09 EDT by Heiko W. Rupp
Modified: 2015-02-05 20:19 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Heiko W. Rupp 2008-06-19 10:09:00 EDT
For fields with database constraints, we need to be able to validate them before hitting constraint validation errors in the database (see e.g. RHQ-599 for an example)

15:57:59 < pilhuhn> jshaughn: I recall that you were looking at some validation frameworks in the past - was there any outcome?
15:59:59 < jshaughn> I think you are referring to  Hibernate Validator
16:01:21 < jshaughn> We lookd at this as a potential tool to massage (invalid) data on its way to the db.  But, Validator is not really intended for data manipulation, only strict validation. Meaning, it's purpose is to check a value, and throw exceptions as necessary.
16:01:50 < jshaughn> It is really flexible for that type of work, offering several built-in validators and easy extension.
16:02:14 < pilhuhn> ok
16:02:31 < jshaughn> If integrated into the GUI it can be a nice way of validating user input before it makes it deep into the code.
16:02:54 < pilhuhn> I am asking because of RHQ-599
16:03:57 < jshaughn> I had come up with an annotation-based mechanism for doing data manipulation for entities, but we didn't use it. It was designed to handle things like enforcing max-length and non-null constraints. 
16:05:08 < pilhuhn> Ok, so short term solution would be to do it "by hand"
16:05:24 < pilhuhn> We really need to look into this again for 2.1
16:05:58 < jshaughn> yup :(
16:06:15 < pilhuhn> Do you recall if there is a Jira?
16:06:47 < jshaughn> it was a val-too-long problem that prompted the whole thing I did.  In the end we opted to just increase the field size
16:08:29 < jshaughn> greg wasn't thrilled with adding a home-grown annotation mechanism.  There is no general "validation-mechanism" jira that I know of.
16:09:35 < jshaughn> I think someone said that certain types of constraint handling may be built into the next release of JPA, but I'm not sure
16:10:02 < pilhuhn> I added RHQ-600
16:10:51 < jshaughn> maybe we should clip this convo into a comment
Comment 1 Charles Crouch 2008-06-20 11:24:57 EDT
Would be nice if we could utilize this:
Comment 2 Red Hat Bugzilla 2009-11-10 16:13:01 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-600

Note You need to log in before you can comment on or make changes to this bug.