处理暂挂资产

如果对已核准资产进行修改并执行复审流程,那么当正在复审的修订版通过核准并替换该资产之前,该资产仍然可用。在复审期间,此资产存在两个修订版:
  • 已核准资产(主资产)
  • 正在复审的资产(暂挂资产)
通过 API,可以使用 AssetIdentification 上的暂挂标志来检索任一资产。还可通过查看 RAMAsset.getIdentification() 上的暂挂标志来检查资产是否为暂挂资产或主资产。要从暂挂资产中检索主资产的 AssetIdentification,请调用 RAMAsset.getMainAssetId()。要从主资产中检索暂挂资产的 AssetIdentification,请调用 RAMAsset.getPendingAssetId()
 
		//Fetch a pending asset
		AssetIdentification revisedId = new AssetIdentification(GUID, version,true);
		RAMAsset revised= session.getAsset(revisedId);
		
		//Fetch main asset
		RAMAsset main = session.getAsset(revised.getMainAssetId());
		
		//Back to the pending
		revised = session.getAsset(main.getPendingAssetId());

反馈