org.apache.chemistry.opencmis.client.api.Document.cancelCheckOut()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(130)

本文整理了Java中org.apache.chemistry.opencmis.client.api.Document.cancelCheckOut()方法的一些代码示例,展示了Document.cancelCheckOut()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Document.cancelCheckOut()方法的具体详情如下:
包路径:org.apache.chemistry.opencmis.client.api.Document
类名称:Document
方法名:cancelCheckOut

Document.cancelCheckOut介绍

[英]If this is a PWC (private working copy) the check out will be reversed. If this is not a PWC it an exception will be thrown.
[中]如果这是PWC(私人工作副本),则退房将被撤销。如果这不是一个PWC,将抛出一个异常。

代码示例

代码示例来源:origin: org.mule.modules/mule-module-cmis

public void cancelCheckOut(CmisObject document, String documentId) {
  validateObjectOrId(document, documentId);
  validateRedundantIdentifier(document, documentId);
  CmisObject target = getCmisObject(document, documentId);
  if (target != null && target instanceof Document) {
    ((Document) target).cancelCheckOut();
  }
}

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-test-tck

workDoc.cancelCheckOut();

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-test-tck

private void createDocumentAndAttachSecondaryType(Session session, Folder testFolder, ObjectType secondaryTestType) {
  Document doc = createDocument(session, testFolder, "createandattach.txt", "Secondary Type Test");
  Document workDoc = doc;
  try {
    // test if check out is required
    boolean checkedout = false;
    if (needsCheckOut(doc)) {
      workDoc = (Document) session.getObject(doc.checkOut(), SELECT_ALL_NO_CACHE_OC);
      checkedout = true;
    }
    // attach secondary type
    ObjectId newId = workDoc.updateProperties(null, Collections.singletonList(secondaryTestType.getId()), null);
    Document newDoc = (Document) session.getObject(newId, SELECT_ALL_NO_CACHE_OC);
    // check if the secondary type is there
    boolean found = checkSecondaryType(newDoc, secondaryTestType);
    // -- detach secondary type
    if (found) {
      detachSecondaryType(session, newDoc, secondaryTestType);
    }
    // cancel a possible check out
    if (checkedout) {
      workDoc.cancelCheckOut();
    }
  } finally {
    deleteObject(doc);
  }
}

代码示例来源:origin: mswiderski/jbpm-examples

return (Document) session.getObject(newObjectId);
} catch (CmisBaseException e) {			        
  pwc.cancelCheckOut();
  throw new RuntimeException("Cannot store document in CMIS reposiory", e);

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-test-tck

workDoc.cancelCheckOut();

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-test-tck

pwc.cancelCheckOut();
    pwc = null;
} finally {
  if (pwc != null) {
    pwc.cancelCheckOut();

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-test-tck

pwc.cancelCheckOut();
  pwcId = doc.checkOut();
  pwc = (Document) session.getObject(pwcId, SELECT_ALL_NO_CACHE_OC);
  pwc.cancelCheckOut();

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-test-tck

addResult(assertEquals(1, versions.size(), null, f));
  docCheckedOut.cancelCheckOut();
} catch (CmisConstraintException ce) {
  addResult(createResult(WARNING, "Creating a checked out version failed! "

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-test-tck

addResult(createResult(SKIPPED,
        "The test PWC does not accept a new content stream. Test skipped!"));
    workDoc.cancelCheckOut();
    doc.delete(true);
    return;
workDoc.cancelCheckOut();

相关文章