use of org.alfresco.sync.events.types.NodeCheckedOutEvent in project alfresco-repository by Alfresco.
the class EventsServiceImpl method nodeCheckedOut.
public void nodeCheckedOut(NodeRef workingCopyNodeRef) {
NodeInfo workingCopyNodeInfo = getNodeInfo(workingCopyNodeRef, NodeCheckedOutEvent.EVENT_TYPE);
if (workingCopyNodeInfo.checkNodeInfo()) {
String username = AuthenticationUtil.getFullyAuthenticatedUser();
String networkId = TenantUtil.getCurrentDomain();
String name = workingCopyNodeInfo.getName();
String objectId = workingCopyNodeInfo.getNodeId();
String siteId = workingCopyNodeInfo.getSiteId();
String txnId = AlfrescoTransactionSupport.getTransactionId();
List<String> nodePaths = workingCopyNodeInfo.getPaths();
List<List<String>> pathNodeIds = workingCopyNodeInfo.getParentNodeIds();
long timestamp = System.currentTimeMillis();
Long modificationTime = workingCopyNodeInfo.getModificationTimestamp();
String nodeType = workingCopyNodeInfo.getType().toPrefixString(namespaceService);
Client alfrescoClient = getAlfrescoClient(workingCopyNodeInfo.getClient());
String workingCopyNodeId = workingCopyNodeInfo.getNodeId();
Set<String> aspects = workingCopyNodeInfo.getAspectsAsStrings();
Map<String, Serializable> properties = workingCopyNodeInfo.getProperties();
Event event = new NodeCheckedOutEvent(nextSequenceNumber(), workingCopyNodeId, name, txnId, timestamp, networkId, siteId, objectId, nodeType, nodePaths, pathNodeIds, username, modificationTime, alfrescoClient, aspects, properties);
sendEvent(event);
}
}
Aggregations