diff options
author | pa834y <pa834y@att.com> | 2019-04-04 09:02:48 -0400 |
---|---|---|
committer | pa834y <pa834y@att.com> | 2019-04-05 16:06:57 -0400 |
commit | 6d72b847fe202bc1cd6fb3922755be774de0df69 (patch) | |
tree | 97a8fd76d296d6788d8dbb0b52b97fbc40d64c3d /PolicyEngineAPI/src/main/java/org/onap/policy/api/DictionaryParameters.java | |
parent | d5f95d08ffd3f2e16b67aadae7007c7a51dfae19 (diff) |
Make clientAuth header optional and log request
Change-Id: Ifc44740a71c2b60d5474cd665bbfca94dcc0c9a7
Issue-ID: POLICY-1418
Signed-off-by: pa834y <pa834y@att.com>
Diffstat (limited to 'PolicyEngineAPI/src/main/java/org/onap/policy/api/DictionaryParameters.java')
-rw-r--r-- | PolicyEngineAPI/src/main/java/org/onap/policy/api/DictionaryParameters.java | 134 |
1 files changed, 76 insertions, 58 deletions
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); + } } |