Examples of AbstractPolicy


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

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

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

      // if there was an error loading the policy, return the error
      if (policy == null) {
          ArrayList code = new ArrayList();
          code.add(Status.STATUS_PROCESSING_ERROR);
View Full Code Here

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

      Iterator it = policyList.iterator();
      while (it.hasNext())
      {
         String str = (String) (it.next());
         AbstractPolicy policy = null;

         try
         {
            try
            {
View Full Code Here

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

    */
   public PolicyFinderResult findPolicy(EvaluationCtx context)
   {
      try
      {
         AbstractPolicy policy = policies.getPolicy(context);

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

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

         // it's not a URL, so we can't handle this reference
         return new PolicyFinderResult();
      }

      // try resolving the URL
      AbstractPolicy policy = null;
      try
      {
         policy = reader.readPolicy(url);
      }
      catch (ParsingException pe)
      {
         // An error loading the policy could be many things (the URL
         // doesn't actually resolve a policy, the server is down, the
         // policy is invalid, etc.). This could be interpreted as an
         // error case, or simply as a case where no applicable policy
         // is available (as is done when we pre-load policies). This
         // module chooses the latter interpretation.
         return new PolicyFinderResult();
      }

      // check that we got the right kind of policy...if we didn't, then
      // we can't handle the reference
      if (type == PolicyReference.POLICY_REFERENCE)
      {
         if (!(policy instanceof Policy))
            return new PolicyFinderResult();
      }
      else
      {
         if (!(policy instanceof PolicySet))
            return new PolicyFinderResult();
      }

      // finally, check that the constraints match ... note that in a more
      // powerful module, you could actually have used the constraints to
      // construct a more specific URL, passed the constraints to the
      // server, etc., but this example module is staying simple
      if (!constraints.meetsConstraint(policy.getVersion()))
         return new PolicyFinderResult();

      // if we got here, then we successfully resolved a policy that is
      // the correct type, so return it
      return new PolicyFinderResult(policy);
View Full Code Here

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

    */
   public PolicyFinderResult findPolicy(EvaluationCtx context)
   {
      try
      {
         AbstractPolicy policy = ctxPolicies.getPolicy(context);

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

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

    * @return the result of looking for a matching policy
    */
   public PolicyFinderResult findPolicy(URI idReference, int type, VersionConstraints constraints,
         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

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

      Iterator it = policies.values().iterator();

      while (it.hasNext())
      {
         // 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());
View Full Code Here

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

      // walk through the set starting with the most recent version, looking
      // for a match until we exhaust all known versions
      Iterator it = set.iterator();
      while (it.hasNext())
      {
         AbstractPolicy policy = (AbstractPolicy) (it.next());
         if (constraints.meetsConstraint(policy.getVersion()))
         {
            // we found a valid version, so see if it's the right kind,
            // and if it is then we return it
            if (type == PolicyReference.POLICY_REFERENCE)
            {
View Full Code Here

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

      Iterator it = policyList.iterator();
      while (it.hasNext())
      {
         String str = (String) (it.next());
         AbstractPolicy policy = null;

         try
         {
            try
            {
View Full Code Here

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

    * @return the result of looking for a matching policy
    */
   public PolicyFinderResult findPolicy(URI idReference, int type, VersionConstraints constraints,
         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
TOP
Copyright © 2018 www.massapi.com. 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.