workspace().internalClone(sourceWorkspaceName, node.getPath(), targetNode.getPath() + "/" + node.getName(), false, true);
workspace().internalClone(sourceWorkspaceName, node.getPath(), targetNode.getPath() + "/" + node.getName(), false, true);
case OnParentVersionAction.ABORT: I18n msg = JcrI18n.cannotCheckinNodeWithAbortProperty; throw new VersionException(msg.text(property.getName(), node.getName())); case OnParentVersionAction.COPY: case OnParentVersionAction.VERSION:
@Test public void shouldHaveEmptyName() throws Exception { String name = rootNode.getName(); assertThat(name, notNullValue()); assertThat(name.length(), is(0)); }
case OnParentVersionAction.ABORT: I18n msg = JcrI18n.cannotCheckinNodeWithAbortProperty; throw new VersionException(msg.text(property.getName(), node.getName())); case OnParentVersionAction.COPY: case OnParentVersionAction.VERSION:
@Test public void shouldHaveNameThatExcludesSameNameSiblingIndex() throws Exception { assertThat(altima.getName(), is("Nissan Altima")); javax.jcr.Node altima2 = hybrid.addNode("Nissan Altima"); try { assertThat(altima2, is(notNullValue())); assertThat(altima2.getPath(), is("/Cars/Hybrid/Nissan Altima[2]")); assertThat(altima2.getName(), is("Nissan Altima")); } finally { altima2.remove(); // remove the node we added in this test to not interfere with other tests } }
case OnParentVersionAction.ABORT: throw new VersionException(JcrI18n.cannotCheckinNodeWithAbortChildNode.text(nodeName, node.getParent().getName())); case OnParentVersionAction.VERSION: if (node.isNodeType(JcrMixLexicon.VERSIONABLE)) {
case OnParentVersionAction.ABORT: throw new VersionException(JcrI18n.cannotCheckinNodeWithAbortChildNode.text(nodeName, node.getParent().getName())); case OnParentVersionAction.VERSION: if (node.isNodeType(JcrMixLexicon.VERSIONABLE)) {
throw new ConstraintViolationException(JcrI18n.cannotRemoveMixinNoChildNodeDefinition.text( mixinName, child.getName(), location(), readable(primaryTypeName),
throw new ConstraintViolationException(JcrI18n.cannotRemoveMixinNoChildNodeDefinition.text( mixinName, child.getName(), location(), readable(primaryTypeName),
if (work.getSelectedPath().equals(work.getOutputPath())) { outputNode = selectedNode.getName().equals(JcrConstants.JCR_CONTENT) ? selectedNode.getParent() : selectedNode; primaryType = selectedNode.getPrimaryNodeType().getName(); } else { if (parentOfOutput.isNew() && parentOfOutput.getName().equals(outputNodeName)) {
if (work.getSelectedPath().equals(work.getOutputPath())) { outputNode = selectedNode.getName().equals(JcrConstants.JCR_CONTENT) ? selectedNode.getParent() : selectedNode; primaryType = selectedNode.getPrimaryNodeType().getName(); } else { if (parentOfOutput.isNew() && parentOfOutput.getName().equals(outputNodeName)) {