Package org.cipango.kaleo.policy.RulesetDocument

Examples of org.cipango.kaleo.policy.RulesetDocument.Ruleset


  {
    try
    {
      XcapUri xcapUri = _xcapResources.get(0);
      XcapResource xcapResource = _xcapService.getResource(xcapUri, false, null, null);
      Ruleset ruleset = RulesetDocument.Factory.parse(xcapResource.getSelectedResource().getDom()).getRuleset();
      SubHandling best = null;
      String domain = null;
      if (subscriberUri.indexOf('@') != -1)
        domain = subscriberUri.substring(subscriberUri.indexOf('@') + 1);
     
      for (int i = 0; i < ruleset.getRuleArray().length; i++)
      {
        RuleType rule = ruleset.getRuleArray(i);
        if (match(rule.getConditions(), subscriberUri, domain))
        {
          SubHandling subHandling = getSubHandling(rule.getActions());
          if (best == null || subHandling.getValue() > best.getValue())
            best = subHandling;
        }
      }
      if (best == null)
      {
        for (int i = 0; i < ruleset.getRuleArray().length; i++)
        {
          RuleType rule = ruleset.getRuleArray(i);
          if (matchOma(rule.getConditions(), subscriberUri))
          {
            SubHandling subHandling = getSubHandling(rule.getActions());
            if (best == null || subHandling.getValue() > best.getValue())
              best = subHandling;
          }
        }
      }
      if (best == null)
      {
        for (int i = 0; i < ruleset.getRuleArray().length; i++)
        {
          RuleType rule = ruleset.getRuleArray(i);
          if (matchOmaOtherIdentity(rule.getConditions()))
          {
            SubHandling subHandling = getSubHandling(rule.getActions());
            if (best == null || subHandling.getValue() > best.getValue())
              best = subHandling;
View Full Code Here

TOP

Related Classes of org.cipango.kaleo.policy.RulesetDocument.Ruleset

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.