@ Override @ Path ( "{package}/{asset}" ) public JSONObject get ( String assetPath , Map < String , String > headers ) throws ServiceException , JSONException { AssetServices assetServices = ServiceLocator . getAssetServices ( ) ; AssetInfo asset = assetServices . getAsset ( assetPath . substring ( 7 ) , true ) ; if ( asset == null ) throw new ServiceException ( ServiceException . NOT_FOUND , "Asset not found: " + assetPath ) ; if ( asset . getCommitInfo ( ) == null ) throw new ServiceException ( ServiceException . NOT_FOUND , "Commit Info not found: " + assetPath ) ; return asset . getCommitInfo ( ) . getJson ( ) ; }
Retrieves commit info for an asset .