Examples of RuleType


Examples of gov.nist.checklists.xccdf.x11.RuleType

                    if (item instanceof GroupType) {
                        GroupType node = (GroupType) item;
                  GroupImpl group = new GroupImpl(node, this);
                  addGroupInternal(group);
                    } else if (item instanceof RuleType) {
                      RuleType node = (RuleType) item;
                  RuleImpl rule = new RuleImpl(node, this);
                  addRuleInternal(rule);
                    }
                }
            } while (cursor.toNextSibling());
View Full Code Here

Examples of gov.nist.checklists.xccdf.x11.RuleType

                    if (item instanceof GroupType) {
                        GroupType node = (GroupType) item;
                  GroupImpl group = new GroupImpl(node, this);
                  addGroupInternal(group);
                    } else if (item instanceof RuleType) {
                      RuleType node = (RuleType) item;
                  RuleImpl rule = new RuleImpl(node, this);
                  addRuleInternal(rule);
                    }
                }
            } while (cursor.toNextSibling());
View Full Code Here

Examples of gov.nist.checklists.xccdf.x12.RuleType

                    if (item instanceof GroupType) {
                        GroupType node = (GroupType) item;
                  GroupImpl group = new GroupImpl(node, this);
                  addGroupInternal(group);
                    } else if (item instanceof RuleType) {
                      RuleType node = (RuleType) item;
                  RuleImpl rule = new RuleImpl(node, this);
                  addRuleInternal(rule);
                    }
                }
            } while (cursor.toNextSibling());
View Full Code Here

Examples of gov.nist.checklists.xccdf.x12.RuleType

                    if (item instanceof GroupType) {
                        GroupType node = (GroupType) item;
                  GroupImpl group = new GroupImpl(node, this);
                  addGroupInternal(group);
                    } else if (item instanceof RuleType) {
                      RuleType node = (RuleType) item;
                  RuleImpl rule = new RuleImpl(node, this);
                  addRuleInternal(rule);
                    }
                }
            } while (cursor.toNextSibling());
View Full Code Here

Examples of org.apache.commons.codec.language.bm.RuleType

    // we use common-codec's defaults: GENERIC + APPROX + true
    String nameTypeArg = args.get("nameType");
    NameType nameType = (nameTypeArg == null) ? NameType.GENERIC : NameType.valueOf(nameTypeArg);

    String ruleTypeArg = args.get("ruleType");
    RuleType ruleType = (ruleTypeArg == null) ? RuleType.APPROX : RuleType.valueOf(ruleTypeArg);
   
    boolean concat = getBoolean("concat", true);
    engine = new PhoneticEngine(nameType, ruleType, concat);
   
    // LanguageSet: defaults to automagic, otherwise a comma-separated list.
View Full Code Here

