use of org.uberfire.workbench.events.ResourceAddedEvent in project kie-wb-common by kiegroup.
the class ResourceAddedEventAdapter method toSocial.
@Override
public SocialActivitiesEvent toSocial(Object object) {
ResourceAddedEvent event = (ResourceAddedEvent) object;
SocialUser socialUser = socialUserRepositoryAPI.findSocialUser(event.getSessionInfo().getIdentity().getIdentifier());
String additionalInfo = "Added";
String description = getCommitDescription(event);
return new SocialActivitiesEvent(socialUser, HomePageTypes.RESOURCE_ADDED_EVENT.name(), new Date()).withLink(event.getPath().getFileName(), event.getPath().toURI()).withAdicionalInfo(additionalInfo).withDescription(description);
}
use of org.uberfire.workbench.events.ResourceAddedEvent in project kie-wb-common by kiegroup.
the class ResourceAddedEventAdapter method isASystemEvent.
private boolean isASystemEvent(Object _event) {
ResourceAddedEvent event = (ResourceAddedEvent) _event;
final String user = event.getSessionInfo().getIdentity().getIdentifier();
if (user.equalsIgnoreCase("system") || user.equalsIgnoreCase("<system>")) {
return true;
}
return false;
}
Aggregations