Package com.sun.xacml.finder

Examples of com.sun.xacml.finder.PolicyFinderResult


        // based on the type, see if we have any references available, and
        // if we do then get the filename
        if (type == PolicyReference.POLICY_REFERENCE) {
            if (policyRefs == null)
                return new PolicyFinderResult();

            fileName = (String) (policyRefs.get(idReference.toString()));
        } else {
            if (policySetRefs == null)
                return new PolicyFinderResult();

            fileName = (String) (policySetRefs.get(idReference.toString()));
        }

        // if we had no mapping available, return with no referenced policy
        if (fileName == null)
            return new PolicyFinderResult();

        // append the correct prefix to the filename
        if (type == PolicyReference.POLICY_REFERENCE)
            fileName = policyRefPrefix + fileName;
        else
            fileName = policySetRefPrefix + fileName;

        // load the referenced policy
        AbstractPolicy policy = loadPolicy(fileName, finder);

        // if there was an error loading the policy, return the error
        if (policy == null) {
            ArrayList<String> code = new ArrayList<String>();
            code.add(Status.STATUS_PROCESSING_ERROR);
            Status status = new Status(code, "couldn't load referenced policy");
            return new PolicyFinderResult(status);
        }

        // return the referenced policy
        return new PolicyFinderResult(policy);
    }
View Full Code Here


    public PolicyFinderResult findPolicy(EvaluationCtx context) {
        try {
            AbstractPolicy policy = policiesByRequest.getPolicy(context);

            if (policy == null)
                return new PolicyFinderResult();
            else
                return new PolicyFinderResult(policy);
        } catch (TopLevelPolicyException tlpe) {
            return new PolicyFinderResult(tlpe.getStatus());
        }

    }
View Full Code Here

        AbstractPolicy policy = policiesByReference.getPolicy(idReference.toString(), type,
                constraints);

        if (policy == null)
            return new PolicyFinderResult();
        else
            return new PolicyFinderResult(policy);
    }
View Full Code Here

TOP

Related Classes of com.sun.xacml.finder.PolicyFinderResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.