Interface AttributeConstraintEnum
- All Superinterfaces:
JsonEnum
- All Known Implementing Classes:
AttributeConstraintEnum.AttributeConstraintEnumEnum
Specifies how an Attribute (or a set of Attributes) should be validated across all variants of a Product:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
possible values of AttributeConstraintEnum -
Field Summary
Modifier and TypeFieldDescriptionstatic final AttributeConstraintEnum
Set of Attributes that have this constraint, should have different combinations in each variant.static final AttributeConstraintEnum
No constraints are applied to the Attribute.static final AttributeConstraintEnum
Attribute value should be the same in all variants.static final AttributeConstraintEnum
Attribute values must be different for each variant. -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeConstraintEnum
factory method for a enum value of AttributeConstraintEnum if no enum has been found an anonymous instance will be createdstatic Optional<AttributeConstraintEnum>
findEnumViaJsonName
(String jsonName) method to find enum using the JSON valuethe JSON valuename()
the enum valuetoString()
convert value to stringstatic AttributeConstraintEnum[]
values()
possible enum values
-
Field Details
-
NONE
No constraints are applied to the Attribute.
-
UNIQUE
Attribute values must be different for each variant.
-
COMBINATION_UNIQUE
Set of Attributes that have this constraint, should have different combinations in each variant.
-
SAME_FOR_ALL
Attribute value should be the same in all variants.
-
-
Method Details
-
getJsonName
String getJsonName()the JSON value- Specified by:
getJsonName
in interfaceJsonEnum
- Returns:
- json value
-
name
String name()the enum value -
toString
String toString()convert value to string -
findEnum
factory method for a enum value of AttributeConstraintEnum if no enum has been found an anonymous instance will be created- Parameters:
value
- the enum value to be wrapped- Returns:
- enum instance
-
findEnumViaJsonName
method to find enum using the JSON value- Parameters:
jsonName
- the json value to be wrapped- Returns:
- optional of enum instance
-
values
possible enum values- Returns:
- array of possible enum values
-