@Override public boolean isStatusType(EventStatusType eventStatusType) { return operationStatus.matchesEventStatusType(eventStatusType); }
@Override public boolean isStatusType(EventStatusType eventStatusType) { return getOperationStatus().matchesEventStatusType(eventStatusType); }
public String getFocusPassword() { return getNotificationFunctions().getFocusPasswordFromEvent(this); }
private void emitPolicyEvent(@SuppressWarnings("unused") NotificationPolicyActionType action, EvaluatedPolicyRule rule, ModelContext<?> context, Task task, OperationResult result) { PolicyRuleEvent ruleEvent = createRuleEvent(rule, context, task); notificationManager.processEvent(ruleEvent, task, result); }
public String getPlaintextPassword() { ObjectDelta delta = getAccountOperationDescription().getObjectDelta(); return delta != null ? getNotificationFunctions().getPlaintextPasswordFromDelta(delta) : null; }
public String getShadowName() { return getNotificationFunctions().getShadowName(getAccountOperationDescription().getCurrentShadow()); }
@PostConstruct public void init() { notificationManager.registerTransport(NAME, this); }
protected void prepareNotifications() { notificationManager.setDisabled(false); dummyTransport.clearMessages(); }
public String getContentAsFormattedList(boolean showSynchronizationItems, boolean showAuxiliaryAttributes) { return getNotificationFunctions().getContentAsFormattedList(this, showSynchronizationItems, showAuxiliaryAttributes); }
public String getContentAsFormattedList(boolean showSynchronizationItems, boolean showAuxiliaryAttributes) { return getNotificationFunctions().getContentAsFormattedList(this, showSynchronizationItems, showAuxiliaryAttributes); }
private boolean notificationsEnabled() { if (notificationManager.isDisabled()) { LOGGER.trace("Notifications are temporarily disabled, exiting the hook."); return false; } else { return true; } }
private boolean processNotifiers(Event event, List<? extends EventHandlerType> notifiers, NotificationManager notificationManager, Task task, OperationResult result) throws SchemaException { for (EventHandlerType notifier : notifiers) { boolean shouldContinue = ((NotificationManagerImpl) notificationManager).getEventHandler(notifier).processEvent(event, notifier, notificationManager, task, result); if (!shouldContinue) { return false; } } return true; } }
private void emitModelEvent(@NotNull ModelContext<?> context, @NotNull Task task, @NotNull OperationResult result) { PrismObject<?> object = getObject(context); if (object == null) { LOGGER.trace("Focus context object is null, not sending the notification."); return; } ModelEvent event = createModelEvent(object, context, task); notificationManager.processEvent(event, task, result); }
@PostConstruct public void init() { notificationManager.registerTransport(NAME, this); }
public boolean processEvent(Event event, EventHandlerType eventHandlerType, Task task, OperationResult result) { try { return getEventHandler(eventHandlerType).processEvent(event, eventHandlerType, this, task, result); } catch (SchemaException e) { LoggingUtils.logException(LOGGER, "Event couldn't be processed; event = {}", e, event); return true; // continue if you can } }
public boolean processEvent(Event event, EventHandlerType eventHandlerType, NotificationManager notificationManager, Task task, OperationResult result) { if (eventHandlerType.getForked().isEmpty()) { return true; } logStart(LOGGER, event, eventHandlerType); for (EventHandlerType branchHandlerType : eventHandlerType.getForked()) { notificationManager.processEvent(event, branchHandlerType, task, result); } logEnd(LOGGER, event, eventHandlerType, true); return true; }
@PostConstruct public void init() { notificationManager.registerTransport(NAME, this); }
private void processEvent(WorkflowEvent event, OperationResult result) { try { notificationManager.processEvent(event); } catch (RuntimeException e) { result.recordFatalError("An unexpected exception occurred when preparing and sending notifications: " + e.getMessage(), e); LoggingUtils.logUnexpectedException(LOGGER, "An unexpected exception occurred when preparing and sending notifications: " + e.getMessage(), e); } // todo work correctly with operationResult (in whole notification module) if (result.isUnknown()) { result.computeStatus(); } result.recordSuccessIfUnknown(); }
@PostConstruct public void init() { notificationManager.registerTransport(NAME, this); }
@PostConstruct public void init() { if (notificationManager != null) { notificationManager.registerTransport(NAME, this); } else { LOGGER.info("NotificationManager is not available, skipping the registration."); } }