X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=PolicyEngineAPI%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fapi%2FDictionaryParameters.java;h=23855ee84581e0527785154ad6b9f5905bc42a5f;hp=e4aa5e1a5ca9cd95bb9fd109c52cb829d1de8f1d;hb=6d72b847fe202bc1cd6fb3922755be774de0df69;hpb=d5f95d08ffd3f2e16b67aadae7007c7a51dfae19 diff --git a/PolicyEngineAPI/src/main/java/org/onap/policy/api/DictionaryParameters.java b/PolicyEngineAPI/src/main/java/org/onap/policy/api/DictionaryParameters.java index e4aa5e1a5..23855ee84 100644 --- a/PolicyEngineAPI/src/main/java/org/onap/policy/api/DictionaryParameters.java +++ b/PolicyEngineAPI/src/main/java/org/onap/policy/api/DictionaryParameters.java @@ -2,14 +2,14 @@ * ============LICENSE_START======================================================= * PolicyEngineAPI * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017,2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,63 +20,81 @@ package org.onap.policy.api; +import com.google.gson.Gson; import java.util.UUID; public class DictionaryParameters { - - private DictionaryType dictionaryType; - private String dictionary; - private String dictionaryJson; - private UUID requestID; - - - /** - * @return the dictionaryType - */ - public DictionaryType getDictionaryType() { - return dictionaryType; - } - /** - * @param dictionaryType the dictionaryType to set - */ - public void setDictionaryType(DictionaryType dictionaryType) { - this.dictionaryType = dictionaryType; - } - /** - * @return the dictionary - */ - public String getDictionary() { - return dictionary; - } - /** - * @param dictionary the dictionary to set - */ - public void setDictionary(String dictionary) { - this.dictionary = dictionary; - } - /** - * @return the dictionaryFields - */ - public String getDictionaryJson() { - return dictionaryJson; - } - /** - * @param dictionaryFields the dictionaryFields to set - */ - public void setDictionaryJson(String dictionaryJson) { - this.dictionaryJson = dictionaryJson; - } - /** - * @return the requestID - */ - public UUID getRequestID() { - return requestID; - } - /** - * @param requestID the requestID to set - */ - public void setRequestID(UUID requestID) { - this.requestID = requestID; - } + private static final Gson GSON = new Gson(); + private DictionaryType dictionaryType; + private String dictionary; + private String dictionaryJson; + private UUID requestID; + + + /** + * @return the dictionaryType + */ + public DictionaryType getDictionaryType() { + return dictionaryType; + } + + /** + * @param dictionaryType the dictionaryType to set + */ + public void setDictionaryType(DictionaryType dictionaryType) { + this.dictionaryType = dictionaryType; + } + + /** + * @return the dictionary + */ + public String getDictionary() { + return dictionary; + } + + /** + * @param dictionary the dictionary to set + */ + public void setDictionary(String dictionary) { + this.dictionary = dictionary; + } + + /** + * @return the dictionaryFields + */ + public String getDictionaryJson() { + return dictionaryJson; + } + + /** + * @param dictionaryFields the dictionaryFields to set + */ + public void setDictionaryJson(String dictionaryJson) { + this.dictionaryJson = dictionaryJson; + } + + /** + * @return the requestID + */ + public UUID getRequestID() { + return requestID; + } + + /** + * @param requestID the requestID to set + */ + public void setRequestID(UUID requestID) { + this.requestID = requestID; + } + + /** + * Used to print the input Params for REST call. + * + * @return JSON String of this object. + */ + @Override + public String toString() { + return GSON.toJson(this); + } }