Package org.jboss.security.xacml.sunxacml

Examples of org.jboss.security.xacml.sunxacml.MatchResult


     */
   @Override
   public PolicyFinderResult findPolicy(EvaluationCtx context)
   {
      AbstractPolicy selectedPolicy = null;
      MatchResult match = policySet.match(context);
      int result = match.getResult();

      // if target matching was indeterminate, then return the error
      if (result == MatchResult.INDETERMINATE)
         return new PolicyFinderResult(match.getStatus());

      // see if the target matched
      if (result == MatchResult.MATCH)
      {
         // see if we previously found another match
View Full Code Here


        while (it.hasNext()) {
            AbstractPolicy policy =
                ((PolicyCombinerElement)(it.next())).getPolicy();

            // make sure that the policy matches the context
            MatchResult match = policy.match(context);

            if (match.getResult() == MatchResult.INDETERMINATE)
                return new Result(Result.DECISION_DENY,
                                  context.getResourceId().encode());

            if (match.getResult() == MatchResult.MATCH) {
                // evaluate the policy
                Result result = policy.evaluate(context);
                int effect = result.getDecision();
               
                // unlike in the RuleCombining version of this alg, we always
View Full Code Here

        while (it.hasNext()) {
            AbstractPolicy policy =
                ((PolicyCombinerElement)(it.next())).getPolicy();

            // see if the policy matches the context
            MatchResult match = policy.match(context);
            int result = match.getResult();

            // if there is an error in trying to match any of the targets,
            // we always return INDETERMINATE immediately
            if (result == MatchResult.INDETERMINATE)
                return new Result(Result.DECISION_INDETERMINATE,
                                  match.getStatus(),
                                  context.getResourceId().encode());
           
            if (result == MatchResult.MATCH) {
                // if this isn't the first match, then this is an error
                if (atLeastOne) {
View Full Code Here

        while (it.hasNext()) {
            AbstractPolicy policy =
                ((PolicyCombinerElement)(it.next())).getPolicy();

            // make sure that the policy matches the context
            MatchResult match = policy.match(context);

            if (match.getResult() == MatchResult.INDETERMINATE)
                return new Result(Result.DECISION_INDETERMINATE,
                                  match.getStatus(),
                                  context.getResourceId().encode());

            if (match.getResult() == MatchResult.MATCH) {
                // evaluate the policy
                Result result = policy.evaluate(context);
                int effect = result.getDecision();
               
                // in the case of PERMIT, DENY, or INDETERMINATE, we always
View Full Code Here

        while (it.hasNext()) {
            AbstractPolicy policy =
                ((PolicyCombinerElement)(it.next())).getPolicy();

            // make sure that the policy matches the context
            MatchResult match = policy.match(context);

            if (match.getResult() == MatchResult.INDETERMINATE) {
                atLeastOneError = true;
               
                // keep track of the first error, regardless of cause
                if (firstIndeterminateStatus == null)
                    firstIndeterminateStatus = match.getStatus();
            } else if (match.getResult() == MatchResult.MATCH) {
                // now we evaluate the policy
                Result result = policy.evaluate(context);
                int effect = result.getDecision();
               
                // this is a little different from DenyOverrides...
View Full Code Here

      {
         // for each identifier, get only the most recent policy
         AbstractPolicy policy = (AbstractPolicy) (((TreeSet) (it.next())).first());

         // see if we match
         MatchResult match = policy.match(context);
         int result = match.getResult();

         // if there was an error, we stop right away
         if (result == MatchResult.INDETERMINATE)
            throw new TopLevelPolicyException(match.getStatus());

         // if we matched, we keep track of the matching policy...
         if (result == MatchResult.MATCH)
         {
            // ...first checking if this is the first match and if
View Full Code Here

        while (it.hasNext()) {
            AbstractPolicy policy = (AbstractPolicy)(it.next());

            // see if we match
            MatchResult match = policy.match(context);
            int result = match.getResult();
           
            // if there was an error, we stop right away
            if (result == MatchResult.INDETERMINATE)
                return new PolicyFinderResult(match.getStatus());

            if (result == MatchResult.MATCH) {
                // if we matched before, this is an error...
                if (selectedPolicy != null) {
                    ArrayList code = new ArrayList();
View Full Code Here

        Iterator it = policies.iterator();

        // iterate through all the policies we currently have loaded
        while (it.hasNext()) {
            AbstractPolicy policy = (AbstractPolicy)(it.next());
            MatchResult match = policy.match(context);
            int result = match.getResult();

            // if target matching was indeterminate, then return the error
            if (result == MatchResult.INDETERMINATE)
                return new PolicyFinderResult(match.getStatus());

            // see if the target matched
            if (result == MatchResult.MATCH) {
                // see if we previously found another match
                if (selectedPolicy != null) {
View Full Code Here

      {
         // for each identifier, get only the most recent policy
         AbstractPolicy policy = (AbstractPolicy) (((TreeSet) (it.next())).first());

         // see if we match
         MatchResult match = policy.match(context);
         int result = match.getResult();

         // if there was an error, we stop right away
         if (result == MatchResult.INDETERMINATE)
            throw new TopLevelPolicyException(match.getStatus());

         // if we matched, we keep track of the matching policy...
         if (result == MatchResult.MATCH)
         {
            // ...first checking if this is the first match and if
View Full Code Here

        while (it.hasNext()) {
            AbstractPolicy policy =
                ((PolicyCombinerElement)(it.next())).getPolicy();

            // make sure that the policy matches the context
            MatchResult match = policy.match(context);

            if (match.getResult() == MatchResult.INDETERMINATE)
                return new Result(Result.DECISION_DENY,
                                  context.getResourceId().encode());

            if (match.getResult() == MatchResult.MATCH) {
                // evaluate the policy
                Result result = policy.evaluate(context);
                int effect = result.getDecision();
               
                // unlike in the RuleCombining version of this alg, we always
View Full Code Here

TOP

Related Classes of org.jboss.security.xacml.sunxacml.MatchResult

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.