public void onResourceUpdated(@Observes final ResourceUpdatedEvent event) { refresh(event.getPath()); }
public void processResourceUpdate(@Observes final ResourceUpdatedEvent resourceUpdatedEvent) { if (configUpdaterHelper.isPersistenceFile(resourceUpdatedEvent.getPath())) { //persistence.xml has been updated in current project. updateConfig(moduleService.resolveModule(resourceUpdatedEvent.getPath())); } }
public void processResourceUpdate(@Observes final ResourceUpdatedEvent resourceUpdatedEvent) { if (configUpdaterHelper.isPersistenceFile(resourceUpdatedEvent.getPath())) { //persistence.xml has been updated in current project. updateConfig(moduleService.resolveModule(resourceUpdatedEvent.getPath())); } }
void onResourceUpdated(@Observes ResourceUpdatedEvent res) { if (lockTarget != null && res.getPath().equals(lockTarget.getPath())) { if (!res.getSessionInfo().getIdentity().equals(user)) { reload(); } releaseLock(); } }
void onResourceUpdated(@Observes final ResourceUpdatedEvent updatedEvent) { if (path != null && path.equals(updatedEvent.getPath())) { if (sessionInfo.getId().equals(updatedEvent.getSessionInfo().getId())) { executeUpdateCommands(); } else { executeConcurrentUpdateCommand(updatedEvent.getPath(), updatedEvent.getSessionInfo().getId(), updatedEvent.getSessionInfo().getIdentity()); } } }
public void recordUserEditEvent( @Observes final ResourceUpdatedEvent event ) { checkNotNull( "event", event ); try { ioService.startBatch( bootstrapFS.getRootDirectories().iterator().next().getFileSystem() ); recordUserEditEvent( event.getPath().toURI(), event.getPath().getFileName(), event.getSessionInfo().getIdentity().getIdentifier() ); } finally { ioService.endBatch(); } }
@Override public SocialActivitiesEvent toSocial( Object object ) { ResourceUpdatedEvent event = (ResourceUpdatedEvent) object; SocialUser socialUser = socialUserRepositoryAPI.findSocialUser( event.getSessionInfo().getIdentity().getIdentifier() ); String additionalInfo = "Edited"; String description = getCommitDescription( event ); return new SocialActivitiesEvent( socialUser, HomePageTypes.RESOURCE_UPDATE_EVENT.name(), new Date() ).withLink( event.getPath().getFileName(), event.getPath().toURI() ).withAdicionalInfo( additionalInfo ).withDescription( description ); }
private void verifyResourceUpdatedEvent(String file, String sessionId, String userId, String commitMessage) { verify(resourceUpdatedEvent, times(1)).fire(resourceUpdatedEventCaptor.capture()); assertEquals(file, resourceUpdatedEventCaptor.getValue().getPath().toURI()); assertEquals(sessionId, resourceUpdatedEventCaptor.getValue().getSessionInfo().getId()); assertEquals(userId, resourceUpdatedEventCaptor.getValue().getSessionInfo().getIdentity().getIdentifier()); assertEquals(commitMessage, resourceUpdatedEventCaptor.getValue().getMessage()); }
private void verifyResourceUpdatedEvent(String file, String sessionId, String userId, String commitMessage) { verify(resourceUpdatedEvent, times(1)).fire(resourceUpdatedEventCaptor.capture()); assertEquals(file, resourceUpdatedEventCaptor.getValue().getPath().toURI()); assertEquals(sessionId, resourceUpdatedEventCaptor.getValue().getSessionInfo().getId()); assertEquals(userId, resourceUpdatedEventCaptor.getValue().getSessionInfo().getIdentity().getIdentifier()); assertEquals(commitMessage, resourceUpdatedEventCaptor.getValue().getMessage()); }