use of org.alfresco.sync.events.types.UserManagementEvent in project alfresco-repository by Alfresco.
the class PersonServiceImpl method publishEvent.
/**
* Publish new user event
*
* @param eventType String
* @param properties Map<QName, Serializable>
*/
private void publishEvent(String eventType, Map<QName, Serializable> properties) {
if (properties == null)
return;
final String managedUsername = (String) properties.get(ContentModel.PROP_USERNAME);
final String managedFirstname = (String) properties.get(ContentModel.PROP_FIRSTNAME);
final String managedLastname = (String) properties.get(ContentModel.PROP_LASTNAME);
final String eventTType = eventType;
eventPublisher.publishEvent(new EventPreparator() {
@Override
public Event prepareEvent(String user, String networkId, String transactionId) {
return new UserManagementEvent(eventTType, transactionId, networkId, new Date().getTime(), user, managedUsername, managedFirstname, managedLastname);
}
});
}
Aggregations