Package org.jboss.security.xacml.sunxacml.finder

Examples of org.jboss.security.xacml.sunxacml.finder.PolicyFinderResult


   /**
    * @see PolicyFinderModule#findPolicy(com.sun.xacml.EvaluationCtx)
    */
   public PolicyFinderResult findPolicy(EvaluationCtx evaluationCtx)
   {
      return new PolicyFinderResult(policy);
   }
View Full Code Here


    *        com.sun.xacml.VersionConstraints, com.sun.xacml.PolicyMetaData)
    */
   public PolicyFinderResult findPolicy(URI arg0, int arg1,
         VersionConstraints arg2, PolicyMetaData arg3)
   {
      return new PolicyFinderResult(policy);
   }
View Full Code Here

      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
         if (selectedPolicy != null)
         {
            // we found a match before, so this is an error
            ArrayList<String> code = new ArrayList<String>();
            code.add(Status.STATUS_PROCESSING_ERROR);
            Status status = new Status(code, "too many applicable " + "top-level policies");
            return new PolicyFinderResult(status);
         }

         // this is the first match we've found, so remember it
         selectedPolicy = policySet;
      }

      // return the single applicable policy (if there was one)
      return new PolicyFinderResult(selectedPolicy);
   }
View Full Code Here

         PolicyMetaData parentMetaData)
   {
      for (Policy p : policies)
      {
         if (p.getId().compareTo(idReference) == 0)
            return new PolicyFinderResult(p);
      }
      for (PolicySet p : policySets)
      {
         if (p.getId().compareTo(idReference) == 0)
            return new PolicyFinderResult(p);
      }
      return new PolicyFinderResult();
   }
View Full Code Here

     * A private helper routine that resolves a policy for the given
     * context, and then tries to evaluate based on the policy
     */
    private Result evaluateContext(EvaluationCtx context) {
        // first off, try to find a policy
        PolicyFinderResult finderResult = policyFinder.findPolicy(context);

        // see if there weren't any applicable policies
        if (finderResult.notApplicable())
            return new Result(Result.DECISION_NOT_APPLICABLE,
                              context.getResourceId().encode());

        // see if there were any errors in trying to get a policy
        if (finderResult.indeterminate())
            return new Result(Result.DECISION_INDETERMINATE,
                              finderResult.getStatus(),
                              context.getResourceId().encode());

        // we found a valid policy, so we can do the evaluation
        return finderResult.getPolicy().evaluate(context);
    }
View Full Code Here

      try
      {
         AbstractPolicy policy = policies.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

      try
      {
         AbstractPolicy policy = ctxPolicies.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

         PolicyMetaData parentMetaData)
   {
      AbstractPolicy policy = refPolicies.getPolicy(idReference.toString(), type, constraints);

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

         PolicyMetaData parentMetaData)
   {
      AbstractPolicy policy = policies.getPolicy(idReference.toString(), type, constraints);

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

   {
      try
      {
         AbstractPolicy policy = policies.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

TOP

Related Classes of org.jboss.security.xacml.sunxacml.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.