* @see XACMLConstants
*/
public JBossXACMLPolicy(InputStream is, int type, JBossPolicyFinder theFinder) throws Exception
{
AbstractPolicy policy = null;
XACMLPolicyUtil xpu = new XACMLPolicyUtil();
this.policyType = type;
if (type == XACMLPolicy.POLICYSET)
{
if (theFinder == null)
throw new IllegalArgumentException("policy finder is null");
this.finder = theFinder;
policy = xpu.createPolicySet(is, theFinder);
map.put(XACMLConstants.POLICY_FINDER, theFinder);
}
else if (type == XACMLPolicy.POLICY)
{
policy = xpu.createPolicy(is);
}
else
throw new RuntimeException("Unknown type");
map.put(XACMLConstants.UNDERLYING_POLICY, policy);