public ShadowType getShadow() { PrismObject<? extends ShadowType> shadow = accountOperationDescription.getCurrentShadow(); return shadow != null ? shadow.asObjectable() : null; }
public boolean isShadowIntent(String intent) { if (StringUtils.isNotEmpty(intent)) { return intent.equals(accountOperationDescription.getCurrentShadow().asObjectable().getIntent()); } else { return StringUtils.isEmpty(accountOperationDescription.getCurrentShadow().asObjectable().getIntent()); } }
private void notifyAny(ResourceOperationDescription operationDescription) { cache.invalidate(operationDescription.getResource(), operationDescription.getCurrentShadow()); }
public String getShadowName() { return getNotificationFunctions().getShadowName(getAccountOperationDescription().getCurrentShadow()); }
public boolean isShadowKind(ShadowKindType shadowKindType) { ShadowKindType actualKind = accountOperationDescription.getCurrentShadow().asObjectable().getKind(); if (actualKind != null) { return actualKind.equals(shadowKindType); } else { return ShadowKindType.ACCOUNT.equals(shadowKindType); } }
body.append("Resource: " + resourceObjectEvent.getResourceName() + " (oid " + resourceObjectEvent.getResourceOid() + ")\n"); boolean named; if (rod.getCurrentShadow() != null && rod.getCurrentShadow().asObjectable().getName() != null) { if (isAccount) { body.append("Account: " + rod.getCurrentShadow().asObjectable().getName() + "\n"); } else { body.append("Resource object: " + rod.getCurrentShadow().asObjectable().getName() + " (kind: " + rod.getCurrentShadow().asObjectable().getKind() + ")\n");
event.getAccountOperationDescription().getCurrentShadow(), null)); } else { event.getAccountOperationDescription().getCurrentShadow(), null)); } catch (SchemaException e) { LoggingUtils.logUnexpectedException(LOGGER, "Unable to determine the shadow change; operation = {}", e, event.getAccountOperationDescription().debugDump());
private void executeNotifyAny(OperationStatus status, ResourceOperationDescription operationDescription, Task task, OperationResult result) { if (LOGGER.isTraceEnabled()) { LOGGER.trace("AccountOperationListener.notify ({}) called with operationDescription = {}", status, operationDescription.debugDump()); } if (operationDescription.getObjectDelta() == null) { LOGGER.warn("Object delta is null, exiting the change listener."); return; } if (operationDescription.getCurrentShadow() == null) { LOGGER.warn("Current shadow is null, exiting the change listener."); return; } // for the time being, we deal only with accounts here if (operationDescription.getObjectDelta().getObjectTypeClass() == null || !ShadowType.class.isAssignableFrom(operationDescription.getObjectDelta().getObjectTypeClass())) { if (LOGGER.isTraceEnabled()) { LOGGER.trace("Object that was changed was not an account, exiting the operation listener (class = {})", operationDescription.getObjectDelta().getObjectTypeClass()); } return; } ResourceObjectEvent request = createRequest(status, operationDescription, task, result); notificationManager.processEvent(request, task, result); }
assertNotNull("No parent result", parentResult); assertNotNull("Current shadow not present", opDescription.getCurrentShadow()); assertNotNull("Delta not present", opDescription.getObjectDelta()); if (opDescription.getCurrentShadow() != null) { ShadowType currentShadowType = opDescription.getCurrentShadow().asObjectable(); if (currentShadowType != null) { assertNotNull("Current shadow does not have an OID", opDescription.getCurrentShadow().getOid()); assertNotNull("Current shadow has null attributes", currentShadowType.getAttributes()); assertFalse("Current shadow has empty attributes", ShadowUtil