re base code
[sdc.git] / catalog-be / src / main / java / org / openecomp / sdc / be / components / validation / ValidationUtils.java
1 package org.openecomp.sdc.be.components.validation;
2
3 import org.openecomp.sdc.common.log.wrappers.Logger;
4 import org.openecomp.sdc.exception.ResponseFormat;
5
6 public class ValidationUtils {
7
8     private static final Logger log = Logger.getLogger(ValidationUtils.class);
9
10     public static  <T> T throwValidationException(ResponseFormat responseFormat, String logMessage, Object ... logParams){
11         log.error(logMessage, logParams);
12         throw new ValidationException(responseFormat);
13     }
14
15 }