[
http://www.stripesframework.org/jira/browse/STS-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Frederic Daoud closed STS-316.
------------------------------
Resolution: Won't Fix
JPA integration does not belong in the Stripes core.
As for pluggable validation, see STS-518.
> Patch: pluggable annotation support for stripes
> -----------------------------------------------
>
> Key: STS-316
> URL: http://www.stripesframework.org/jira/browse/STS-316
> Project: Stripes
> Issue Type: New Feature
> Components: Validation
> Reporter: Ignacio Coloma
> Attachments: jpa-v2.zip, pluggable-annotation-support.zip
>
>
> This is an attempt to give support for JPA annotations from inside Stripes.
> Enclosed is a patch that does the following:
> 1.- Convert the annotation mechanism of stripes to be pluggable, and
> therefore not limited to @Validate and @ValidateNestedProperties. In the line
> of scratching my itch, I have implemented a @ValidateNestedJpaProperties (I
> know the name sucks).
> 2.- There is an AnnotationConverter interface that translates any kind of
> annotation to the internal Stripes representation (ValidationMetadata). For
> example, the tag above will seek the nested attributes and convert standard
> JPA annotations (required, length, etc) into stripes internal representation.
> 3.- These annotation converters are stackable, but I still have to figure the
> desired behaviour. The idea is to allow this kind of situation:
> @ValidateNestedJpaProperties
> @ValidateNestedProperties(<fine tuning here>)
> private PersistentObject instance;
> Where the second annotation would override the first one(for example,
> changing length or required of certain attributes). It is more or less
> implemented, but I still don't have a very clear idea of the expected
> behaviour.
> If this works, annotations would be pluggable: you can give support to
> Hibernate Annotations, JPA annotations, webwork annotations, all inside
> stripes and override certain parts.
> Caveats: configuration is not finished (only provided a default config with
> Validate and ValidateNestedProperties annotations) and haven't checked fully
> if something broke. Some more tests should be implemented, but they are easy.
> Anyways, I wanted to submit this to get some feedback (this is only a
> proposal that might not be accepted). The big size is because I need an ejb3
> jar file to be able to test annotation support.
> Tim, your code is great!! Amazingly easy to understand.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development