agave-common/common-core/src/main/java/org/iplantc/service/common/uuid/UUIDEntityLookup.java
/**
	 * Returns the url for a logical file by querying the db by uuid and constructing a valid url
	 * @param uuid the uuid of the <code>LogicalFile</code>
	 * @return the url for the given logical file
	 * @throws UUIDException if the uuid is invalid or query cannot be run.
	 */
Returns the url for a logical file by querying the db by uuid and constructing a valid url
@param uuid the uuid of the LogicalFile
@return the url for the given logical file
@throws UUIDException if the uuid is invalid or query cannot be run.
Returns the url for a logical file by querying the db by uuid and constructing a valid url @param uuid the uuid of the LogicalFile @return the url for the given logical file @throws UUIDException if the uuid is invalid or query cannot be run .
protected static String resolveLogicalFileURLFromUUID(String uuid) throws UUIDException
	{
		String sql = "SELECT s.system_id as fileitem_systemid, st.home_dir, st.root_dir, f.path as absolutepath, f.tenant_id"
		        + " FROM logical_files f" 
		        + "   LEFT JOIN systems s ON f.system_id = s.id" 
		        + "   LEFT JOIN storageconfigs st ON s.storage_config = st.id"
		        + " WHERE f.uuid = '" + uuid + "'";
		Map<String,Object> map = getEntityFieldByUuid(sql);
		if (map.isEmpty()) {
		    String msg = "No such UUID present: " + uuid;
		    log.error(msg);
			throw new UUIDException(msg);
		}
		else 
		{
			String resolvedPath = getAgaveAbsolutePathFromAbsolutePath((String)map.get("absolutepath"),
																	(String)map.get("root_dir"), 
																	(String)map.get("home_dir"));
			return Settings.IPLANT_FILE_SERVICE + 
						"media/system/" + 
						map.get("fileitem_systemid") +
						File.separator + resolvedPath;
		}
	}
protected static String resolveLogicalFileURLFromUUID ( String uuid ) throws UUIDException { String sql = "SELECT s.system_id as fileitem_systemid, st.home_dir, st.root_dir, f.path as absolutepath, f.tenant_id" + " FROM logical_files f" + "   LEFT JOIN systems s ON f.system_id = s.id" + "   LEFT JOIN storageconfigs st ON s.storage_config = st.id" + " WHERE f.uuid = '" + uuid + "'" ; Map < String , Object > map = getEntityFieldByUuid ( sql ) ; if ( map . isEmpty ( ) ) { String msg = "No such UUID present: " + uuid ; log . error ( msg ) ; throw new UUIDException ( msg ) ; } else { String resolvedPath = getAgaveAbsolutePathFromAbsolutePath ( ( String ) map . get ( "absolutepath" ) , ( String ) map . get ( "root_dir" ) , ( String ) map . get ( "home_dir" ) ) ; return Settings . IPLANT_FILE_SERVICE + "media/system/" + map . get ( "fileitem_systemid" ) + File . separator + resolvedPath ; } }
Returns the url for a logical file by querying the db by uuid and constructing a valid url
 @param uuid the uuid of the <code>LogicalFile</code>
 @return the url for the given logical file
 @throws UUIDException if the uuid is invalid or query cannot be run.
Returns the url for a logical file by querying the db by uuid and constructing a valid url @param uuid the uuid of the <code > LogicalFile< / code > @return the url for the given logical file @throws UUIDException if the uuid is invalid or query cannot be run .