0 Replies Latest reply on May 20, 2008 10:42 AM by Ales Justin

    Bean validation

    Ales Justin Master

      Regarding this JIRA issue:
      - http://jira.jboss.com/jira/browse/JBMICROCONT-277

      I've added this

       * Get bean validator bridge.
       * @param context the owner context
       * @return bean validator instance if exists, null otherwise
       static BeanValidatorBridge getBeanValidatorBridge(KernelControllerContext context)
       Controller controller = context.getController();
       ControllerContext validator = controller.getInstalledContext(BeanValidatorBridge.class);
       return validator != null ? BeanValidatorBridge.class.cast(validator.getTarget()) : null;

      a way to get the bridge between jsr303 and our MC code.

      I've then added hooks into
      - InstantiateAction (constructor and instantiation validation)
      - PropertyDispatchWrapper (property injection)
      - AbstractKernelControllerContext (method invocation)

      Once I'm (+ hopefully getting Emmanuel to chip in) done with jsr303, I'll implement a proper bridge, which we can simply drop into Controller.