X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fhandler%2FDictionaryHandler.java;h=89ce1883547aa645b6f25dd955946efd9b611e7e;hb=4068da123ee33b532b4b52f15545c76a978f977e;hp=d30c70204524b1dd1198254e8f4f2918682b8df0;hpb=6f2b3f2dd0e80895acd0f77aa5784e717be33696;p=policy%2Fengine.git diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandler.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandler.java index d30c70204..89ce18835 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandler.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandler.java @@ -22,45 +22,44 @@ 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.PolicyLogger; -import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; + import com.att.research.xacml.util.XACMLProperties; public interface DictionaryHandler { - public static final Logger logger = FlexLogger.getLogger(DictionaryHandler.class); - String DICTIONARY_DEFAULT_CLASS = DictionaryHandlerImpl.class.getName(); + public static final Logger logger = FlexLogger.getLogger(DictionaryHandler.class); + String DICTIONARY_DEFAULT_CLASS = DictionaryHandlerImpl.class.getName(); + + /* + * Get Instance + */ + public static DictionaryHandler getInstance(){ + try { + Class dictionaryHandler = Class.forName(XACMLProperties.getProperty("dictionary.impl.className", DICTIONARY_DEFAULT_CLASS)); + DictionaryHandler instance = (DictionaryHandler) dictionaryHandler.newInstance(); + return instance; + } catch (Exception e) { + logger.error(e.getMessage(),e); + } + return null; + } + + /* + * Get Equivalent for Dictionary Services. + */ + public void doDictionaryAPIGet(HttpServletRequest request, HttpServletResponse response); + /* + * Put Equivalent for Dictionary Services. + */ + public void doDictionaryAPIPut(HttpServletRequest request, HttpServletResponse response); - /* - * Get Instance - */ - public static DictionaryHandler getInstance(){ - try { - Class dictionaryHandler = Class.forName(XACMLProperties.getProperty("dictionary.impl.className", DICTIONARY_DEFAULT_CLASS)); - DictionaryHandler instance = (DictionaryHandler) dictionaryHandler.newInstance(); - return instance; - } catch (Exception e) { - logger.error(e.getMessage(),e); - } - return null; - } - - /* - * Get Equivalent for Dictionary Services. - */ - public void doDictionaryAPIGet(HttpServletRequest request, HttpServletResponse response); - /* - * Put Equivalent for Dictionary Services. - */ - public void doDictionaryAPIPut(HttpServletRequest request, HttpServletResponse response); - - /** - * Can be used to extend the services. - * - * getflag=true indicates Get Request. - * getflag=false indicates Put Request. - * @return - */ - public String extendedOptions(String dictionaryType, HttpServletRequest request, HttpServletResponse response, boolean getflag); + /** + * Can be used to extend the services. + * + * getflag=true indicates Get Request. + * getflag=false indicates Put Request. + * @return + */ + public String extendedOptions(String dictionaryType, HttpServletRequest request, HttpServletResponse response, boolean getflag); }