本文整理了Java中org.nuxeo.ecm.core.api.Lock.getFailed()
方法的一些代码示例,展示了Lock.getFailed()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Lock.getFailed()
方法的具体详情如下:
包路径:org.nuxeo.ecm.core.api.Lock
类名称:Lock
方法名:getFailed
[英]The failure state, used for removal results.
[中]故障状态,用于删除结果。
代码示例来源:origin: org.nuxeo.ecm.core/nuxeo-core
@Override
public Lock removeLock(DocumentRef docRef) throws LockException {
Document doc = resolveReference(docRef);
String owner;
if (hasPermission(docRef, UNLOCK)) {
// always unlock
owner = null;
} else {
owner = getPrincipal().getName();
}
Lock lock = doc.removeLock(owner);
if (lock == null) {
// there was no lock, we're done
return null;
}
if (lock.getFailed()) {
// lock removal failed due to owner check
throw new LockException("Document already locked by " + lock.getOwner() + ": " + docRef);
}
DocumentModel docModel = readModel(doc);
Map<String, Serializable> options = new HashMap<>();
options.put("lock", lock);
notifyEvent(DocumentEventTypes.DOCUMENT_UNLOCKED, docModel, options, null, null, true, false);
return lock;
}
代码示例来源:origin: org.nuxeo.ecm.core/nuxeo-core-storage-sql
if (oldLock != null && oldLock.getFailed()) {
内容来源于网络,如有侵权,请联系作者删除!