Return-Path: X-Original-To: apmail-onami-commits-archive@minotaur.apache.org Delivered-To: apmail-onami-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4878CE9F0 for ; Wed, 30 Jan 2013 21:40:37 +0000 (UTC) Received: (qmail 80667 invoked by uid 500); 30 Jan 2013 21:40:37 -0000 Delivered-To: apmail-onami-commits-archive@onami.apache.org Received: (qmail 80636 invoked by uid 500); 30 Jan 2013 21:40:37 -0000 Mailing-List: contact commits-help@onami.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@onami.incubator.apache.org Delivered-To: mailing list commits@onami.incubator.apache.org Received: (qmail 80628 invoked by uid 99); 30 Jan 2013 21:40:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 21:40:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 21:40:32 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 8DF7B2388BA6; Wed, 30 Jan 2013 21:39:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1440690 [8/15] - in /incubator/onami/site/validation: ./ apidocs/ apidocs/assets/ apidocs/assets/images/ apidocs/reference/ apidocs/reference/org/ apidocs/reference/org/apache/ apidocs/reference/org/apache/onami/ apidocs/reference/org/apac... Date: Wed, 30 Jan 2013 21:39:44 -0000 To: commits@onami.incubator.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130130213949.8DF7B2388BA6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidateMethodInterceptor.html URL: http://svn.apache.org/viewvc/incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidateMethodInterceptor.html?rev=1440690&view=auto ============================================================================== --- incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidateMethodInterceptor.html (added) +++ incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidateMethodInterceptor.html Wed Jan 30 21:39:40 2013 @@ -0,0 +1,370 @@ + + + + +Coverage Report + + + + +
Coverage Report - org.apache.onami.validation.ValidateMethodInterceptor
+
 
