bd95315322249eaa7ef4f438947f2ef99e042445
[policy/engine.git] / ONAP-XACML / src / main / java / org / onap / policy / xacml / api / pap / ONAPPapEngineFactory.java
1 package org.onap.policy.xacml.api.pap;
2
3 import java.util.Properties;
4
5 import com.att.research.xacml.api.pap.PAPException;
6 import com.att.research.xacml.util.FactoryException;
7 import com.att.research.xacml.util.FactoryFinder;
8
9 public abstract class ONAPPapEngineFactory{
10         
11         /**
12          * Creates a new <code>PAPEngineFactory</code> instance using the given class name and the default thread class loader.
13          * 
14          * @param factoryClassName the <code>String</code> name of the factory class to instantiate
15          * @return an instance of an object that extends <code>ONAPPapEngineFactory</code> to use in creating <code>PAPPolicyEngine</code> objects.
16          */
17         public static ONAPPapEngineFactory newInstance(String factoryClassName) throws FactoryException {
18                 return FactoryFinder.newInstance(factoryClassName, ONAPPapEngineFactory.class, null, true);
19         }
20
21         /**
22          * Creates a new <code>PAPPolicyEngine</code> based on the configured <code>ONAPPapEngineFactory</code>.
23          * 
24          * @return a new <code>PAPPolicyEngine</code>
25          * @throws PAPException 
26          */
27         public abstract PAPPolicyEngine newEngine() throws FactoryException, PAPException;
28
29         /**
30          * Creates a new <code>PAPPolicyEngine</code> based on the configured <code>ONAPPapEngineFactory</code>.
31          * 
32          * @return a new <code>PAPPolicyEngine</code>
33          * @throws PAPException 
34          */
35         public abstract PAPPolicyEngine newEngine(Properties properties) throws FactoryException, PAPException;
36
37
38 }