[POLICY-122] Policy GUI Fixes
[policy/engine.git] / ECOMP-PDP / src / main / java / org / openecomp / policy / xacml / pdp / ECOMPPDPEngine.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ECOMP-PDP
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20 package org.openecomp.policy.xacml.pdp;
21
22 import java.util.Properties;
23
24 import org.openecomp.policy.xacml.action.FindAction;
25
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;
34
35 public class ECOMPPDPEngine extends ATTPDPEngine {
36
37         public ECOMPPDPEngine(EvaluationContextFactory evaluationContextFactoryIn, Decision defaultDecisionIn,
38                         ScopeResolver scopeResolverIn, Properties properties) {
39                 super(evaluationContextFactoryIn, defaultDecisionIn, scopeResolverIn, properties);
40         }
41
42         public ECOMPPDPEngine(EvaluationContextFactory evaluationContextFactoryIn, Decision defaultDecisionIn,
43                         ScopeResolver scopeResolverIn) {
44                 super(evaluationContextFactoryIn, defaultDecisionIn, scopeResolverIn);
45         }
46
47         public ECOMPPDPEngine(EvaluationContextFactory evaluationContextFactoryIn, ScopeResolver scopeResolverIn) {
48                 super(evaluationContextFactoryIn, scopeResolverIn);
49         }
50
51         @Override
52         public Response decide(Request pepRequest) throws PDPException {
53                 Response response = super.decide(pepRequest);
54                 
55                 FindAction findAction = new FindAction();
56                 return findAction.run((StdMutableResponse) response, pepRequest);
57         }
58
59
60 }