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.xacml.pdp;
22 import java.util.Properties;
24 import org.onap.policy.xacml.action.FindAction;
26 import com.att.research.xacml.api.Decision;
27 import com.att.research.xacml.api.Request;
28 import com.att.research.xacml.api.Response;
29 import com.att.research.xacml.api.pdp.PDPException;
30 import com.att.research.xacml.api.pdp.ScopeResolver;
31 import com.att.research.xacml.std.StdMutableResponse;
32 import com.att.research.xacmlatt.pdp.ATTPDPEngine;
33 import com.att.research.xacmlatt.pdp.eval.EvaluationContextFactory;
35 public class ONAPPDPEngine extends ATTPDPEngine {
37 public ONAPPDPEngine(EvaluationContextFactory evaluationContextFactoryIn, Decision defaultDecisionIn,
38 ScopeResolver scopeResolverIn, Properties properties) {
39 super(evaluationContextFactoryIn, defaultDecisionIn, scopeResolverIn, properties);
42 public ONAPPDPEngine(EvaluationContextFactory evaluationContextFactoryIn, Decision defaultDecisionIn,
43 ScopeResolver scopeResolverIn) {
44 super(evaluationContextFactoryIn, defaultDecisionIn, scopeResolverIn);
47 public ONAPPDPEngine(EvaluationContextFactory evaluationContextFactoryIn, ScopeResolver scopeResolverIn) {
48 super(evaluationContextFactoryIn, scopeResolverIn);
52 public Response decide(Request pepRequest) throws PDPException {
53 Response response = super.decide(pepRequest);
55 FindAction findAction = new FindAction();
56 return findAction.run((StdMutableResponse) response, pepRequest);