Examples of org.apache.commons.codec.language.bm.RuleType

  public BeiderMorseFilterFactory(Map<String,String> args) {
    super(args);
    // PhoneticEngine = NameType + RuleType + concat
    // we use common-codec's defaults: GENERIC + APPROX + true
    NameType nameType = NameType.valueOf(get(args, "nameType", NameType.GENERIC.toString()));
    RuleType ruleType = RuleType.valueOf(get(args, "ruleType", RuleType.APPROX.toString()));
   
    boolean concat = getBoolean(args, "concat", true);
    engine = new PhoneticEngine(nameType, ruleType, concat);
   
    // LanguageSet: defaults to automagic, otherwise a comma-separated list.
View Full Code Here

Examples of org.cipango.kaleo.policy.RuleType

      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

Examples of org.jboss.security.xacml.core.model.policy.RuleType

      targetType.setResources(resourcesType);

      policyType.setTarget(targetType);

      //Create a Rule
      RuleType permitRule = new RuleType();
      permitRule.setRuleId("ReadRule");
      permitRule.setEffect(EffectType.PERMIT);

      ActionsType permitRuleActionsType = new ActionsType();
      ActionType permitRuleActionType = new ActionType();

      ActionMatchType amct = new ActionMatchType();
      amct.setMatchId("urn:oasis:names:tc:xacml:1.0:function:string-equal");
      amct.setAttributeValue(PolicyAttributeFactory.createStringAttributeType("read"));
      amct.setActionAttributeDesignator(PolicyAttributeFactory.createAttributeDesignatorType(
            XACMLConstants.ATTRIBUTEID_ACTION_ID, XMLSchemaConstants.DATATYPE_STRING, null, false));
      permitRuleActionType.getActionMatch().add(amct);
      TargetType permitRuleTargetType = new TargetType();
      permitRuleActionsType.getAction().add(permitRuleActionType);
      permitRuleTargetType.setActions(permitRuleActionsType);
      permitRule.setTarget(permitRuleTargetType);

      ConditionType permitRuleConditionType = new ConditionType();
      FunctionType functionType = new FunctionType();
      functionType.setFunctionId(XACMLConstants.FUNCTION_STRING_EQUAL);
      JAXBElement<ExpressionType> jaxbElementFunctionType = objectFactory.createExpression(functionType);
      permitRuleConditionType.setExpression(jaxbElementFunctionType);

      ApplyType permitRuleApplyType = new ApplyType();
      permitRuleApplyType.setFunctionId(XACMLConstants.FUNCTION_STRING_IS_IN);

      SubjectAttributeDesignatorType sadt = PolicyAttributeFactory.createSubjectAttributeDesignatorType(
            XACMLConstants.ATTRIBUTEID_ROLE, XMLSchemaConstants.DATATYPE_STRING, null, false, null);
      JAXBElement<SubjectAttributeDesignatorType> sadtElement = objectFactory.createSubjectAttributeDesignator(sadt);
      AttributeValueType avt = PolicyAttributeFactory.createStringAttributeType("developer");
      JAXBElement<AttributeValueType> jaxbAVT = objectFactory.createAttributeValue(avt);
      permitRuleApplyType.getExpression().add(jaxbAVT);
      permitRuleApplyType.getExpression().add(sadtElement);

      permitRuleConditionType.setExpression(objectFactory.createApply(permitRuleApplyType));

      permitRule.setCondition(permitRuleConditionType);

      policyType.getCombinerParametersOrRuleCombinerParametersOrVariableDefinition().add(permitRule);
      //Create a Deny Rule
      RuleType denyRule = new RuleType();
      denyRule.setRuleId("DenyRule");
      denyRule.setEffect(EffectType.DENY);
      policyType.getCombinerParametersOrRuleCombinerParametersOrVariableDefinition().add(denyRule);

      return policyType;
   }
View Full Code Here

Examples of org.opensaml.xacml.policy.RuleType

        super();
    }

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        RuleType ruleType = (RuleType) xmlObject;

        if (!DatatypeHelper.isEmpty(ruleType.getRuleId())) {
            domElement.setAttribute(RuleType.RULE_ID_ATTRIB_NAME, ruleType.getRuleId());
        }
       
        if(!DatatypeHelper.isEmpty(ruleType.getEffect().toString())){
            if(ruleType.getEffect().equals(EffectType.Deny)){
                domElement.setAttribute(RuleType.EFFECT_ATTRIB_NAME,EffectType.Deny.toString());
            }else{
                domElement.setAttribute(RuleType.EFFECT_ATTRIB_NAME,EffectType.Permit.toString());
            }
        }
View Full Code Here

Examples of org.opensaml.xacml.policy.RuleType

    }

   
    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        RuleType ruleType = (RuleType) xmlObject;
     
        if(attribute.getLocalName().equals(RuleType.EFFECT_ATTRIB_NAME)){
            ruleType.setEffect(EffectType.valueOf(
                    DatatypeHelper.safeTrimOrNullString(attribute.getValue())));                      
        } else if(attribute.getLocalName().equals(RuleType.RULE_ID_ATTRIB_NAME)){
            ruleType.setRuleId(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
        } else {
            super.processAttribute(xmlObject, attribute);
        }

    }
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.