+ + + + +
Classes in this File Line Coverage Branch Coverage Complexity
ValidateMethodInterceptor
75%
36/48
66%
12/18
4.5
+
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 1  
 package org.apache.onami.validation;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  *   http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 
 22  
 import java.lang.reflect.Constructor;
 23  
 import java.lang.reflect.Method;
 24  
 import java.util.Arrays;
 25  
 import java.util.HashSet;
 26  
 import java.util.Set;
 27  
 
 28  
 import javax.inject.Inject;
 29  
 import javax.validation.ConstraintViolation;
 30  
 import javax.validation.ConstraintViolationException;
 31  
 import javax.validation.Validator;
 32  
 import javax.validation.ValidatorFactory;
 33  
 
 34  
 import org.aopalliance.intercept.MethodInterceptor;
 35  
 import org.aopalliance.intercept.MethodInvocation;
 36  
 import org.apache.bval.jsr303.extensions.MethodValidator;
 37  
 
 38  
 /**
 39  
  * Method interceptor for {@link Validate} annotation.
 40  
  */
 41  4
 public final class ValidateMethodInterceptor
 42  
     implements MethodInterceptor
 43  
 {
 44  
 
 45  1
     private static final Class<?>[] CAUSE_TYPES = new Class[] { Throwable.class };
 46  
 
 47  1
     private static final Class<?>[] MESSAGE_CAUSE_TYPES = new Class[] { String.class, Throwable.class };
 48  
 
 49  
     /**
 50  
      * The {@link ValidatorFactory} reference.
 51  
      */
 52  
     @Inject
 53  
     private ValidatorFactory validatorFactory;
 54  
 
 55  
     /**
 56  
      * Sets the {@link ValidatorFactory} reference.
 57  
      *
 58  
      * @param validatorFactory the {@link ValidatorFactory} reference
 59  
      */
 60  
     public void setValidatorFactory( ValidatorFactory validatorFactory )
 61  
     {
 62  0
         this.validatorFactory = validatorFactory;
 63  0
     }
 64  
 
 65  
     /**
 66  
      * {@inheritDoc}
 67  
      */
 68  
     public Object invoke( MethodInvocation invocation )
 69  
         throws Throwable
 70  
     {
 71  3
         Validate validate = invocation.getMethod().getAnnotation( Validate.class );
 72  
 
 73  3
         Validator validator = validatorFactory.getValidator();
 74  3
         MethodValidator methodValidator = validator.unwrap( MethodValidator.class );
 75  
 
 76  3
         Set<ConstraintViolation<?>> constraintViolations = new HashSet<ConstraintViolation<?>>();
 77  3
         Class<?> clazz = invocation.getMethod().getDeclaringClass();
 78  3
         Method method = invocation.getMethod();
 79  3
         Object[] arguments = invocation.getArguments();
 80  3
         Class<?>[] groups = validate.groups();
 81  
 
 82  3
         constraintViolations.addAll( methodValidator.validateParameters( clazz, method, arguments, groups ) );
 83  
 
 84  3
         if ( !constraintViolations.isEmpty() )
 85  
         {
 86  2
             throw getException( new ConstraintViolationException(
 87  
                                                                   String.format( "Validation error when calling method '%s' with arguments %s",
 88  
                                                                                  method,
 89  
                                                                                  Arrays.deepToString( arguments ) ),
 90  
                                                                   constraintViolations ),
 91  
                                 validate.rethrowExceptionsAs(), validate.exceptionMessage(), arguments );
 92  
         }
 93  
 
 94  1
         Object returnedValue = invocation.proceed();
 95  
 
 96  1
         if ( validate.validateReturnedValue() )
 97  
         {
 98  1
             constraintViolations.addAll( methodValidator.validateReturnedValue( clazz, method, returnedValue, groups ) );
 99  
 
 100  1
             if ( !constraintViolations.isEmpty() )
 101  
             {
 102  0
                 throw getException( new ConstraintViolationException(
 103  
                                                                       String.format( "Method '%s' returned a not valid value %s",
 104  
                                                                                      method, returnedValue ),
 105  
                                                                       constraintViolations ),
 106  
                                     validate.rethrowExceptionsAs(), validate.exceptionMessage(), arguments );
 107  
             }
 108  
         }
 109  
 
 110  1
         return returnedValue;
 111  
     }
 112  
 
 113  
     /**
 114  
      * Define the {@link Throwable} has to be thrown when a validation error occurs and the user defined the custom
 115  
      * error wrapper.
 116  
      *
 117  
      * @param exception the occurred validation error.
 118  
      * @param exceptionWrapperClass the user defined custom error wrapper.
 119  
      * @return the {@link Throwable} has o be thrown.
 120  
      */
 121  
     private static Throwable getException( ConstraintViolationException exception,
 122  
                                            Class<? extends Throwable> exceptionWrapperClass,
 123  
                                            String exceptionMessage,
 124  
                                            Object[] arguments )
 125  
     {
 126  
         // check the thrown exception is of same re-throw type
 127  2
         if ( exceptionWrapperClass == ConstraintViolationException.class )
 128  
         {
 129  1
             return exception;
 130  
         }
 131  
 
 132  
         // re-throw the exception as new exception
 133  1
         Throwable rethrowEx = null;
 134  
 
 135  
         String errorMessage;
 136  
         Object[] initargs;
 137  
         Class<?>[] initargsType;
 138  
 
 139  1
         if ( exceptionMessage.length() != 0 )
 140  
         {
 141  1
             errorMessage = String.format( exceptionMessage, arguments );
 142  1
             initargs = new Object[] { errorMessage, exception };
 143  1
             initargsType = MESSAGE_CAUSE_TYPES;
 144  
         }
 145  
         else
 146  
         {
 147  0
             initargs = new Object[] { exception };
 148  0
             initargsType = CAUSE_TYPES;
 149  
         }
 150  
 
 151  1
         Constructor<? extends Throwable> exceptionConstructor =
 152  
             getMatchingConstructor( exceptionWrapperClass, initargsType );
 153  1
         if ( exceptionConstructor != null )
 154  
         {
 155  
             try
 156  
             {
 157  1
                 rethrowEx = exceptionConstructor.newInstance( initargs );
 158  
             }
 159  0
             catch ( Exception e )
 160  
             {
 161  0
                 errorMessage =
 162  
                     String.format( "Impossible to re-throw '%s', it needs the constructor with %s argument(s).",
 163  
                                    exceptionWrapperClass.getName(), Arrays.toString( initargsType ) );
 164  0
                 rethrowEx = new RuntimeException( errorMessage, e );
 165  1
             }
 166  
         }
 167  
         else
 168  
         {
 169  0
             errorMessage =
 170  
                 String.format( "Impossible to re-throw '%s', it needs the constructor with %s or %s argument(s).",
 171  
                                exceptionWrapperClass.getName(), Arrays.toString( CAUSE_TYPES ),
 172  
                                Arrays.toString( MESSAGE_CAUSE_TYPES ) );
 173  0
             rethrowEx = new RuntimeException( errorMessage );
 174  
         }
 175  
 
 176  1
         return rethrowEx;
 177  
     }
 178  
 
 179  
     @SuppressWarnings( "unchecked" )
 180  
     private static <E extends Throwable> Constructor<E> getMatchingConstructor( Class<E> type, Class<?>[] argumentsType )
 181  
     {
 182  1
         Class<? super E> currentType = type;
 183  1
         while ( Object.class != currentType )
 184  
         {
 185  2
             for ( Constructor<?> constructor : currentType.getConstructors() )
 186  
             {
 187  2
                 if ( Arrays.equals( argumentsType, constructor.getParameterTypes() ) )
 188  
                 {
 189  1
                     return (Constructor<E>) constructor;
 190  
                 }
 191  
             }
 192  0
             currentType = currentType.getSuperclass();
 193  
         }
 194  0
         return null;
 195  
     }
 196  
 
 197  
 }
