Package de.espirit.firstspirit.event
Interface EventInfo
- All Superinterfaces:
BasicElementInfo
,BasicInfo
,Serializable
Lightweight project and revision based event metadata.
- Since:
- 5.2.210505
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
The change type which caused the event. -
Method Summary
Modifier and TypeMethodDescription@NotNull Collection<EntityInfo>
If this event is entity related, information on the entities in question will be provided as a list of lightweight info objects.@NotNull EventInfo.EventType
The change type which caused this event.@NotNull UUID
getGid()
Provides the element's gid.long
Provides the old parent id, if this is aEventInfo.EventType.ELEMENT_MOVED
operation.long
Depending on the operation, provides the id of the parent element.@NotNull de.espirit.storage.Revision
Get theRevision
of this event.long
Provides the id of the schema causing this event, if it entity related.boolean
Indicates whether the event originated from the release state.Methods inherited from interface de.espirit.firstspirit.access.store.BasicElementInfo
getNodeId, getNodeTag, getRevisionId, getStoreType, getUid
-
Method Details
-
isRelease
boolean isRelease()Indicates whether the event originated from the release state.- Returns:
- true, if originating from release.
- Since:
- 5.2.210505
-
getEventType
The change type which caused this event.- Returns:
- The change type.
- Since:
- 5.2.210505
-
getParentId
long getParentId()Depending on the operation, provides the id of the parent element. If unsupported, will return-1
.- Returns:
- Parent element id, if supported,
-1
else. - Since:
- 5.2.210505
-
getOldParentId
long getOldParentId()Provides the old parent id, if this is aEventInfo.EventType.ELEMENT_MOVED
operation. Otherwise will return-1
.- Returns:
- The old parent id, if supported,
-1
else. - Since:
- 5.2.210505
-
getSchemaId
long getSchemaId()Provides the id of the schema causing this event, if it entity related. Will return-1
otherwise.- Returns:
- The schema's id or
-1
, if this is not an entity related event. - Since:
- 5.2.210505
-
getGid
Provides the element's gid. If the event is entity related, the gid will target theSchema
. If a gid does not yet exist, a new one will be created.- Returns:
- The element's/entity's gid.
- Since:
- 5.2.210505
-
getEntities
If this event is entity related, information on the entities in question will be provided as a list of lightweight info objects. Otherwise, the list will be empty.- Returns:
- Information of changed entities. Will be empty, if the event is not entity related.
- Since:
- 5.2.210505
-
getRevision
@NotNull @NotNull de.espirit.storage.Revision getRevision()Get theRevision
of this event. If only the revision id is of interest, consider using the fasterBasicElementInfo.getRevisionId()
method. Loading the revision metadata and creating the revision object has a small overhead.- Returns:
- The revision.
- Since:
- 5.2.210902
- See Also:
-