extraMetadata.put("targetFuid", tAccount.getFuid());
extraMetadata.put("targetName", tAccount.getName());
} else if (target instanceof InventoryItem) {
InventoryItem inventoryItem = (InventoryItem)target;
Connection connection = inventoryItem.getConnection();
ConnectionProvider tConnectionProvider = connectionProviderFactory.connectionProviderFromId(
connection.getProviderId());
extraMetadata.put("targetExternalId", inventoryItem.getExternalId());
extraMetadata.put("targetExternalType", inventoryItem.getType());
extraMetadata.put("targetConnectionId", connection.getId());
extraMetadata.put("targetConnectionAlias", connection.getAlias());
extraMetadata.put("targetConnectionHashtags", connection.getHashtags());
extraMetadata.put("targetConnectionVersion", connection.getVersion());
extraMetadata.put("targetProviderId", tConnectionProvider.getId());
extraMetadata.put("targetProviderDisplayName", tConnectionProvider.getDisplayName());
extraMetadata.put("targetProviderType", tConnectionProvider.getType());
// Fill in the extra metadata stored in the nodeMetadata
extraMetadata.putAll(getMetadataFromInventoryItem(inventoryItem));
} else if (target instanceof Connection) {
Connection tConnection = (Connection) target;
ConnectionProvider tConnectionProvider = connectionProviderFactory.connectionProviderFromId(
tConnection.getProviderId());
extraMetadata.put("targetProviderId", tConnectionProvider.getId());
extraMetadata.put("targetProviderDisplayName", tConnectionProvider.getDisplayName());
extraMetadata.put("targetProviderType", tConnectionProvider.getType());