+ + + + \ No newline at end of file Propchange: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidateMethodInterceptor.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidateMethodInterceptor.html ------------------------------------------------------------------------------ svn:keywords = Date Revision Author HeadURL Id Propchange: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidateMethodInterceptor.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidationModule.html URL: http://svn.apache.org/viewvc/incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidationModule.html?rev=1440690&view=auto ============================================================================== --- incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidationModule.html (added) +++ incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidationModule.html Wed Jan 30 21:39:40 2013 @@ -0,0 +1,149 @@ + + + + +Coverage Report + + + + +
Coverage Report - org.apache.onami.validation.ValidationModule
+
 
+ + + + + +
Classes in this File Line Coverage Branch Coverage Complexity
ValidationModule
100%
12/12
N/A
1
ValidationModule$1
100%
1/1
N/A
1
+
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 1  
 package org.apache.onami.validation;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  *   http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 
 22  
 import javax.validation.ConstraintValidatorFactory;
 23  
 import javax.validation.MessageInterpolator;
 24  
 import javax.validation.TraversableResolver;
 25  
 import javax.validation.Validator;
 26  
 import javax.validation.ValidatorFactory;
 27  
 import javax.validation.spi.ConfigurationState;
 28  
 import javax.validation.spi.ValidationProvider;
 29  
 
 30  
 import org.aopalliance.intercept.MethodInterceptor;
 31  
 import org.apache.bval.jsr303.ApacheValidationProvider;
 32  
 import org.apache.bval.jsr303.DefaultMessageInterpolator;
 33  
 import org.apache.bval.jsr303.resolver.DefaultTraversableResolver;
 34  
 
 35  
 import com.google.inject.AbstractModule;
 36  
 import com.google.inject.Scopes;
 37  
 import com.google.inject.TypeLiteral;
 38  
 import com.google.inject.matcher.Matchers;
 39  
 
 40  
 /**
 41  
  * The Google-Guice Validation module.
 42  
  */
 43  4
 public final class ValidationModule
 44  
     extends AbstractModule
 45  
 {
 46  
 
 47  
     /**
 48  
      * {@inheritDoc}
 49  
      */
 50  
     @Override
 51  
     protected void configure()
 52  
     {
 53  
         // apache bval bootstrap
 54  4
         bind( MessageInterpolator.class ).to( DefaultMessageInterpolator.class ).in( Scopes.SINGLETON );
 55  4
         bind( TraversableResolver.class ).to( DefaultTraversableResolver.class ).in( Scopes.SINGLETON );
 56  4
         bind( ConstraintValidatorFactory.class ).to( GuiceAwareConstraintValidatorFactory.class );
 57  4
         bind( new TypeLiteral<ValidationProvider<?>>(){} ).to( ApacheValidationProvider.class ).in( Scopes.SINGLETON );
 58  4
         bind( ConfigurationState.class ).toProvider( ConfigurationStateProvider.class ).in( Scopes.SINGLETON );
 59  4
         bind( ValidatorFactory.class ).toProvider( ValidatorFactoryProvider.class ).in( Scopes.SINGLETON );
 60  4
         bind( Validator.class ).toProvider( ValidatorProvider.class );
 61  
 
 62  
         // AOP stuff
 63  4
         MethodInterceptor validateMethodInterceptor = new ValidateMethodInterceptor();
 64  4
         binder().requestInjection( validateMethodInterceptor );
 65  4
         bindInterceptor( Matchers.any(), Matchers.annotatedWith( Validate.class ), validateMethodInterceptor );
 66  4
     }
 67  
 
 68  
 }
