agave-systems/systems-core/src/main/java/org/iplantc/service/systems/events/RemoteSystemEventProcessor.java
/**
	 * Looks up Software for a given {@link RemoteSystem#getSystemId()} and
	 * processes system events for all apps.
	 * 
	 * @param system the system receiving the event
	 * @param eventName the name of the event
	 * @param createdBy the username responsible for the event
	 * @param jsonNode json object representing the software being updated
	 * @return the number of notifications sent.
	 */
Looks up Software for a given  RemoteSystem#getSystemId() and
processes system events for all apps.


Looks up Software for a given RemoteSystem#getSystemId () and processes system events for all apps .
public int doSoftwareEvents(RemoteSystem system, String eventName, String createdBy, ObjectNode jsonNode) {
		int sentEvents = 0;
		try {
			if (jsonNode == null) {
				jsonNode = mapper.createObjectNode();
			}
			for (String uuid: getDao().getUserOwnedAppsForSystemId(createdBy, system.getId())) {
				fireNotification(uuid, "SYSTEM_" + eventName, createdBy, 
						(ObjectNode)jsonNode.deepCopy().set("app", mapper.createObjectNode().put("uuid", uuid)));
				sentEvents++;
			}
		}
		catch (Exception e) {
			log.error(e.getMessage(), e);
		}
		return sentEvents;
	}
public int doSoftwareEvents ( RemoteSystem system , String eventName , String createdBy , ObjectNode jsonNode ) { int sentEvents = 0 ; try { if ( jsonNode == null ) { jsonNode = mapper . createObjectNode ( ) ; } for ( String uuid : getDao ( ) . getUserOwnedAppsForSystemId ( createdBy , system . getId ( ) ) ) { fireNotification ( uuid , "SYSTEM_" + eventName , createdBy , ( ObjectNode ) jsonNode . deepCopy ( ) . set ( "app" , mapper . createObjectNode ( ) . put ( "uuid" , uuid ) ) ) ; sentEvents ++ ; } } catch ( Exception e ) { log . error ( e . getMessage ( ) , e ) ; } return sentEvents ; }
Looks up Software for a given {@link RemoteSystem#getSystemId()} and
 processes system events for all apps.
Looks up Software for a given { @link RemoteSystem#getSystemId () } and processes system events for all apps .