use of org.alfresco.repo.event.v1.model.EventType in project alfresco-repository by Alfresco.
the class ChildAssociationEventConsolidator method getRepoEvent.
/**
* Builds and returns the {@link RepoEvent} instance.
*
* @param eventInfo the object holding the event information
* @return the {@link RepoEvent} instance
*/
public RepoEvent<DataAttributes<ChildAssociationResource>> getRepoEvent(EventInfo eventInfo) {
EventType eventType = getDerivedEvent();
DataAttributes<ChildAssociationResource> eventData = buildEventData(eventInfo, resource);
return RepoEvent.<DataAttributes<ChildAssociationResource>>builder().setId(eventInfo.getId()).setSource(eventInfo.getSource()).setTime(eventInfo.getTimestamp()).setType(eventType.getType()).setData(eventData).setDataschema(EventJSONSchema.getSchemaV1(eventType)).build();
}
use of org.alfresco.repo.event.v1.model.EventType in project alfresco-repository by Alfresco.
the class PeerAssociationEventConsolidator method getRepoEvent.
/**
* Builds and returns the {@link RepoEvent} instance.
*
* @param eventInfo the object holding the event information
* @return the {@link RepoEvent} instance
*/
public RepoEvent<DataAttributes<PeerAssociationResource>> getRepoEvent(EventInfo eventInfo) {
EventType eventType = getDerivedEvent();
DataAttributes<PeerAssociationResource> eventData = buildEventData(eventInfo, resource);
return RepoEvent.<DataAttributes<PeerAssociationResource>>builder().setId(eventInfo.getId()).setSource(eventInfo.getSource()).setTime(eventInfo.getTimestamp()).setType(eventType.getType()).setData(eventData).setDataschema(EventJSONSchema.getSchemaV1(eventType)).build();
}
use of org.alfresco.repo.event.v1.model.EventType in project alfresco-repository by Alfresco.
the class EventConsolidator method getRepoEvent.
/**
* Builds and returns the {@link RepoEvent} instance.
*
* @param eventInfo the object holding the event information
* @return the {@link RepoEvent} instance
*/
public RepoEvent<DataAttributes<NodeResource>> getRepoEvent(EventInfo eventInfo) {
NodeResource resource = buildNodeResource();
EventType eventType = getDerivedEvent();
DataAttributes<NodeResource> eventData = buildEventData(eventInfo, resource, eventType);
return RepoEvent.<DataAttributes<NodeResource>>builder().setId(eventInfo.getId()).setSource(eventInfo.getSource()).setTime(eventInfo.getTimestamp()).setType(eventType.getType()).setData(eventData).setDataschema(EventJSONSchema.getSchemaV1(eventType)).build();
}
Aggregations