Examples of AbstractPolicy


Examples of com.sun.xacml.AbstractPolicy

       Iterator it = policyList.iterator();
       while (it.hasNext())
       {
           String str = (String)(it.next());
           AbstractPolicy policy = null;
           try
           {
              try
              {
                      // first try to load it as a URL
View Full Code Here

Examples of com.sun.xacml.AbstractPolicy

     
       try
       {
          if(this.encounteredParsingException)
             return new PolicyFinderResult(new Status(aList));
           AbstractPolicy policy = policies.getPolicy(context);

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

Examples of com.sun.xacml.AbstractPolicy

  {
    final DocumentSet mainPolicyDocs = XACMLUtil.getPolicyDocuments(broker, false);
    if(mainPolicyDocs == null)
      {return new PolicyFinderResult();}

    AbstractPolicy matchedPolicy = null;
    AbstractPolicy policy;
    MatchResult match;
    int result;
    try
    {
      final XACMLUtil util = pdp.getUtil();
      for(final Iterator<DocumentImpl> it = mainPolicyDocs.getDocumentIterator(); it.hasNext();)
      {
        policy = util.getPolicyDocument(it.next());
        match = policy.match(context);
        result = match.getResult();
        if(result == MatchResult.INDETERMINATE)
          {return new PolicyFinderResult(match.getStatus());}
        else if(result == MatchResult.MATCH)
        {
View Full Code Here

Examples of com.sun.xacml.AbstractPolicy

    final BrokerPool pool = pdp.getBrokerPool();
    DBBroker broker = null;
    try
    {
      broker = pool.get(pool.getSecurityManager().getSystemSubject());
      final AbstractPolicy policy = pdp.getUtil().findPolicy(broker, idReference, type);
      return (policy == null) ? new PolicyFinderResult() : new PolicyFinderResult(policy);
    }
    catch(final Exception e)
    {
      return XACMLUtil.errorResult("Error resolving id '" + idReference.toString() + "': " + e.getMessage(), e);
View Full Code Here

Examples of com.sun.xacml.AbstractPolicy

  */
  public AbstractPolicy getPolicyDocument(DocumentImpl policyDoc) throws ParsingException
  {
    //TODO: use xmldbUri
    final String name = policyDoc.getURI().toString();
    AbstractPolicy policy = (AbstractPolicy)POLICY_CACHE.get(name);
    if(policy == null)
    {
      policy = parsePolicyDocument(policyDoc);
      POLICY_CACHE.put(name, policy);
    }
View Full Code Here

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

         PolicySetFinderModule psfm)
   {
      List<XACMLPolicy> policyList = policy.getEnclosingPolicies();
      for (XACMLPolicy xp : policyList)
      {
         AbstractPolicy p = xp.get(XACMLConstants.UNDERLYING_POLICY);
         if (p instanceof Policy)
            policies.add((Policy) p);
         else if (p instanceof PolicySet)
         {
            policySets.add((PolicySet) p);
View Full Code Here

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

     * @return an applicable policy, if one exists, or an error
     */
   @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)
View Full Code Here

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

    * @throws Exception
    * @see XACMLConstants
    */
   public JBossXACMLPolicy(InputStream is, int type) throws Exception
   {
      AbstractPolicy policy = null;
      XACMLPolicyUtil xpu = new XACMLPolicyUtil();
      this.policyType = type;
      if(type == XACMLPolicy.POLICYSET)
      {
         policy = xpu.createPolicySet(is, finder)
View Full Code Here

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

    * @throws Exception
    * @see XACMLConstants
    */
   public JBossXACMLPolicy(InputStream is, int type, JBossPolicyFinder theFinder) throws Exception
   {
      AbstractPolicy policy = null;
      XACMLPolicyUtil xpu = new XACMLPolicyUtil();
      this.policyType = type;
      if(type == XACMLPolicy.POLICYSET)
      {
         if(theFinder == null)
View Full Code Here

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

     * @param output a stream into which the XML-encoded data is written
     * @param indenter an object that creates indentation strings
     */
    public void encode(OutputStream output, Indenter indenter) {
        if (! getParameters().isEmpty()) {
            AbstractPolicy policy = getPolicy();

            // FIXME: This is ugly and happens in several places...maybe this
            // should get folded into the AbstractPolicy API?
            if (policy instanceof Policy) {
                encodeParamaters(output, indenter, "Policy",
                                 policy.getId().toString());
            } else if (policy instanceof PolicySet) {
                encodeParamaters(output, indenter, "PolicySet",
                                 policy.getId().toString());
            } else {
                PolicyReference ref = (PolicyReference)policy;
                if (ref.getReferenceType() == PolicyReference.POLICY_REFERENCE)
                    encodeParamaters(output, indenter, "Policy",
                                     ref.getReference().toString());
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.