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 {
34 private String serviceName;
35 private String description;
36 private UUID requestID;
37 private String filePath;
38 private String version;
39 private IMPORT_TYPE importType;
41 public enum IMPORT_TYPE {
42 MICROSERVICE, BRMSPARAM, OPTIMIZATION
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
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,
58 IMPORT_TYPE importType, String version) {
60 this.setServiceName(serviceName);
61 this.setDescription(description);
62 this.setRequestID(requestID);
63 this.setFilePath(filePath);
64 this.setServiceType(importType);
65 this.setVersion(version);
70 * Gets the Policy Service of the Policy Service Import Parameters.
72 * @return serviceName the <code>String</code> format of the Policy Service Name
74 public String getServiceName() {
79 * Sets the serviceName of the Policy Service Parameters.
81 * @param serviceName the <code>String</code> format of the Policy Service Name
83 public void setServiceName(String serviceName) {
84 this.serviceName = serviceName;
88 * Gets the Policy Import Description.
90 * @return description the <code>String</code> format of the Policy Import Description
92 public String getDescription() {
97 * Sets the Description of the new Policy Import Description.
99 * @param description the <code>String</code> format of the Policy Import Description
101 public void setDescription(String description) {
102 this.description = description;
106 * Gets the requestID of the Policy Parameters.
108 * @return unique request ID which will be passed throughout the ONAP components to correlate logging messages.
110 public UUID getRequestID() {
115 * Sets the requestID of the Policy Parameters.
117 * @param requestID unique request ID which will be passed throughout the ONAP components to correlate logging
120 public void setRequestID(UUID requestID) {
121 this.requestID = requestID;
125 * Gets the List of File Paths of the new import.
127 * @return filePath the <code>List</code> format of the Policy Import File
129 public String getFilePath() {
134 * Sets the policy Import File List of the new Policy Import.
136 * @param filePath the <code>List</code> format of the Policy Import File
138 public void setFilePath(String filePath) {
139 this.filePath = filePath;
143 * Gets the Service Type of the new policy import.
145 * @return ImportType {@link IMPORT_TYPE} format of the Policy Service List
147 public IMPORT_TYPE getServiceType() {
152 * Sets the policy Service Type of the new Policy Service.
154 * @param enumImportType the <code>enumServiceType</code> format of the Policy Service List
156 public void setServiceType(IMPORT_TYPE enumImportType) {
157 this.importType = enumImportType;
161 * Gets the Import Version of the new policy import.
163 * @return version the <code>String</code> format of the Policy Import Version
165 public String getVersion() {
170 * Sets the policy Import Version of the new Policy Import.
172 * @param version the <code>String</code> format of the Policy Import Version
174 public void setVersion(String version) {
175 this.version = version;