static ExtensionType collectExtensions(AssignmentPathType path, int startAt, ModelService modelService, Task task, OperationResult result) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException { return AssignmentPathUtil.collectExtensions(path, startAt, modelService, task, result); }
@Override public List<TreeNode<LocalizableMessage>> extractMessages() { return EvaluatedPolicyRuleUtil.extractMessages(triggers, EvaluatedPolicyRuleUtil.MessageKind.NORMAL); }
public static boolean limitationsAllow(List<OtherPrivilegesLimitationType> limitations, QName itemName, AbstractWorkItemType workItem) { return limitationsAllow(limitations, itemName); // temporary solution; we do not use work items selectors yet } }
private static <AD extends AdditionalData> void arrangeForPresentationExt(TreeNode<AugmentedTrigger<AD>> root, AugmentedTrigger<AD> trigger, AdditionalFilter<AD> additionalFilter) { boolean hidden = isHidden(trigger.trigger); boolean isFinal = Boolean.TRUE.equals(trigger.trigger.isFinal()); if (!hidden) { if (additionalFilter != null && !additionalFilter.accepts(trigger)) { return; } TreeNode<AugmentedTrigger<AD>> newNode = new TreeNode<>(trigger); root.add(newNode); root = newNode; } if (!isFinal) { // it's possible that this was pre-filtered e.g. by policy enforcer hook for (EvaluatedPolicyRuleTriggerType innerTrigger : getChildTriggers(trigger.trigger)) { arrangeForPresentationExt(root, new AugmentedTrigger<>(innerTrigger, trigger.additionalData), additionalFilter); } } }
@NotNull public static List<TreeNode<LocalizableMessage>> extractMessages(Collection<EvaluatedPolicyRuleTrigger<?>> triggers, MessageKind kind) { return extractMessages(arrangeForPresentationInt(triggers), kind); }
public static <AD extends AdditionalData> List<TreeNode<AugmentedTrigger<AD>>> arrangeForPresentationExt( List<AugmentedTrigger<AD>> triggers, AdditionalFilter<AD> additionalFilter) { TreeNode<AugmentedTrigger<AD>> root = new TreeNode<>(); for (AugmentedTrigger<AD> trigger : triggers) { arrangeForPresentationExt(root, trigger, additionalFilter); } sortTriggersExt(root); return root.getChildren(); }
@Override public String debugDump() { return debugDump(0); }
public static <O extends ObjectType> LifecycleStateModelType determineLifecycleModel(PrismObject<O> object, SystemConfigurationType systemConfigurationType) throws ConfigurationException { ObjectPolicyConfigurationType objectPolicyConfiguration = determineObjectPolicyConfiguration(object, systemConfigurationType); if (objectPolicyConfiguration == null) { return null; } return objectPolicyConfiguration.getLifecycleStateModel(); }
/** * Arranges triggers into trees according to presentation instructions (hidden, final, displayOrder). */ public static List<TreeNode<EvaluatedPolicyRuleTrigger<?>>> arrangeForPresentationInt(Collection<EvaluatedPolicyRuleTrigger<?>> triggers) { TreeNode<EvaluatedPolicyRuleTrigger<?>> root = new TreeNode<>(); for (EvaluatedPolicyRuleTrigger<?> trigger : triggers) { arrangeForPresentationInt(root, trigger); } sortTriggersInt(root); return root.getChildren(); }
public static <O extends ObjectType> LifecycleStateModelType determineLifecycleModel(PrismObject<O> object, PrismObject<SystemConfigurationType> systemConfiguration) throws ConfigurationException { if (systemConfiguration == null) { return null; } return determineLifecycleModel(object, systemConfiguration.asObjectable()); }
private static boolean isHidden(PolicyConstraintPresentationType presentation, PolicyConstraintKindType kind) { if (presentation != null && presentation.isHidden() != null) { return presentation.isHidden(); } else { return isHiddenByDefault(kind); } }
public <F extends ObjectType> void clockworkFinish(LensContext<F> context) { ClockworkInspector clockworkInspector = getClockworkInspector(); if (clockworkInspector != null) { clockworkInspector.clockworkFinish(context); } }
public <F extends ObjectType> void clockworkStart(LensContext<F> context) { ClockworkInspector clockworkInspector = getClockworkInspector(); if (clockworkInspector != null) { clockworkInspector.clockworkStart(context); } }
public <F extends ObjectType> void clockworkStateSwitch(LensContext<F> contextBefore, ModelState newState) { ClockworkInspector clockworkInspector = getClockworkInspector(); if (clockworkInspector != null) { clockworkInspector.clockworkStateSwitch(contextBefore, newState); } }
public <F extends ObjectType> void projectorStart(LensContext<F> context) { ClockworkInspector clockworkInspector = getClockworkInspector(); if (clockworkInspector != null) { clockworkInspector.projectorStart(context); } }
public <F extends ObjectType> void projectorFinish(LensContext<F> context) { ClockworkInspector clockworkInspector = getClockworkInspector(); if (clockworkInspector != null) { clockworkInspector.projectorFinish(context); } }
public <F extends ObjectType> void afterMappingEvaluation(LensContext<F> context, MappingImpl<?, ?> evaluatedMapping) { ClockworkInspector clockworkInspector = getClockworkInspector(); if (clockworkInspector != null) { clockworkInspector.afterMappingEvaluation(context, evaluatedMapping); } }
@Override public ExtensionType collectExtensions(int startAt) throws SchemaException { return AssignmentPathUtil.collectExtensions(this, startAt, prismContext); }
@Override public List<TreeNode<LocalizableMessage>> extractShortMessages() { return EvaluatedPolicyRuleUtil.extractMessages(triggers, EvaluatedPolicyRuleUtil.MessageKind.SHORT); }
private static boolean isHidden(EvaluatedPolicyRuleTriggerType trigger) { if (trigger.isHidden() != null) { return trigger.isHidden(); } else { return isHiddenByDefault(trigger.getConstraintKind()); } }