import java.util.List;
import java.util.Locale;
import java.util.Map;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.openecomp.sdc.be.model.tosca.constraints.ConstraintUtil;
import org.openecomp.sdc.be.model.tosca.constraints.exception.ConstraintValueDoNotMatchPropertyTypeException;
*
* @author mkv
*/
+@AllArgsConstructor
public enum ToscaType {
// @formatter:off
STRING("string"),
SCALAR_UNIT_FREQUENCY("scalar-unit.frequency");
// @formatter:on
- private String type;
-
- ToscaType(String type) {
- this.type = type;
- }
+ @Getter
+ private final String type;
public static ToscaType getToscaType(String typeName) {
if (typeName == null) {
return ToscaPropertyType.MAP.getType().equals(type) || ToscaPropertyType.LIST.getType().equals(type);
}
- public String getType() {
- return type;
- }
-
public boolean isValidValue(String value) {
switch (this) {
case BOOLEAN: