Added oparent to sdc main
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / components / utils / PolicyTypeBuilder.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.sdc.be.components.utils;
22
23
24 import org.openecomp.sdc.be.model.PolicyTypeDefinition;
25 import org.openecomp.sdc.be.model.PropertyDefinition;
26
27 import java.util.List;
28 import java.util.Map;
29
30 public class PolicyTypeBuilder {
31
32     private PolicyTypeDefinition policyTypeDataDefinition;
33
34     public PolicyTypeBuilder() {
35         this.policyTypeDataDefinition = new PolicyTypeDefinition();
36     }
37
38     public PolicyTypeBuilder setType(String type) {
39         policyTypeDataDefinition.setType(type);
40         return this;
41     }
42
43     public PolicyTypeBuilder setUniqueId(String uid) {
44         policyTypeDataDefinition.setUniqueId(uid);
45         return this;
46     }
47
48     public PolicyTypeBuilder setDerivedFrom(String derivedFrom) {
49         policyTypeDataDefinition.setDerivedFrom(derivedFrom);
50         return this;
51     }
52
53     public PolicyTypeBuilder setVersion(String version) {
54         policyTypeDataDefinition.setVersion(version);
55         return this;
56     }
57
58     public PolicyTypeBuilder setDescription(String version) {
59         policyTypeDataDefinition.setDescription(version);
60         return this;
61     }
62
63     public PolicyTypeBuilder setTargets(List<String> targets) {
64         policyTypeDataDefinition.setTargets(targets);
65         return this;
66     }
67
68     public PolicyTypeBuilder setMetadata(Map<String, String> metadata) {
69         policyTypeDataDefinition.setMetadata(metadata);
70         return this;
71     }
72
73     public PolicyTypeBuilder setModificationTime(long modificationTime) {
74         policyTypeDataDefinition.setModificationTime(modificationTime);
75         return this;
76     }
77
78     public PolicyTypeBuilder setCreationTime(long creationTime) {
79         policyTypeDataDefinition.setModificationTime(creationTime);
80         return this;
81     }
82
83     public PolicyTypeBuilder setOwner(String owner) {
84         policyTypeDataDefinition.setOwnerId(owner);
85         return this;
86     }
87
88     public PolicyTypeBuilder setName(String name) {
89         policyTypeDataDefinition.setName(name);
90         return this;
91     }
92
93     public PolicyTypeBuilder setIcon(String icon) {
94         policyTypeDataDefinition.setIcon(icon);
95         return this;
96     }
97
98     public PolicyTypeBuilder setHighestVersion(boolean isHighestVersion) {
99         policyTypeDataDefinition.setHighestVersion(isHighestVersion);
100         return this;
101     }
102
103     public PolicyTypeBuilder setProperties(List<PropertyDefinition> properties) {
104         policyTypeDataDefinition.setProperties(properties);
105         return this;
106     }
107
108     public PolicyTypeDefinition build() {
109         return policyTypeDataDefinition;
110     }
111
112
113
114 }