2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.policy.api;
23 import java.util.UUID;
27 * <code>ImportParameters</code> defines the Policy Engine Import Parameters
28 * which are required to import a new Policy Service or Value.
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;
40 public enum IMPORT_TYPE {
46 * Sets Import Policy Parameters.
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.
56 public void setImportParameters(String serviceName, String description, UUID requestID, String filePath, IMPORT_TYPE importType, String version){
58 this.setServiceName(serviceName);
59 this.setDescription(description);
60 this.setRequestID(requestID);
61 this.setFilePath(filePath);
62 this.setServiceType(importType);
63 this.setVersion(version);
68 * Gets the Policy Service of the Policy Service Import Parameters.
70 * @return serviceName the <code>String</code> format of the Policy Service Name
72 public String getServiceName() {
77 * Sets the serviceName of the Policy Service Parameters.
79 * @param serviceName the <code>String</code> format of the Policy Service Name
81 public void setServiceName(String serviceName) {
82 this.serviceName = serviceName;
86 * Gets the Policy Import Description.
88 * @return description the <code>String</code> format of the Policy Import Description
90 public String getDescription() {
95 * Sets the Description of the new Policy Import Description.
97 * @param description the <code>String</code> format of the Policy Import Description
99 public void setDescription(String description) {
100 this.description = description;
104 * Gets the requestID of the Policy Parameters.
106 * @return unique request ID which will be passed throughout the ONAP components to correlate logging messages.
108 public UUID getRequestID() {
113 * Sets the requestID of the Policy Parameters.
115 * @param requestID unique request ID which will be passed throughout the ONAP components to correlate logging messages.
117 public void setRequestID(UUID requestID) {
118 this.requestID = requestID;
122 * Gets the List of File Paths of the new import.
124 * @return filePath the <code>List</code> format of the Policy Import File
126 public String getFilePath() {
131 * Sets the policy Import File List of the new Policy Import.
133 * @param filePath the <code>List</code> format of the Policy Import File
135 public void setFilePath(String filePath) {
136 this.filePath = filePath;
140 * Gets the Service Type of the new policy import.
142 * @return ImportType {@link IMPORT_TYPE} format of the Policy Service List
144 public IMPORT_TYPE getServiceType() {
149 * Sets the policy Service Type of the new Policy Service.
151 * @param enumImportType the <code>enumServiceType</code> format of the Policy Service List
153 public void setServiceType(IMPORT_TYPE enumImportType) {
154 this.importType = enumImportType;
159 * Gets the Import Version of the new policy import.
161 * @return version the <code>String</code> format of the Policy Import Version
163 public String getVersion() {
168 * Sets the policy Import Version of the new Policy Import.
170 * @param version the <code>String</code> format of the Policy Import Version
172 public void setVersion(String version) {
173 this.version = version;