Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

75077: Merged WAT2 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      73044: The default event publisher can do more, then only 1 method to implement


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@75405 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Will Abson
2014-07-01 15:30:16 +00:00
parent bd961cb020
commit 3f23affb37

View File

@@ -46,6 +46,14 @@ public abstract class AbstractEventPublisher implements EventPublisher
});
}
@Override
public void publishEvent(EventPreparator prep)
{
ThreadInfo info = getThreadInfo();
Event event = prep.prepareEvent(info.user, info.network, info.transaction);
publishEvent(event);
}
/**
* Gets userful information from the current thread for use when creating an event
* @return ThreadInfo
@@ -62,10 +70,10 @@ public abstract class AbstractEventPublisher implements EventPublisher
* Basic information from a thread
*
*/
protected static class ThreadInfo {
protected final String user;
protected final String transaction;
protected final String network;
public static class ThreadInfo {
public final String user;
public final String transaction;
public final String network;
public ThreadInfo(String user, String transaction, String network)
{