3914864bf80332919e6f87e097beaf2c7a6cbd18
[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         }
44
45         /**
46          * Sets Import Policy Parameters.
47          * 
48          * @param serviceName the <code>String</code> format of the Service Name
49          * @param description the <code>String</code> format of the i Description
50          * @param requestID unique request ID which will be passed throughout the ONAP components to correlate logging messages.
51          * @param filePath the <code>List</code> format of the file paths for the service files
52          * @param importType the {@link IMPORT_TYPE} format of the Policy Service List
53          * @param version the <code>String</code> format of the Policy Import Version
54          * A different request ID should be passed for each request.
55          */
56         public void setImportParameters(String serviceName, String description, UUID requestID, String filePath, IMPORT_TYPE importType, String version){
57                 
58                 this.setServiceName(serviceName);
59                 this.setDescription(description);
60                 this.setRequestID(requestID);
61                 this.setFilePath(filePath);
62                 this.setServiceType(importType);        
63                 this.setVersion(version);
64                 
65         }
66
67         /**
68          * Gets the Policy Service of the Policy Service Import Parameters. 
69          * 
70          * @return serviceName the <code>String</code> format of the Policy Service Name
71          */
72         public String getServiceName() {
73                 return serviceName;
74         }
75
76         /**
77          * Sets the serviceName of the Policy Service Parameters.
78          * 
79          * @param serviceName the <code>String</code> format of the Policy Service Name
80          */
81         public void setServiceName(String serviceName) {
82                 this.serviceName = serviceName;
83         }
84
85         /**
86          * Gets the Policy Import Description. 
87          * 
88          * @return description the <code>String</code> format of the Policy Import Description
89          */
90         public String getDescription() {
91                 return description;
92         }
93
94         /**
95          * Sets the Description of the new Policy Import Description. 
96          * 
97          * @param description the <code>String</code> format of the Policy Import Description
98          */
99         public void setDescription(String description) {
100                 this.description = description;
101         }
102         
103         /**
104          * Gets the requestID of the Policy Parameters. 
105          * 
106          * @return unique request ID which will be passed throughout the ONAP components to correlate logging messages.
107          */
108         public UUID getRequestID() {
109                 return requestID;
110         }
111         
112         /**
113          * Sets the requestID of the Policy Parameters. 
114          * 
115          * @param requestID unique request ID which will be passed throughout the ONAP components to correlate logging messages.
116          */
117         public void setRequestID(UUID requestID) {
118                 this.requestID = requestID;
119         }
120         
121         /**
122          * Gets the List of File Paths of the new import. 
123          * 
124          * @return filePath the <code>List</code> format of the Policy Import  File
125          */
126         public String getFilePath() {
127                 return filePath;
128         }
129
130         /**
131          * Sets the policy Import File List of the new Policy Import. 
132          * 
133          * @param filePath the <code>List</code> format of the Policy Import  File
134          */
135         public void setFilePath(String filePath) {
136                 this.filePath = filePath;
137         }
138         
139         /** 
140          * Gets the Service Type of the new policy import. 
141          * 
142          * @return ImportType {@link IMPORT_TYPE} format of the Policy Service List
143          */
144         public IMPORT_TYPE getServiceType() {
145                 return importType;
146         }
147         
148         /**
149          * Sets the policy Service Type of the new Policy Service. 
150          * 
151          * @param enumImportType the <code>enumServiceType</code> format of the Policy Service List
152          */
153         public void setServiceType(IMPORT_TYPE enumImportType) {
154                 this.importType = enumImportType;
155         }
156         
157         /**
158          * 
159          * Gets the Import Version of the new policy import. 
160          * 
161          * @return version the <code>String</code> format of the Policy Import Version
162          */
163         public String getVersion() {
164                 return version;
165         }
166
167         /**
168          * Sets the policy Import Version  of the new Policy Import. 
169          * 
170          * @param version the <code>String</code> format of the Policy Import Version
171          */
172         public void setVersion(String version) {
173                 this.version = version;
174         }
175 }