Skip to content

Commit

Permalink
event.shadow for ResourceObjectEvents
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Jun 29, 2017
1 parent 6a16b5f commit 61b3199
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
package com.evolveum.midpoint.notifications.api.events;

import com.evolveum.midpoint.notifications.api.OperationStatus;
import com.evolveum.midpoint.prism.PrismContainer;
import com.evolveum.midpoint.prism.PrismContainerValue;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.delta.ChangeType;
import com.evolveum.midpoint.prism.delta.ObjectDelta;
import com.evolveum.midpoint.prism.path.ItemPath;
Expand Down Expand Up @@ -106,6 +109,11 @@ public boolean isShadowKind(ShadowKindType shadowKindType) {
}
}

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());
Expand Down

0 comments on commit 61b3199

Please sign in to comment.