New Optimization Policy
[policy/engine.git] / PolicyEngineAPI / src / main / java / org / onap / 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.onap.policy.api;
22
23 import java.util.UUID;
24
25
26 /**
27  * <code>ImportParameters</code> defines the Policy Engine Import Parameters
28  *  which are required to import a new Policy Service or Value. 
29  * 
30  * @version 0.1
31  */
32 public class ImportParameters {
33         private String serviceName;
34         private String description;
35         private UUID requestID;
36         private String filePath;
37         private String version;
38         private IMPORT_TYPE importType;
39         
40         public enum IMPORT_TYPE {
41             MICROSERVICE,
42             BRMSPARAM,
43             OPTIMIZATION
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 ONAP 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 ONAP 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 ONAP components to correlate logging messages.
117          */
118         public void setRequestID(UUID requestID) {
119                 this.requestID = requestID;
120         }
121         
122         /**
123          * Gets the List of File Paths of the new import. 
124          * 
125          * @return filePath the <code>List</code> format of the Policy Import  File
126          */
127         public String getFilePath() {
128                 return filePath;
129         }
130
131         /**
132          * Sets the policy Import File List of the new Policy Import. 
133          * 
134          * @param filePath the <code>List</code> format of the Policy Import  File
135          */
136         public void setFilePath(String filePath) {
137                 this.filePath = filePath;
138         }
139         
140         /** 
141          * Gets the Service Type of the new policy import. 
142          * 
143          * @return ImportType {@link IMPORT_TYPE} format of the Policy Service List
144          */
145         public IMPORT_TYPE getServiceType() {
146                 return importType;
147         }
148         
149         /**
150          * Sets the policy Service Type of the new Policy Service. 
151          * 
152          * @param enumImportType the <code>enumServiceType</code> format of the Policy Service List
153          */
154         public void setServiceType(IMPORT_TYPE enumImportType) {
155                 this.importType = enumImportType;
156         }
157         
158         /**
159          * 
160          * Gets the Import Version of the new policy import. 
161          * 
162          * @return version the <code>String</code> format of the Policy Import Version
163          */
164         public String getVersion() {
165                 return version;
166         }
167
168         /**
169          * Sets the policy Import Version  of the new Policy Import. 
170          * 
171          * @param version the <code>String</code> format of the Policy Import Version
172          */
173         public void setVersion(String version) {
174                 this.version = version;
175         }
176 }