diff options
author | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2019-04-09 14:34:04 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-09 14:34:04 +0000 |
commit | 279bf7ca260e3541ec3c54dcfc269a925f676c43 (patch) | |
tree | 4bf04e4b53c7b59efa91c7852374089c61f779d7 /ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java | |
parent | 1b1640ae538cfdb3667fd3222dc4dec469b0e3f7 (diff) | |
parent | 06e02108525c3e5e8c85de233aef3bb332173c00 (diff) |
Merge "CLAMP Model policy creation support"
Diffstat (limited to 'ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java')
-rw-r--r-- | ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java index ef6092d72..5fd0b9169 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-PAP-REST * ================================================================================ - * Copyright (C) 2017-2018 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. @@ -17,11 +17,11 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.policy.pap.xacml.rest.handler; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; - import org.onap.policy.common.logging.eelf.MessageCodes; import org.onap.policy.common.logging.eelf.PolicyLogger; import org.onap.policy.pap.xacml.rest.service.DictionaryService; @@ -31,6 +31,7 @@ public class DictionaryHandlerImpl implements DictionaryHandler { /* * Get Equivalent for Dictionary Services. */ + @Override public void doDictionaryAPIGet(HttpServletRequest request, HttpServletResponse response) { String dictionaryType = request.getParameter("dictionaryType"); try { @@ -111,6 +112,9 @@ public class DictionaryHandlerImpl implements DictionaryHandler { case "MicroServiceConfigName": dictionary.getMicroServiceConfigNameDictionary(response); break; + case "MicroServiceDictionaryData": + dictionary.getMicroServiceDictionaryData(response); + break; case "DCAEUUID": dictionary.getDCAEUUIDDictionary(response); break; @@ -159,13 +163,13 @@ public class DictionaryHandlerImpl implements DictionaryHandler { /** * Can be used to extend the services. * <p> - * getflag=true indicates Get Request. - * getflag=false indicates Put Request. + * getflag=true indicates Get Request. getflag=false indicates Put Request. * * @return */ + @Override public String extendedOptions(String dictionaryType, HttpServletRequest request, HttpServletResponse response, - boolean getflag) { + boolean getflag) { // Default code String message = XACMLErrorConstants.ERROR_DATA_ISSUE + " Invalid Dictionary in Request."; PolicyLogger.error(MessageCodes.ERROR_DATA_ISSUE, "DictionaryHandler", " Invalid Dictionary in Request."); @@ -175,6 +179,7 @@ public class DictionaryHandlerImpl implements DictionaryHandler { return null; } + @Override public void doDictionaryAPIPut(HttpServletRequest request, HttpServletResponse response) { String result = null; String dictionaryType = request.getParameter("dictionaryType"); @@ -257,6 +262,9 @@ public class DictionaryHandlerImpl implements DictionaryHandler { case "MicroServiceConfigName": result = dictionary.saveMicroServiceConfigNameDictionary(request, response); break; + case "MicroServiceDictionaryData": + dictionary.saveMicroServiceDictionaryData(request, response); + break; case "DCAEUUID": result = dictionary.saveDCAEUUIDDictionary(request, response); break; |