Examples of AbstractPolicy


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

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

      while (it.hasNext())
      {
         String fname = (String) (it.next());
         try
         {
            AbstractPolicy policy = reader.readPolicy(new FileInputStream(fname));
            policies.addPolicy(policy);
         }
         catch (FileNotFoundException fnfe)
         {
            if (logger.isLoggable(Level.WARNING))
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

        this.finder = finder;

        Iterator it = fileNames.iterator();
        while (it.hasNext()) {
            String fname = (String)(it.next());
            AbstractPolicy policy = loadPolicy(fname, finder,
                                               schemaFile, this);
            if (policy != null)
                policies.add(policy);
        }
    }
View Full Code Here

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

     * @param context the representation of the request data
     *
     * @return the result of trying to find an applicable policy
     */
    public PolicyFinderResult findPolicy(EvaluationCtx context) {
        AbstractPolicy selectedPolicy = null;
        Iterator it = policies.iterator();

        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());
View Full Code Here

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

     * @throws Exception if the policy cannot be loaded
     */
    public void setPolicies(String policyFile) throws Exception {
        policies.clear();

        AbstractPolicy policy = loadPolicy(policyFile, finder);
        if (policy == null)
            throw new Exception("failed to load policy");

        policies.add(policy);
    }
View Full Code Here

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

        Iterator it = policyFiles.iterator();
       
        policies.clear();

        while (it.hasNext()) {
            AbstractPolicy policy = loadPolicy((String)(it.next()), finder);
            if (policy == null)
                throw new Exception("failed to load policy");

            policies.add(policy);
        }
View Full Code Here

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

     * @param context the evaluation context
     *
     * @return an applicable policy, if one exists, or an error
     */
    public PolicyFinderResult findPolicy(EvaluationCtx context) {
        AbstractPolicy selectedPolicy = null;
        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());
View Full Code Here

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

            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 code = new ArrayList();
            code.add(Status.STATUS_PROCESSING_ERROR);
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.