agave-files/files-core/src/main/java/org/iplantc/service/io/model/LogicalFile.java
/**
	 * Serializes to json with notifications embedded in hypermedia response.
	 * @param notifications the list of notifications to add to the json representation of this node
	 * @return {@link LogicalFile} marshalled to a JSON string with notifications included
	 */
Serializes to json with notifications embedded in hypermedia response.
@param notifications the list of notifications to add to the json representation of this node
@return  LogicalFile marshalled to a JSON string with notifications included
Serializes to json with notifications embedded in hypermedia response . @param notifications the list of notifications to add to the json representation of this node @return LogicalFile marshalled to a JSON string with notifications included
public String toJsonWithNotifications(List<Notification> notifications) {
		ObjectMapper mapper = new ObjectMapper();
		ArrayNode notifArray = mapper.createArrayNode();
		if (notifications != null) {
			String baseNotificationUrl = TenancyHelper.resolveURLToCurrentTenant(Settings.IPLANT_NOTIFICATION_SERVICE);
			for(Notification n: notifications) {
				notifArray.add(mapper.createObjectNode()
						.put("href", baseNotificationUrl + n.getUuid())
						.put("title", n.getEvent()));
			}
		}
		ObjectNode hypermedia = getHypermedia();
		hypermedia.set("notification", notifArray);
		ObjectNode json = (ObjectNode)mapper.createObjectNode()
			.put("name", getName())
			.put("uuid", getUuid())
			.put("owner", getOwner())
			.put("internalUsername", getInternalUsername())
			.put("lastModified", new DateTime(getLastUpdated()).toString())
			.put("source", getSourceUri())
			.put("path", getAgaveRelativePathFromAbsolutePath())
			.put("status", getStatus())
			.put("systemId", getSystem().getSystemId())
			.put("nativeFormat", getNativeFormat())
			.set("_links", hypermedia);
		return json.toString();
	}
public String toJsonWithNotifications ( List < Notification > notifications ) { ObjectMapper mapper = new ObjectMapper ( ) ; ArrayNode notifArray = mapper . createArrayNode ( ) ; if ( notifications != null ) { String baseNotificationUrl = TenancyHelper . resolveURLToCurrentTenant ( Settings . IPLANT_NOTIFICATION_SERVICE ) ; for ( Notification n : notifications ) { notifArray . add ( mapper . createObjectNode ( ) . put ( "href" , baseNotificationUrl + n . getUuid ( ) ) . put ( "title" , n . getEvent ( ) ) ) ; } } ObjectNode hypermedia = getHypermedia ( ) ; hypermedia . set ( "notification" , notifArray ) ; ObjectNode json = ( ObjectNode ) mapper . createObjectNode ( ) . put ( "name" , getName ( ) ) . put ( "uuid" , getUuid ( ) ) . put ( "owner" , getOwner ( ) ) . put ( "internalUsername" , getInternalUsername ( ) ) . put ( "lastModified" , new DateTime ( getLastUpdated ( ) ) . toString ( ) ) . put ( "source" , getSourceUri ( ) ) . put ( "path" , getAgaveRelativePathFromAbsolutePath ( ) ) . put ( "status" , getStatus ( ) ) . put ( "systemId" , getSystem ( ) . getSystemId ( ) ) . put ( "nativeFormat" , getNativeFormat ( ) ) . set ( "_links" , hypermedia ) ; return json . toString ( ) ; }
Serializes to json with notifications embedded in hypermedia response.
Serializes to json with notifications embedded in hypermedia response .