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=========================================================
20 package org.onap.policy.pap.xacml.rest.handler;
22 import javax.servlet.http.HttpServletRequest;
23 import javax.servlet.http.HttpServletResponse;
25 import org.onap.policy.common.logging.eelf.PolicyLogger;
26 import org.onap.policy.common.logging.flexlogger.FlexLogger;
27 import org.onap.policy.common.logging.flexlogger.FlexLogger;
28 import org.onap.policy.common.logging.flexlogger.Logger;
29 import com.att.research.xacml.util.XACMLProperties;
31 public interface DictionaryHandler {
32 public static final Logger logger = FlexLogger.getLogger(DictionaryHandler.class);
33 String DICTIONARY_DEFAULT_CLASS = DictionaryHandlerImpl.class.getName();
38 public static DictionaryHandler getInstance(){
40 Class<?> dictionaryHandler = Class.forName(XACMLProperties.getProperty("dictionary.impl.className", DICTIONARY_DEFAULT_CLASS));
41 DictionaryHandler instance = (DictionaryHandler) dictionaryHandler.newInstance();
43 } catch (Exception e) {
44 logger.error(e.getMessage(),e);
50 * Get Equivalent for Dictionary Services.
52 public void doDictionaryAPIGet(HttpServletRequest request, HttpServletResponse response);
54 * Put Equivalent for Dictionary Services.
56 public void doDictionaryAPIPut(HttpServletRequest request, HttpServletResponse response);
59 * Can be used to extend the services.
61 * getflag=true indicates Get Request.
62 * getflag=false indicates Put Request.
65 public String extendedOptions(String dictionaryType, HttpServletRequest request, HttpServletResponse response, boolean getflag);