本文整理了Java中javax.jcr.Node.removeSharedSet()
方法的一些代码示例,展示了Node.removeSharedSet()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.removeSharedSet()
方法的具体详情如下:
包路径:javax.jcr.Node
类名称:Node
方法名:removeSharedSet
[英]Removes this node and every other node in the shared set of this node.
This removal must be done atomically, i.e., if one of the nodes cannot be removed, the method throws the exception Node#remove() would have thrown in that case, and none of the nodes are removed.
If this node is not shared this method removes only this node.
[中]删除此节点以及此节点的共享集中的所有其他节点。
此删除必须以原子方式完成,即,如果其中一个节点无法删除,则该方法会抛出异常节点#remove()在这种情况下会抛出,并且不会删除任何节点。
如果未共享此节点,则此方法仅删除此节点。
代码示例来源:origin: net.adamcin.commons/net.adamcin.commons.jcr
public void removeSharedSet() throws RepositoryException {
this.item.removeSharedSet();
}
代码示例来源:origin: org.onehippo.cms7/hippo-repository-connector
public void removeSharedSet() throws VersionException, LockException, ConstraintViolationException, RepositoryException {
node.removeSharedSet();
}
代码示例来源:origin: apache/jackrabbit
/** {@inheritDoc} */
public void removeSharedSet() throws RepositoryException, RemoteException {
try {
node.removeSharedSet();
} catch (RepositoryException ex) {
throw getRepositoryException(ex);
}
}
代码示例来源:origin: info.magnolia/magnolia-core
@Override
public void removeSharedSet() throws VersionException, LockException, ConstraintViolationException, RepositoryException {
getWrappedNode().removeSharedSet();
}
代码示例来源:origin: nl.vpro/jcr-criteria
@Override
public void removeSharedSet() throws RepositoryException {
getNode().removeSharedSet();
}
代码示例来源:origin: brix-cms/brix-cms
public void removeSharedSet() throws VersionException, LockException,
ConstraintViolationException, RepositoryException {
getDelegate().removeSharedSet();
}
代码示例来源:origin: brix-cms/brix-cms
public void execute() throws Exception {
getDelegate().removeSharedSet();
}
});
代码示例来源:origin: apache/jackrabbit
/**
* Check new API Node.removeSharedSet() (6.13.4).
*/
public void testRemoveSharedSet() throws Exception {
// setup parent nodes and first child
Node a1 = testRootNode.addNode("a1");
Node a2 = testRootNode.addNode("a2");
Node b1 = a1.addNode("b1");
testRootNode.getSession().save();
// add mixin
ensureMixinType(b1, mixShareable);
b1.save();
// clone
Workspace workspace = b1.getSession().getWorkspace();
workspace.clone(workspace.getName(), b1.getPath(),
a2.getPath() + "/b2", false);
// remove shared set
b1.removeSharedSet();
testRootNode.getSession().save();
// verify neither a1 nor a2 contain any more children
assertFalse(a1.hasNodes());
assertFalse(a2.hasNodes());
}
代码示例来源:origin: apache/jackrabbit
/**
* Invoke Node.removeSharedSet(), but save only one of the parent nodes
* of the shared set. This doesn't need to be supported according to the
* specification (6.13.4).
*/
public void testRemoveSharedSetSaveOneParentOnly() throws Exception {
// setup parent nodes and first child
Node a1 = testRootNode.addNode("a1");
Node a2 = testRootNode.addNode("a2");
Node b1 = a1.addNode("b1");
testRootNode.getSession().save();
// add mixin
ensureMixinType(b1, mixShareable);
b1.save();
// clone
Workspace workspace = b1.getSession().getWorkspace();
workspace.clone(workspace.getName(), b1.getPath(),
a2.getPath() + "/b2", false);
// remove shared set
b1.removeSharedSet();
try {
// save only one of the parents, should fail
a1.save();
fail("Removing a shared set requires saving all parents.");
} catch (ConstraintViolationException e) {
// expected
}
}
内容来源于网络,如有侵权,请联系作者删除!