-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Dynamic validatedBy in @Constraint
PostPosted: Mon Feb 29, 2016 4:30 pm 
Newbie

Joined: Mon Feb 29, 2016 4:21 pm
Posts: 1
Imagine following situation...
My project is based on following modules:
-api
-infrastructure
-accessor-query
-accessor-command
-xx-query
-xx-command
-zz-query
-zz-command
-web

each command module is dependend on its query module and also on infrastructure and api modules. I would like to have constraint annotation in api for all of my modules, but separate implementation in each of modules.

so basically my annotation looks like

Code:
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy = {})
public @interface CanNotExists {

    String message() default "com.foo.api.domain.validation.annotation.CanNotExists.message";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}


is it somehow possible to do this? I mean have separate implementations in separate modules (mainy in command modules) for the same interface? If so what is the configuration for this? I'm using spring in my project so if somebody can tell it by spring way it will be welcome.

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.