agave-files/files-core/src/main/java/org/iplantc/service/io/manager/FileEventProcessor.java
/**
	 * Generates notification events for content-related changes to a 
	 * {@link LogicalFile}. This could be a file operation or a change
	 * to the contents of a directory.
	 * 
	 * @param logicalFile
	 * @param event
	 * @return the {@link FileEvent} updated with the association to the {@link LogicalFile}
	 */
Generates notification events for content-related changes to a
LogicalFile. This could be a file operation or a change
to the contents of a directory.

@param logicalFile
@param event
@return the  FileEvent updated with the association to the  LogicalFile
Generates notification events for content - related changes to a LogicalFile . This could be a file operation or a change to the contents of a directory . @param logicalFile @param event @return the FileEvent updated with the association to the LogicalFile
public FileEvent processContentEvent(LogicalFile logicalFile, FileEvent event) 
	throws FileEventProcessingException {
		if (logicalFile == null) {
			throw new FileEventProcessingException("Valid logical file must be provided to process event.");
		}
		if (event == null) {
			throw new FileEventProcessingException("Valid file event must be provided to process event.");
		}
		event.setLogicalFile(logicalFile);
		ObjectNode json = null;
		try {
		    json = (ObjectNode)mapper.createObjectNode().set("file", mapper.readTree(logicalFile.toJSON()));
		} catch (Throwable e) {
		    log.error(String.format("Failed to serialize logical file "
		            + "%s to json for %s event notification", 
		            logicalFile.getUuid(), event.getStatus()), e);
		    json = null;
		}
		log.debug(String.format("Processing %s event for %s, %s", 
				event.getStatus(), logicalFile.getUuid(), logicalFile.getPublicLink())); 
		NotificationManager.process(logicalFile.getUuid(), event.getStatus(), event.getCreatedBy(), json.toString());
		fireParentNotification(event, json);
		fireSystemNotification(event, json);
		return event;
	}
public FileEvent processContentEvent ( LogicalFile logicalFile , FileEvent event ) throws FileEventProcessingException { if ( logicalFile == null ) { throw new FileEventProcessingException ( "Valid logical file must be provided to process event." ) ; } if ( event == null ) { throw new FileEventProcessingException ( "Valid file event must be provided to process event." ) ; } event . setLogicalFile ( logicalFile ) ; ObjectNode json = null ; try { json = ( ObjectNode ) mapper . createObjectNode ( ) . set ( "file" , mapper . readTree ( logicalFile . toJSON ( ) ) ) ; } catch ( Throwable e ) { log . error ( String . format ( "Failed to serialize logical file " + "%s to json for %s event notification" , logicalFile . getUuid ( ) , event . getStatus ( ) ) , e ) ; json = null ; } log . debug ( String . format ( "Processing %s event for %s, %s" , event . getStatus ( ) , logicalFile . getUuid ( ) , logicalFile . getPublicLink ( ) ) ) ; NotificationManager . process ( logicalFile . getUuid ( ) , event . getStatus ( ) , event . getCreatedBy ( ) , json . toString ( ) ) ; fireParentNotification ( event , json ) ; fireSystemNotification ( event , json ) ; return event ; }
Generates notification events for content-related changes to a
 {@link LogicalFile}.
Generates notification events for content - related changes to a { @link LogicalFile } .