re base code
[sdc.git] / catalog-model / src / main / java / org / openecomp / sdc / be / model / tosca / constraints / AbstractStringPropertyConstraint.java
index 142caa2..8f54c68 100644 (file)
 
 package org.openecomp.sdc.be.model.tosca.constraints;
 
-import java.io.Serializable;
-
 import org.openecomp.sdc.be.model.tosca.ToscaType;
 import org.openecomp.sdc.be.model.tosca.constraints.exception.ConstraintValueDoNotMatchPropertyTypeException;
 import org.openecomp.sdc.be.model.tosca.constraints.exception.ConstraintViolationException;
 
-public abstract class AbstractStringPropertyConstraint extends AbstractPropertyConstraint implements Serializable {
-
-       /**
-        * 
-        */
-       private static final long serialVersionUID = 6857605164938136232L;
-
-       protected abstract void doValidate(String propertyValue) throws ConstraintViolationException;
-
-       @Override
-       public void validate(Object propertyValue) throws ConstraintViolationException {
-               if (propertyValue == null) {
-                       throw new ConstraintViolationException("Value to validate is null");
-               }
-               if (!(propertyValue instanceof String)) {
-                       throw new ConstraintViolationException("This constraint can only be applied on String value");
-               }
-               doValidate((String) propertyValue);
-       }
-
-       @Override
-       public void initialize(ToscaType propertyType) throws ConstraintValueDoNotMatchPropertyTypeException {
-               ConstraintUtil.checkStringType(propertyType);
-       }
+public abstract class AbstractStringPropertyConstraint extends AbstractPropertyConstraint {
+
+    protected abstract void doValidate(String propertyValue) throws ConstraintViolationException;
+
+    @Override
+    public void validate(Object propertyValue) throws ConstraintViolationException {
+        if (propertyValue == null) {
+            throw new ConstraintViolationException("Value to validate is null");
+        }
+        if (!(propertyValue instanceof String)) {
+            throw new ConstraintViolationException("This constraint can only be applied on String value");
+        }
+        doValidate((String) propertyValue);
+    }
+
+    @Override
+    public void initialize(ToscaType propertyType) throws ConstraintValueDoNotMatchPropertyTypeException {
+        ConstraintUtil.checkStringType(propertyType);
+    }
 }