Search in sources :

Example 21 with EventData

use of org.alfresco.repo.event.v1.model.EventData in project alfresco-repository by Alfresco.

the class AbstractContextAwareRepoEvent method getNodeResourceBefore.

protected NodeResource getNodeResourceBefore(int eventSequenceNumber) {
    DataAttributes<NodeResource> eventData = getEventData(eventSequenceNumber);
    NodeResource resourceBefore = eventData.getResourceBefore();
    assertNotNull(resourceBefore);
    return resourceBefore;
}
Also used : NodeResource(org.alfresco.repo.event.v1.model.NodeResource)

Example 22 with EventData

use of org.alfresco.repo.event.v1.model.EventData in project alfresco-repository by Alfresco.

the class AbstractContextAwareRepoEvent method getNodeResourceBefore.

protected <D extends DataAttributes<NodeResource>> NodeResource getNodeResourceBefore(RepoEvent<D> repoEvent) {
    assertNotNull(repoEvent);
    D eventData = repoEvent.getData();
    assertNotNull(eventData);
    NodeResource resourceBefore = eventData.getResourceBefore();
    assertNotNull(resourceBefore);
    return resourceBefore;
}
Also used : NodeResource(org.alfresco.repo.event.v1.model.NodeResource) GUID(org.alfresco.util.GUID)

Example 23 with EventData

use of org.alfresco.repo.event.v1.model.EventData in project alfresco-repository by Alfresco.

the class AbstractContextAwareRepoEvent method getChildAssocResource.

protected <D extends DataAttributes<ChildAssociationResource>> ChildAssociationResource getChildAssocResource(RepoEvent<D> repoEvent) {
    assertNotNull(repoEvent);
    D eventData = repoEvent.getData();
    assertNotNull(eventData);
    ChildAssociationResource resource = eventData.getResource();
    assertNotNull(resource);
    return resource;
}
Also used : GUID(org.alfresco.util.GUID) ChildAssociationResource(org.alfresco.repo.event.v1.model.ChildAssociationResource)

Example 24 with EventData

use of org.alfresco.repo.event.v1.model.EventData in project alfresco-repository by Alfresco.

the class AbstractContextAwareRepoEvent method getNodeResource.

protected <D extends DataAttributes<NodeResource>> NodeResource getNodeResource(RepoEvent<D> repoEvent) {
    assertNotNull(repoEvent);
    D eventData = getEventData(repoEvent);
    assertNotNull(eventData);
    NodeResource resource = eventData.getResource();
    assertNotNull(resource);
    return resource;
}
Also used : NodeResource(org.alfresco.repo.event.v1.model.NodeResource) GUID(org.alfresco.util.GUID)

Example 25 with EventData

use of org.alfresco.repo.event.v1.model.EventData in project alfresco-repository by Alfresco.

the class AbstractContextAwareRepoEvent method getNodeResource.

protected NodeResource getNodeResource(int eventSequenceNumber) {
    DataAttributes<NodeResource> eventData = getEventData(eventSequenceNumber);
    NodeResource resource = eventData.getResource();
    assertNotNull(resource);
    return resource;
}
Also used : NodeResource(org.alfresco.repo.event.v1.model.NodeResource)

Aggregations

EventData (org.alfresco.repo.event.v1.model.EventData)25 NodeRef (org.alfresco.service.cmr.repository.NodeRef)25 Test (org.junit.Test)25 NodeResource (org.alfresco.repo.event.v1.model.NodeResource)14 ChildAssociationResource (org.alfresco.repo.event.v1.model.ChildAssociationResource)13 RepoEvent (org.alfresco.repo.event.v1.model.RepoEvent)12 ChildAssociationRef (org.alfresco.service.cmr.repository.ChildAssociationRef)12 PeerAssociationResource (org.alfresco.repo.event.v1.model.PeerAssociationResource)6 AssociationRef (org.alfresco.service.cmr.repository.AssociationRef)5 GUID (org.alfresco.util.GUID)4 EventType (org.alfresco.repo.event.v1.model.EventType)3 ContentInfo (org.alfresco.repo.event.v1.model.ContentInfo)2 ContentService (org.alfresco.service.cmr.repository.ContentService)2 ContentWriter (org.alfresco.service.cmr.repository.ContentWriter)2 PropertyMap (org.alfresco.util.PropertyMap)2 M2Model (org.alfresco.repo.dictionary.M2Model)1 M2Type (org.alfresco.repo.dictionary.M2Type)1 CustomModelDefinition (org.alfresco.service.cmr.dictionary.CustomModelDefinition)1 TypeDefinition (org.alfresco.service.cmr.dictionary.TypeDefinition)1 QName (org.alfresco.service.namespace.QName)1