0

//CSElement 代码 //我正在尝试使用 RevisionTrackingManager 接口获取资产和资产数据的修订号,但它会引发异常

String assetId = "1293727029653";
String assetType = "NSP_Content_C";
String selectedRevision = "2";

AssetId aId = new AssetIdImpl(assetType, Long.valueOf(assetId));
RevisionTrackingManager rtm = new RevisionTrackingManagerImpl(ics);
AssetData revisedAsset = null;
try
{   
    out.println("<br/>-------------Calling RevisionTrackingManager-------------");
    out.println("<br/>Total versions = "+ rtm.getVersions(aId).size());
    revisedAsset = rtm.get(aId,Integer.valueOf(selectedRevision));
    out.println("After");
}
catch(Exception ex)
{
    out.println("<br/>Could not retrieve asset. Possibly cause: item might be checked out............" + ex.getMessage());
}


Above code throws exception and gives the message in catch block. Could anyone help me to fix this code?
4

1 回答 1

1

我不确定在您捕获所有异常时会引发什么类型的异常。或者,您也可以在 AssetType_T 表中找到资产的版本。希望有帮助。

于 2013-03-09T21:54:53.433 回答