/**
* 检出workable对象
* @param workable 实现workable接口的实例
* @throws WTException
* @throws WTPropertyVetoException
*/
public static Workable checkoutObj(Workable workable) throws WTException,
WTPropertyVetoException {
if (WorkInProgressHelper.isWorkingCopy(workable)
|| WorkInProgressHelper.isCheckedOut(workable) || LockHelper.isLocked(workable)) {
Object obj[] = { IdentityFactory.getDisplayIdentifier(workable).toString(),
LockHelper.getLocker(workable).toString() };
throw new WTException("wt.clients.doc.DocRB", "10", obj);
}
CheckoutLink checkoutLink = WorkInProgressHelper.service.checkout(workable,
WorkInProgressHelper.service.getCheckoutFolder(), null);
Workable workableCopy = checkoutLink.getWorkingCopy();
return workableCopy;
}
checkout obj
最新推荐文章于 2024-03-01 09:43:46 发布