Package com.sun.xacml.attr

Examples of com.sun.xacml.attr.BooleanAttribute


        // if it was indeterminate, then that's what we return immediately
        if (result.indeterminate())
            return new MatchResult(MatchResult.INDETERMINATE, result.getStatus());

        // otherwise, we figure out if it was a match
        BooleanAttribute bool = (BooleanAttribute) (result.getAttributeValue());

        if (bool.getValue())
            return new MatchResult(MatchResult.MATCH);
        else
            return new MatchResult(MatchResult.NO_MATCH);
    }
View Full Code Here


     * Private helper for any & all functions
     */
    private EvaluationResult anyAndAllHelper(AttributeValue value, BagAttribute bag,
            Function function, EvaluationCtx context, boolean allFunction,
            boolean argumentsAreSwapped) {
        BooleanAttribute attr = BooleanAttribute.getInstance(allFunction);
        Iterator<AttributeValue> it = bag.iterator();

        while (it.hasNext()) {
            List<AttributeValue> params = new ArrayList<AttributeValue>();

            if (!argumentsAreSwapped) {
                params.add(value);
                params.add((AttributeValue) (it.next()));
            } else {
                params.add((AttributeValue) (it.next()));
                params.add(value);
            }

            EvaluationResult result = function.evaluate(params, context);

            if (result.indeterminate())
                return result;

            BooleanAttribute bool = (BooleanAttribute) (result.getAttributeValue());
            if (bool.getValue() != allFunction) {
                attr = bool;
                break;
            }
        }

View Full Code Here

            // if it was INDETERMINATE, then that's what we return
            return new Result(Result.DECISION_INDETERMINATE, result.getStatus(), context
                    .getResourceId().encode());
        } else {
            // otherwise we return the effect on tue, and NA on false
            BooleanAttribute bool = (BooleanAttribute) (result.getAttributeValue());

            if (bool.getValue())
                return new Result(effectAttr, context.getResourceId().encode());
            else
                return new Result(Result.DECISION_NOT_APPLICABLE, context.getResourceId().encode());
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.xacml.attr.BooleanAttribute

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.