Initial OpenECOMP policy/engine commit
[policy/engine.git] / PolicyEngineAPI / src / main / java / org / openecomp / policy / api / ImportParameters.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * PolicyEngineAPI
4  * ================================================================================
5  * Copyright (C) 2017 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.policy.api;
22
23 import java.util.List;
24 import java.util.UUID;
25
26
27 /**
28  * <code>ImportParameters</code> defines the Policy Engine Import Parameters
29  *  which are required to import a new Policy Service or Value. 
30  * 
31  * @version 0.1
32  */
33 public class ImportParameters {
34         private String serviceName;
35         private String description;
36         private UUID requestID;
37         private String filePath;
38         private String importBody;
39         private String version;
40         private IMPORT_TYPE importType;
41         
42         public enum IMPORT_TYPE {
43             MICROSERVICE
44         }
45
46         /**
47          * Sets Import Policy Parameters.
48          * 
49          * @param serviceName the <code>String</code> format of the Service Name
50          * @param description the <code>String</code> format of the i Description
51          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
52          * @param filePath the <code>List</code> format of the file paths for the service files
53          * @param importType the {@link IMPORT_TYPE} format of the Policy Service List
54          * @param version the <code>String</code> format of the Policy Import Version
55          * A different request ID should be passed for each request.
56          */
57         public void setImportParameters(String serviceName, String description, UUID requestID, String filePath, IMPORT_TYPE importType, String version){
58                 
59                 this.setServiceName(serviceName);
60                 this.setDescription(description);
61                 this.setRequestID(requestID);
62                 this.setFilePath(filePath);
63                 this.setServiceType(importType);        
64                 this.setVersion(version);
65                 
66         }
67
68         /**
69          * Gets the Policy Service of the Policy Service Import Parameters. 
70          * 
71          * @return serviceName the <code>String</code> format of the Policy Service Name
72          */
73         public String getServiceName() {
74                 return serviceName;
75         }
76
77         /**
78          * Sets the serviceName of the Policy Service Parameters.
79          * 
80          * @param serviceName the <code>String</code> format of the Policy Service Name
81          */
82         public void setServiceName(String serviceName) {
83                 this.serviceName = serviceName;
84         }
85
86         /**
87          * Gets the Policy Import Description. 
88          * 
89          * @return description the <code>String</code> format of the Policy Import Description
90          */
91         public String getDescription() {
92                 return description;
93         }
94
95         /**
96          * Sets the Description of the new Policy Import Description. 
97          * 
98          * @param description the <code>String</code> format of the Policy Import Description
99          */
100         public void setDescription(String description) {
101                 this.description = description;
102         }
103         
104         /**
105          * Gets the requestID of the Policy Parameters. 
106          * 
107          * @return unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
108          */
109         public UUID getRequestID() {
110                 return requestID;
111         }
112         
113         /**
114          * Sets the requestID of the Policy Parameters. 
115          * 
116          * @param requestID unique request ID which will be passed throughout the ECOMP components to correlate logging messages.
117          */
118         public void setRequestID(UUID requestID) {
119                 this.requestID = requestID;
120         }
121
122         /**
123          * Gets the importBody of the new policy import. 
124          * 
125          * @return importBody the <code>String</code> format of the Policy Import Body
126          */
127         public String getImportBody() {
128                 return importBody;
129         }
130
131         /**
132          * Sets the importBody of the Policy Import Body. 
133          * 
134          * @param importBody the <code>String</code> format of the Policy Import Body
135          */
136         public void setImportBody(String importBody) {
137                 this.importBody = importBody;
138         }
139         
140         /**
141          * Gets the List of File Paths of the new import. 
142          * 
143          * @return filePath the <code>List</code> format of the Policy Import  File
144          */
145         public String getFilePath() {
146                 return filePath;
147         }
148
149         /**
150          * Sets the policy Import File List of the new Policy Import. 
151          * 
152          * @param filePath the <code>List</code> format of the Policy Import  File
153          */
154         public void setFilePath(String filePath) {
155                 this.filePath = filePath;
156         }
157         
158         /** 
159          * Gets the Service Type of the new policy import. 
160          * 
161          * @return ImportType {@link IMPORT_TYPE} format of the Policy Service List
162          */
163         public IMPORT_TYPE getServiceType() {
164                 return importType;
165         }
166         
167         /**
168          * Sets the policy Service Type of the new Policy Service. 
169          * 
170          * @param enumImportType the <code>enumServiceType</code> format of the Policy Service List
171          */
172         public void setServiceType(IMPORT_TYPE enumImportType) {
173                 this.importType = enumImportType;
174         }
175         
176         /**
177          * 
178          * Gets the Import Version of the new policy import. 
179          * 
180          * @return version the <code>String</code> format of the Policy Import Version
181          */
182         public String getVersion() {
183                 return version;
184         }
185
186         /**
187          * Sets the policy Import Version  of the new Policy Import. 
188          * 
189          * @param version the <code>String</code> format of the Policy Import Version
190          */
191         public void setVersion(String version) {
192                 this.version = version;
193         }
194 }