Interface Event
- All Superinterfaces:
DebugDumpable
,Serializable
,ShortDumpable
- All Known Subinterfaces:
AccessCertificationEvent
,ActivityEvent
,ActivityRealizationCompleteEvent
,CaseEvent
,CaseManagementEvent
,CertCampaignEvent
,CertCampaignStageEvent
,CertReviewEvent
,CustomEvent
,ModelEvent
,PolicyRuleEvent
,ReportOutputCreatedEvent
,ResourceObjectEvent
,TaskEvent
Notification event that should be propagated, filtered, externalized (typically to ascii or html), and send out.
-
Field Summary
Fields inherited from interface com.evolveum.midpoint.util.DebugDumpable
INDENT_STRING
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
Returns plaintext focus password value, if known.@NotNull LightweightIdentifier
getId()
Randomly generated event ID.Entity that is the object of this event or the "owner" of the object of this event.default String
Entity that requested the operation that resulted in the event being generated.default String
default boolean
Deprecated.default boolean
isAdd()
default boolean
boolean
isCategoryType
(EventCategoryType eventCategory) default boolean
default boolean
isDelete()
default boolean
default boolean
default boolean
isModify()
default boolean
boolean
isOperationType
(EventOperationType eventOperation) default boolean
default boolean
isRelatedToItem
(ItemPath itemPath) Checks if the event is related to an item with a given path.boolean
isStatusType
(EventStatusType eventStatus) default boolean
boolean
default boolean
Deprecated.default boolean
Deprecated.default boolean
default boolean
requesteeIs
(Class<?> type) default boolean
Methods inherited from interface com.evolveum.midpoint.util.DebugDumpable
debugDump, debugDump, debugDumpLazily, debugDumpLazily
Methods inherited from interface com.evolveum.midpoint.util.ShortDumpable
shortDump, shortDump, shortDumpLazily
-
Method Details
-
getId
Randomly generated event ID. It is immutable. -
getRequester
SimpleObjectRef getRequester()Entity that requested the operation that resulted in the event being generated. May be null if unknown. -
getRequesterOid
- Returns:
- OID of the requester
-
getRequestee
SimpleObjectRef getRequestee()Entity that is the object of this event or the "owner" of the object of this event. Typically it is the user that we'd like to send the notification to. For example: - for model notifications: the focal object - for resource object (account) notifications: resource object (account) owner - workflow notifications: the object of the approval case - certification notifications: campaign owner or reviewer (depending on the kind of event) May be null if unknown. -
requesteeIs
- Returns:
- true if requestee is of give type
-
requesteeIsUser
default boolean requesteeIsUser() -
getRequesteeObject
ObjectType getRequesteeObject()- Returns:
- resolved requestee object (or null)
-
getRequesteeDisplayName
PolyStringType getRequesteeDisplayName()- Returns:
- display name of the requestee (or null)
-
getRequesteeOid
- Returns:
- OID of the requestee
-
isStatusType
- Returns:
- true if the status of the operation that caused this event corresponds to the specified one
-
isOperationType
- Returns:
- true if the type of the operation that caused this event corresponds to the specified one
-
isCategoryType
- Returns:
- true if the category of the event matches the specified one
-
isUserRelated
boolean isUserRelated()- Returns:
- true if the object of the event is of UserType Currently applies only to ModelEvent and CustomEvent. TODO specify semantics of this method more precisely; see also MID-4598
-
isAccountRelated
Deprecated. -
isWorkItemRelated
default boolean isWorkItemRelated() -
isWorkflowProcessRelated
Deprecated. -
isWorkflowRelated
Deprecated. -
isPolicyRuleRelated
default boolean isPolicyRuleRelated() -
isCertCampaignStageRelated
default boolean isCertCampaignStageRelated() -
isAdd
default boolean isAdd() -
isModify
default boolean isModify() -
isDelete
default boolean isDelete() -
isSuccess
default boolean isSuccess() -
isAlsoSuccess
default boolean isAlsoSuccess() -
isFailure
default boolean isFailure() -
isOnlyFailure
default boolean isOnlyFailure() -
isInProgress
default boolean isInProgress() -
isRelatedToItem
Checks if the event is related to an item with a given path. The meaning of the result depends on a kind of event (focal, resource object, workflow) and on operation (add, modify, delete). Namely, this method is currently defined for ADD and MODIFY (not for DELETE) operations, for focal and resource objects events (not for workflow ones). For MODIFY it checks whether an item with a given path is touched. For ADD it checks whether there is a value for an item with a given path in the object created. For unsupported events the method returns false. Paths are compared without taking ID segments into account. EXPERIMENTAL; does not always work (mainly for values being deleted) -
getChannel
String getChannel()- Returns:
- channel that was used to initiate the operation that caused this event
-
getStatusAsText
String getStatusAsText()- Returns:
- textual representation of event status TODO consider what to do with this
-
getFocusPassword
Returns plaintext focus password value, if known. Beware: might not always work correctly: 1. If the change execution was only partially successful, the value returned might or might not be stored in the repo 2. If the password was changed to null, the 'null' value is returned. So the caller cannot distinguish it from "no change" situation. A new method for this would be needed.
-