agave-systems/systems-core/src/main/java/org/iplantc/service/transfer/events/TransferTaskEventProcessor.java
/**
	 * Generates notification events for {@link TransferTask}.
	 * 
	 * @param transferTask the {@link TransferTask} on which the even is triggered
	 * @param createdBy the user who caused this event
	 * @return the {@link TransferTaskEvent} with the association to the {@link TransferTask}
	 */
Generates notification events for  TransferTask.

@param transferTask the  TransferTask on which the even is triggered
@param createdBy the user who caused this event
@return the  TransferTaskEvent with the association to the  TransferTask
Generates notification events for TransferTask . @param transferTask the TransferTask on which the even is triggered @param createdBy the user who caused this event @return the TransferTaskEvent with the association to the TransferTask
public void processTransferTaskEvent(TransferTask transferTask, TransferTaskEvent event) {
		try {
			if (transferTask == null) {
				throw new EntityEventProcessingException("Valid transfer task must be provided to process event.");
			}
			event.setEntity(transferTask.getUuid());
			String sJson = null;
			try {
				ObjectNode json = mapper.createObjectNode();
			    json.set("transferTask", mapper.readTree(transferTask.toJSON()));
			    sJson = json.toString();
			} catch (Throwable e) {
			    log.error(String.format("Failed to serialize transfer "
			            + "%s to json for %s event notification", 
			            transferTask.getUuid(), event.getStatus()), e);
			}
			processNotification(transferTask.getUuid(), event.getStatus(), event.getCreatedBy(), sJson);
			try {
				new TransferTaskEventDao().persist(event);
			}
			catch (EntityEventPersistenceException e) {
				log.error(String.format("Failed to persist %s transfer task event "
			            + "to history for %s", 
			            event.getStatus(), transferTask.getUuid()), e);
			}
		}
		catch (EntityEventProcessingException e) {
			log.error(e.getMessage());
		}
	}
public void processTransferTaskEvent ( TransferTask transferTask , TransferTaskEvent event ) { try { if ( transferTask == null ) { throw new EntityEventProcessingException ( "Valid transfer task must be provided to process event." ) ; } event . setEntity ( transferTask . getUuid ( ) ) ; String sJson = null ; try { ObjectNode json = mapper . createObjectNode ( ) ; json . set ( "transferTask" , mapper . readTree ( transferTask . toJSON ( ) ) ) ; sJson = json . toString ( ) ; } catch ( Throwable e ) { log . error ( String . format ( "Failed to serialize transfer " + "%s to json for %s event notification" , transferTask . getUuid ( ) , event . getStatus ( ) ) , e ) ; } processNotification ( transferTask . getUuid ( ) , event . getStatus ( ) , event . getCreatedBy ( ) , sJson ) ; try { new TransferTaskEventDao ( ) . persist ( event ) ; } catch ( EntityEventPersistenceException e ) { log . error ( String . format ( "Failed to persist %s transfer task event " + "to history for %s" , event . getStatus ( ) , transferTask . getUuid ( ) ) , e ) ; } } catch ( EntityEventProcessingException e ) { log . error ( e . getMessage ( ) ) ; } }
Generates notification events for {@link TransferTask}.
Generates notification events for { @link TransferTask } .
//			    ArrayNode systems = mapper.createArrayNode() //			    		.add(mapper.readTree(sourceSystem.toJSON())) //			    		.add(mapper.readTree(destSystem.toJSON())); //			    json.set("system", systems); // fire event on transfer // We fire delegated transfer chec events on the system being transfered. //			processNotification(sourceSystem.getUuid(), "TRANSFER_" + event.getStatus(), event.getCreatedBy(), sJson); //			processNotification(destSystem.getUuid(), "TRANSFER_" + event.getStatus(), event.getCreatedBy(), sJson); //			