@Override public CallbackResult onAdvice(Object parent, AdviceExpressionType expression, Advice advice) { if (this.adviceMap == null) { this.adviceMap = new HashMap<Identifier, Map<EffectType, List<Advice>>>(); } if (this.adviceMap.containsKey(advice.getId()) == false) { this.adviceMap.put(advice.getId(), new HashMap<EffectType, List<Advice>>()); } if (this.adviceMap.get(advice.getId()).get(expression.getAppliesTo()) == null) { this.adviceMap.get(advice.getId()).put(expression.getAppliesTo(), new ArrayList<Advice>()); } if (this.adviceMap.get(advice.getId()).get(expression.getAppliesTo()).contains(advice) == false) { this.adviceMap.get(advice.getId()).get(expression.getAppliesTo()).add(advice); } return super.onAdvice(parent, expression, advice); }
@Override public CallbackResult onVariable(PolicyType policy, VariableDefinitionType variable) { if (this.variableDefinitionMap == null) { this.variableDefinitionMap = new HashMap<PolicyType, List<VariableDefinitionType>>(); } if (this.variableDefinitionMap.containsKey(policy) == false) { this.variableDefinitionMap.put(policy, new ArrayList<VariableDefinitionType>()); } this.variableDefinitionMap.get(policy).add(variable); if (variable.getExpression() != null) { this.evaluteExpression(variable.getExpression().getValue(), policy, variable); } return super.onVariable(policy, variable); }
return super.onAttribute(parent, container, attribute);
return super.onAttribute(parent, container, attribute);
return super.onObligation(parent, expression, obligation);
return super.onObligation(parent, expression, obligation);
@Override public CallbackResult onAdvice(Object parent, AdviceExpressionType expression, Advice advice) { if (this.adviceMap == null) { this.adviceMap = new HashMap<Identifier, Map<EffectType, List<Advice>>>(); } if (this.adviceMap.containsKey(advice.getId()) == false) { this.adviceMap.put(advice.getId(), new HashMap<EffectType, List<Advice>>()); } if (this.adviceMap.get(advice.getId()).get(expression.getAppliesTo()) == null) { this.adviceMap.get(advice.getId()).put(expression.getAppliesTo(), new ArrayList<Advice>()); } if (this.adviceMap.get(advice.getId()).get(expression.getAppliesTo()).contains(advice) == false) { this.adviceMap.get(advice.getId()).get(expression.getAppliesTo()).add(advice); } return super.onAdvice(parent, expression, advice); }
@Override public CallbackResult onVariable(PolicyType policy, VariableDefinitionType variable) { if (this.variableDefinitionMap == null) { this.variableDefinitionMap = new HashMap<PolicyType, List<VariableDefinitionType>>(); } if (this.variableDefinitionMap.containsKey(policy) == false) { this.variableDefinitionMap.put(policy, new ArrayList<VariableDefinitionType>()); } this.variableDefinitionMap.get(policy).add(variable); if (variable.getExpression() != null) { this.evaluteExpression(variable.getExpression().getValue(), policy, variable); } return super.onVariable(policy, variable); }
@Override public CallbackResult onCondition(RuleType rule, ConditionType condition) { if (condition.getExpression() != null) { this.evaluteExpression(condition.getExpression().getValue(), rule, condition); } return super.onCondition(rule, condition); }
@Override public CallbackResult onCondition(RuleType rule, ConditionType condition) { if (condition.getExpression() != null) { this.evaluteExpression(condition.getExpression().getValue(), rule, condition); } return super.onCondition(rule, condition); }