aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java/org/openecomp/sdc/be/components/utils/PropertyDataDefinitionBuilder.java
blob: 85b2228933d7d84f5bd29a4b9e2400b30cf0b4ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package org.openecomp.sdc.be.components.utils;

import org.openecomp.sdc.be.model.PropertyConstraint;
import org.openecomp.sdc.be.model.PropertyDefinition;

import java.util.List;

public class PropertyDataDefinitionBuilder extends PropertyDataDefinitionAbstractBuilder<PropertyDefinition, PropertyDataDefinitionBuilder> {

    protected PropertyDataDefinitionBuilder self() {
        return this;
    }

    @Override
    PropertyDefinition propertyDefinition() {
        return new PropertyDefinition();
    }

    @Override
    public PropertyDefinition build() {
        return propertyDefinition;
    }

    public PropertyDataDefinitionBuilder setConstraints(List<PropertyConstraint> constraints) {
        propertyDefinition.setConstraints(constraints);
        return self();
    }

}