+ + + + \ No newline at end of file Propchange: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidationModule.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidationModule.html ------------------------------------------------------------------------------ svn:keywords = Date Revision Author HeadURL Id Propchange: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidationModule.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidatorFactoryProvider.html URL: http://svn.apache.org/viewvc/incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidatorFactoryProvider.html?rev=1440690&view=auto ============================================================================== --- incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidatorFactoryProvider.html (added) +++ incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidatorFactoryProvider.html Wed Jan 30 21:39:40 2013 @@ -0,0 +1,127 @@ + + + + +Coverage Report + + + + +
Coverage Report - org.apache.onami.validation.ValidatorFactoryProvider
+
 
+ + + + +
Classes in this File Line Coverage Branch Coverage Complexity
ValidatorFactoryProvider
60%
3/5
N/A
1
+
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 1  
 package org.apache.onami.validation;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  *   http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 
 22  
 import javax.inject.Inject;
 23  
 import javax.inject.Provider;
 24  
 import javax.inject.Singleton;
 25  
 import javax.validation.ValidatorFactory;
 26  
 import javax.validation.spi.ConfigurationState;
 27  
 
 28  
 import org.apache.bval.jsr303.ApacheValidationProvider;
 29  
 
 30  
 /**
 31  
  * Validator Factory guice provider implementation.
 32  
  */
 33  4
 @Singleton
 34  4
 final class ValidatorFactoryProvider
 35  
     implements Provider<ValidatorFactory>
 36  
 {
 37  
 
 38  
     @Inject
 39  
     private ConfigurationState configurationState;
 40  
 
 41  
     public void setConfigurationState( ConfigurationState configurationState )
 42  
     {
 43  0
         this.configurationState = configurationState;
 44  0
     }
 45  
 
 46  
     /**
 47  
      * {@inheritDoc}
 48  
      */
 49  
     public ValidatorFactory get()
 50  
     {
 51  4
         return new ApacheValidationProvider().buildValidatorFactory( configurationState );
 52  
     }
 53  
 
 54  
 }
+ + + + \ No newline at end of file Propchange: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidatorFactoryProvider.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidatorFactoryProvider.html ------------------------------------------------------------------------------ svn:keywords = Date Revision Author HeadURL Id Propchange: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidatorFactoryProvider.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidatorProvider.html URL: http://svn.apache.org/viewvc/incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidatorProvider.html?rev=1440690&view=auto ============================================================================== --- incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidatorProvider.html (added) +++ incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidatorProvider.html Wed Jan 30 21:39:40 2013 @@ -0,0 +1,129 @@ + + + + +Coverage Report + + + + +
Coverage Report - org.apache.onami.validation.ValidatorProvider
+
 
+ + + + +
Classes in this File Line Coverage Branch Coverage Complexity
ValidatorProvider
60%
3/5
N/A
1
+
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 1  
 package org.apache.onami.validation;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  *   http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 
 22  
 import javax.inject.Inject;
 23  
 import javax.inject.Provider;
 24  
 import javax.inject.Singleton;
 25  
 import javax.validation.Validator;
 26  
 import javax.validation.ValidatorFactory;
 27  
 
 28  
 /**
 29  
  * Validator guice provider implementation.
 30  
  */
 31  4
 @Singleton
 32  4
 final class ValidatorProvider
 33  
     implements Provider<Validator>
 34  
 {
 35  
 
 36  
     /**
 37  
      * The validator reference.
 38  
      */
 39  
     @Inject
 40  
     private ValidatorFactory validatorFactory;
 41  
 
 42  
     public void setValidatorFactory( ValidatorFactory validatorFactory )
 43  
     {
 44  0
         this.validatorFactory = validatorFactory;
 45  0
     }
 46  
 
 47  
     /**
 48  
      * {@inheritDoc}
 49  
      */
 50  
     public Validator get()
 51  
     {
 52  4
         return validatorFactory.getValidator();
 53  
     }
 54  
 
 55  
 }
+ + + + \ No newline at end of file Propchange: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidatorProvider.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidatorProvider.html ------------------------------------------------------------------------------ svn:keywords = Date Revision Author HeadURL Id Propchange: incubator/onami/site/validation/cobertura/org.apache.onami.validation.ValidatorProvider.html ------------------------------------------------------------------------------ svn:mime-type = text/html