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 {
47 * Sets Import Policy Parameters.
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.
57 public void setImportParameters(String serviceName, String description, UUID requestID, String filePath, IMPORT_TYPE importType, String version){
59 this.setServiceName(serviceName);
60 this.setDescription(description);
61 this.setRequestID(requestID);
62 this.setFilePath(filePath);
63 this.setServiceType(importType);
64 this.setVersion(version);
69 * Gets the Policy Service of the Policy Service Import Parameters.
71 * @return serviceName the <code>String</code> format of the Policy Service Name
73 public String getServiceName() {
78 * Sets the serviceName of the Policy Service Parameters.
80 * @param serviceName the <code>String</code> format of the Policy Service Name
82 public void setServiceName(String serviceName) {
83 this.serviceName = serviceName;
87 * Gets the Policy Import Description.
89 * @return description the <code>String</code> format of the Policy Import Description
91 public String getDescription() {
96 * Sets the Description of the new Policy Import Description.
98 * @param description the <code>String</code> format of the Policy Import Description
100 public void setDescription(String description) {
101 this.description = description;
105 * Gets the requestID of the Policy Parameters.
107 * @return unique request ID which will be passed throughout the ONAP components to correlate logging messages.
109 public UUID getRequestID() {
114 * Sets the requestID of the Policy Parameters.
116 * @param requestID unique request ID which will be passed throughout the ONAP components to correlate logging messages.
118 public void setRequestID(UUID requestID) {
119 this.requestID = requestID;
123 * Gets the List of File Paths of the new import.
125 * @return filePath the <code>List</code> format of the Policy Import File
127 public String getFilePath() {
132 * Sets the policy Import File List of the new Policy Import.
134 * @param filePath the <code>List</code> format of the Policy Import File
136 public void setFilePath(String filePath) {
137 this.filePath = filePath;
141 * Gets the Service Type of the new policy import.
143 * @return ImportType {@link IMPORT_TYPE} format of the Policy Service List
145 public IMPORT_TYPE getServiceType() {
150 * Sets the policy Service Type of the new Policy Service.
152 * @param enumImportType the <code>enumServiceType</code> format of the Policy Service List
154 public void setServiceType(IMPORT_TYPE enumImportType) {
155 this.importType = enumImportType;
160 * Gets the Import Version of the new policy import.
162 * @return version the <code>String</code> format of the Policy Import Version
164 public String getVersion() {
169 * Sets the policy Import Version of the new Policy Import.
171 * @param version the <code>String</code> format of the Policy Import Version
173 public void setVersion(String version) {
174 this.version = version;