Roy Golan has posted comments on this change.

Change subject: restapi: Deploy using modules
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/29474/1/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/validation/ValidatorLocator.java
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/validation/ValidatorLocator.java:

Line 22: 
Line 23: import org.ovirt.engine.api.common.util.PackageExplorer;
Line 24: import org.slf4j.Logger;
Line 25: import org.slf4j.LoggerFactory;
Line 26: 
> Not sure, I have to study it, any suggestion?
essentially everywhere we see annotation processing to collect classes, in 
other words the locator pattern we can replace it CDI

every validator could be typed by a Qualifier

@ApplicationScopped @Validator(ofEntitiy=VM)
class VmValidator implements Validator {}

@ApplicationScopped
class HostValidator implements Validator {}


and now

// inject any validator here
@Inject @Any Instance<Validator> validators;
.. { for (Validator v : validators) {...} }
        

// few other options

@Inject VmValidator
//or
@Inject @Validator(ofEntity=VM) Validator
Line 27: public class ValidatorLocator {
Line 28:     /**
Line 29:      * The logger used by this class.
Line 30:      */


-- 
To view, visit http://gerrit.ovirt.org/29474
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie4079277f60e5521d9b61379fa78713a5c4ccc10
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Idan Shaby <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to