/** * Creates a new {@code EvaluatedPolicyRuleType} instance by deeply copying a given {@code EvaluatedPolicyRuleType} instance. * * * @param o * The instance to copy. * @throws NullPointerException * if {@code o} is {@code null}. */ public EvaluatedPolicyRuleType(final EvaluatedPolicyRuleType o) { // CC-XJC Version 2.0 Build 2011-09-16T18:27:24+0000 super(); if (o == null) { throw new NullPointerException("Cannot create a copy of 'EvaluatedPolicyRuleType' from 'null'."); } // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.PolicyRuleType this.policyRule = ((o.policyRule == null)?null:((o.getPolicyRule() == null)?null:o.getPolicyRule().clone())); // CBuiltinLeafInfo: java.lang.String this.ruleName = ((o.ruleName == null)?null:o.getRuleName()); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentPathType this.assignmentPath = ((o.assignmentPath == null)?null:((o.getAssignmentPath() == null)?null:o.getAssignmentPath().clone())); // CClassInfo: com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType this.directOwnerRef = ((o.directOwnerRef == null)?null:((o.getDirectOwnerRef() == null)?null:o.getDirectOwnerRef().clone())); // CClassInfo: com.evolveum.prism.xml.ns._public.types_3.PolyStringType this.directOwnerDisplayName = ((o.directOwnerDisplayName == null)?null:((o.getDirectOwnerDisplayName() == null)?null:o.getDirectOwnerDisplayName().clone())); // 'Trigger' collection. if (o.trigger!= null) { copyTrigger(o.getTrigger(), this.getTrigger()); } }
/** * Create an instance of {@link EvaluatedPolicyRuleType } * */ public EvaluatedPolicyRuleType createEvaluatedPolicyRuleType() { return new EvaluatedPolicyRuleType(); }
public EvaluatedPolicyRuleType assignmentPath(AssignmentPathType value) { setAssignmentPath(value); return this; }
public void addToEvaluatedPolicyRuleTypes(Collection<EvaluatedPolicyRuleType> rules, PolicyRuleExternalizationOptions options, Predicate<EvaluatedPolicyRuleTrigger<?>> triggerSelector, PrismContext prismContext) { EvaluatedPolicyRuleType rv = new EvaluatedPolicyRuleType(); rv.setRuleName(getName()); boolean isFull = options.getTriggeredRulesStorageStrategy() == FULL; if (isFull && assignmentPath != null) { rv.setAssignmentPath(assignmentPath.toAssignmentPathType(options.isIncludeAssignmentsContent())); rv.setDirectOwnerRef(ObjectTypeUtil.createObjectRef(directOwner, prismContext)); rv.setDirectOwnerDisplayName(ObjectTypeUtil.getDisplayName(directOwner)); rv.getTrigger().add(trigger.toEvaluatedPolicyRuleTriggerType(options, prismContext)); if (rv.getTrigger().isEmpty()) {
public EvaluatedPolicyRuleType trigger(EvaluatedPolicyRuleTriggerType value) { getTrigger().add(value); return this; }
.directOwnerDisplayName("owner200") .ruleName("rule200"); EvaluatedPolicyRuleType sourceRule1 = new EvaluatedPolicyRuleType() .trigger(trigger1); EvaluatedPolicyRuleType sourceRule2 = new EvaluatedPolicyRuleType() .trigger(trigger2); List<EvaluatedPolicyRuleTriggerType> triggerListA = Arrays.asList( new EvaluatedSituationTriggerType()
public EvaluatedPolicyRuleType ruleName(String value) { setRuleName(value); return this; }
public EvaluatedPolicyRuleType directOwnerDisplayName(com.evolveum.prism.xml.ns._public.types_3.PolyStringType value) { setDirectOwnerDisplayName(value); return this; }
public EvaluatedPolicyRuleType directOwnerRef(ObjectReferenceType value) { setDirectOwnerRef(value); return this; }
public EvaluatedPolicyRuleTriggerType beginTrigger() { EvaluatedPolicyRuleTriggerType value = new EvaluatedPolicyRuleTriggerType(); trigger(value); return value; }
private static void getExclusionTriggersFromRule(List<EvaluatedExclusionTriggerType> rv, EvaluatedPolicyRuleType rule) { getExclusionTriggersFromTriggers(rv, rule.getTrigger()); }
/** * Create an instance of {@link EvaluatedPolicyRuleType } * */ public EvaluatedPolicyRuleType createEvaluatedPolicyRuleType() { return new EvaluatedPolicyRuleType(); }
clone.policyRule = ((this.policyRule == null)?null:((this.getPolicyRule() == null)?null:this.getPolicyRule().clone())); clone.ruleName = ((this.ruleName == null)?null:this.getRuleName()); clone.assignmentPath = ((this.assignmentPath == null)?null:((this.getAssignmentPath() == null)?null:this.getAssignmentPath().clone())); clone.directOwnerRef = ((this.directOwnerRef == null)?null:((this.getDirectOwnerRef() == null)?null:this.getDirectOwnerRef().clone())); clone.directOwnerDisplayName = ((this.directOwnerDisplayName == null)?null:((this.getDirectOwnerDisplayName() == null)?null:this.getDirectOwnerDisplayName().clone())); copyTrigger(this.getTrigger(), clone.getTrigger());
private static List<EvaluatedPolicyRuleTriggerType> getChildTriggers(EvaluatedPolicyRuleTriggerType trigger) { if (trigger instanceof EvaluatedEmbeddingTriggerType) { return ((EvaluatedEmbeddingTriggerType) trigger).getEmbedded(); } else if (trigger instanceof EvaluatedSituationTriggerType) { List<EvaluatedPolicyRuleTriggerType> rv = new ArrayList<>(); for (EvaluatedPolicyRuleType rule : ((EvaluatedSituationTriggerType) trigger).getSourceRule()) { rv.addAll(rule.getTrigger()); } return rv; } else { return Collections.emptyList(); } } //endregion
/** * Create an instance of {@link EvaluatedPolicyRuleType } * */ public EvaluatedPolicyRuleType createEvaluatedPolicyRuleType() { return new EvaluatedPolicyRuleType(); }
thePolicyRule = this.getPolicyRule(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "policyRule", thePolicyRule), currentHashCode, thePolicyRule); theRuleName = this.getRuleName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "ruleName", theRuleName), currentHashCode, theRuleName); theAssignmentPath = this.getAssignmentPath(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "assignmentPath", theAssignmentPath), currentHashCode, theAssignmentPath); theDirectOwnerRef = this.getDirectOwnerRef(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "directOwnerRef", theDirectOwnerRef), currentHashCode, theDirectOwnerRef); theDirectOwnerDisplayName = this.getDirectOwnerDisplayName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "directOwnerDisplayName", theDirectOwnerDisplayName), currentHashCode, theDirectOwnerDisplayName); theTrigger = (((this.trigger!= null)&&(!this.trigger.isEmpty()))?this.getTrigger():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "trigger", theTrigger), currentHashCode, theTrigger);
public static void visit(List<EvaluatedPolicyRuleTriggerType> triggers, Consumer<EvaluatedPolicyRuleTriggerType> visitor) { for (EvaluatedPolicyRuleTriggerType trigger : triggers) { visitor.accept(trigger); if (trigger instanceof EvaluatedSituationTriggerType) { EvaluatedSituationTriggerType situationTrigger = (EvaluatedSituationTriggerType) trigger; for (EvaluatedPolicyRuleType sourceRule : situationTrigger.getSourceRule()) { visit(sourceRule.getTrigger(), visitor); } } } }
public EvaluatedPolicyRuleType beginTriggeredPolicyRule() { EvaluatedPolicyRuleType value = new EvaluatedPolicyRuleType(); triggeredPolicyRule(value); return value; }
lhsPolicyRule = this.getPolicyRule(); PolicyRuleType rhsPolicyRule; rhsPolicyRule = that.getPolicyRule(); if (!strategy.equals(LocatorUtils.property(thisLocator, "policyRule", lhsPolicyRule), LocatorUtils.property(thatLocator, "policyRule", rhsPolicyRule), lhsPolicyRule, rhsPolicyRule)) { return false; lhsRuleName = this.getRuleName(); String rhsRuleName; rhsRuleName = that.getRuleName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "ruleName", lhsRuleName), LocatorUtils.property(thatLocator, "ruleName", rhsRuleName), lhsRuleName, rhsRuleName)) { return false; lhsAssignmentPath = this.getAssignmentPath(); AssignmentPathType rhsAssignmentPath; rhsAssignmentPath = that.getAssignmentPath(); if (!strategy.equals(LocatorUtils.property(thisLocator, "assignmentPath", lhsAssignmentPath), LocatorUtils.property(thatLocator, "assignmentPath", rhsAssignmentPath), lhsAssignmentPath, rhsAssignmentPath)) { return false; lhsDirectOwnerRef = this.getDirectOwnerRef(); ObjectReferenceType rhsDirectOwnerRef; rhsDirectOwnerRef = that.getDirectOwnerRef(); if (!strategy.equals(LocatorUtils.property(thisLocator, "directOwnerRef", lhsDirectOwnerRef), LocatorUtils.property(thatLocator, "directOwnerRef", rhsDirectOwnerRef), lhsDirectOwnerRef, rhsDirectOwnerRef)) { return false; lhsDirectOwnerDisplayName = this.getDirectOwnerDisplayName(); com.evolveum.prism.xml.ns._public.types_3.PolyStringType rhsDirectOwnerDisplayName; rhsDirectOwnerDisplayName = that.getDirectOwnerDisplayName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "directOwnerDisplayName", lhsDirectOwnerDisplayName), LocatorUtils.property(thatLocator, "directOwnerDisplayName", rhsDirectOwnerDisplayName), lhsDirectOwnerDisplayName, rhsDirectOwnerDisplayName)) { return false;
triggers.addAll(entry.getRule().getTrigger());