agave-metadata/metadata-core/src/main/java/org/iplantc/service/metadata/events/MetadataEventProcessor.java
/**
	 * Throws events for the given {@link MetadataItem} uuid. This will result in a 
	 * notification event being thrown onto the the deleted item and with only the uuid
	 * in the body. Generally this is only called from a bulk operation where speed of
	 * operation trumps verboseness of messages.
	 *
	 * @param uuid the uuid of the impacted uuid
	 * @param eventType the metadata event type
	 * @param createdBy the user responsible for this event
	 * @return the uuid of the target metadata item
	 * @deprecated batch events not yet supported
	 */
Throws events for the given  MetadataItem uuid. This will result in a
notification event being thrown onto the the deleted item and with only the uuid
in the body. Generally this is only called from a bulk operation where speed of
operation trumps verboseness of messages.


Throws events for the given MetadataItem uuid . This will result in a notification event being thrown onto the the deleted item and with only the uuid in the body . Generally this is only called from a bulk operation where speed of operation trumps verboseness of messages .
public String processBulkContentEvent(String uuid, MetadataEventType eventType, String createdBy) {
		try {
			if (StringUtils.isEmpty(uuid)) {
				throw new EntityEventProcessingException("Valid metadata uuid must be provided to process event.");
			}
			if (eventType == null) {
				throw new EntityEventProcessingException("Valid metadata event type must be provided to process event.");
			}
			if (StringUtils.isEmpty(createdBy)) {
				throw new EntityEventProcessingException("Valid metadata creator username must be provided to process event.");
			}
			String sJson = null;
			try {
				ObjectNode json = getMapper().createObjectNode();
				json.putArray("metadata")
						.addObject()
							.put("uuid",  uuid);
			    sJson = json.toString();
			} catch (Throwable e) {
			    log.error(String.format("Failed to serialize metadata "
			            + "%s to json for %s event notification", 
			            uuid, eventType.name()), e);
			}
			processNotification(uuid, eventType.name(), createdBy, sJson);
		}
		catch (EntityEventProcessingException e) {
			log.error("Failed to process batch metadata event: " + e.getMessage());
		}
		return uuid;
	}
public String processBulkContentEvent ( String uuid , MetadataEventType eventType , String createdBy ) { try { if ( StringUtils . isEmpty ( uuid ) ) { throw new EntityEventProcessingException ( "Valid metadata uuid must be provided to process event." ) ; } if ( eventType == null ) { throw new EntityEventProcessingException ( "Valid metadata event type must be provided to process event." ) ; } if ( StringUtils . isEmpty ( createdBy ) ) { throw new EntityEventProcessingException ( "Valid metadata creator username must be provided to process event." ) ; } String sJson = null ; try { ObjectNode json = getMapper ( ) . createObjectNode ( ) ; json . putArray ( "metadata" ) . addObject ( ) . put ( "uuid" , uuid ) ; sJson = json . toString ( ) ; } catch ( Throwable e ) { log . error ( String . format ( "Failed to serialize metadata " + "%s to json for %s event notification" , uuid , eventType . name ( ) ) , e ) ; } processNotification ( uuid , eventType . name ( ) , createdBy , sJson ) ; } catch ( EntityEventProcessingException e ) { log . error ( "Failed to process batch metadata event: " + e . getMessage ( ) ) ; } return uuid ; }
Throws events for the given {@link MetadataItem} uuid.
Throws events for the given { @link MetadataItem } uuid .
// fire event on monitor