Node api in aem

Node api in aem DEFAULT

Java Code Examples for javax.jcr.Node

The following examples show how to use javax.jcr.Node. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.

Example 1

private void updateTemplateNodes() throws RepositoryException { // add shortcutType node to all report templates nodes String statement = "/jcr:root" + ISO9075.encodePath(StorageConstants.REPORTS_ROOT) + "//*[@className='ro.nextreports.server.domain.Report']/templates"; QueryResult queryResult = getTemplate().query(statement); NodeIterator nodes = queryResult.getNodes(); LOG.info("Add shortcutType node to all report templates nodes : Found " + nodes.getSize() + " report nodes"); while (nodes.hasNext()) { Node node = nodes.nextNode(); NodeIterator templatesForReport = node.getNodes(); while (templatesForReport.hasNext()) { Node template = templatesForReport.nextNode(); Node shortcutTypeNode = template.addNode("shortcutType"); shortcutTypeNode.setProperty("type", 0); shortcutTypeNode.setProperty("timeType", 0); shortcutTypeNode.setProperty("timeUnits", 0); } } getTemplate().save(); }

Example 2

/** * Imports an empty package with a filter "/testnode" relative to "/testnode". Since this is a relative import, * the "/testnode" would map to "/testnode/testnode". So the import should not remove "/testnode". */ @Test public void testRelativeEmptyImport() throws IOException, RepositoryException, ConfigurationException { ZipArchive archive = new ZipArchive(getTempFile("/test-packages/empty_testnode.zip")); admin.getRootNode().addNode(TEST_ROOT.substring(1, TEST_ROOT.length())); admin.save(); archive.open(true); Node rootNode = admin.getNode(TEST_ROOT); ImportOptions opts = getDefaultOptions(); Importer importer = new Importer(opts); importer.run(archive, rootNode); assertNodeExists(TEST_ROOT); }

Example 3

/** * Edit comment and mark it as author edited. * * @param request The current request to get session and Resource Resolver * @param id The comment UUID * @param text The comment text * @return true if the operation was successful */ public boolean editComment(final SlingHttpServletRequest request, final String id, String text) { boolean result = false; try { Session session = request.getResourceResolver().adaptTo(Session.class); Node node = session.getNodeByIdentifier(id); if (node != null) { JcrResourceUtil.setProperty(node, PublickConstants.COMMENT_PROPERTY_COMMENT, text); JcrResourceUtil.setProperty(node, PublickConstants.COMMENT_PROPERTY_EDITED, true); session.save(); result = true; } } catch (RepositoryException e) { LOGGER.error("Could not update comment from JCR", e); } return result; }

Example 4

/** * {@inheritDoc} * * Returns {@code true} if the item is a node of type nt:hierarchyNode * that has or defines a 'jcr:content' child node. */ public boolean matches(Item item) throws RepositoryException { if (item.isNode()) { Node node = (Node) item; if (node.isNodeType(JcrConstants.NT_HIERARCHYNODE)) { if (node.hasNode(JcrConstants.JCR_CONTENT)) { return true; } else { for (NodeDefinition pd: node.getPrimaryNodeType().getChildNodeDefinitions()) { if (pd.getName().equals(JcrConstants.JCR_CONTENT)) { return true; } } } } } return false; }

Example 5

/** * Creates a new jcr vault package. * * @param parent the parent node * @param pid the package id of the new package. * @param bin the binary containing the zip * @param archive the archive with the meta data * @return the created jcr vault package. * @throws RepositoryException if an repository error occurs * @throws IOException if an I/O error occurs * * @since 3.1 */ @NotNull private JcrPackage createNew(@NotNull Node parent, @NotNull PackageId pid, @NotNull Binary bin, @NotNull MemoryArchive archive) throws RepositoryException, IOException { Node node = parent.addNode(Text.getName(getInstallationPath(pid) + ".zip"), JcrConstants.NT_FILE); Node content = node.addNode(JcrConstants.JCR_CONTENT, JcrConstants.NT_RESOURCE); content.addMixin(JcrPackage.NT_VLT_PACKAGE); Node defNode = content.addNode(JcrPackage.NN_VLT_DEFINITION); JcrPackageDefinitionImpl def = new JcrPackageDefinitionImpl(defNode); def.set(JcrPackageDefinition.PN_NAME, pid.getName(), false); def.set(JcrPackageDefinition.PN_GROUP, pid.getGroup(), false); def.set(JcrPackageDefinition.PN_VERSION, pid.getVersionString(), false); def.touch(null, false); content.setProperty(JcrConstants.JCR_LASTMODIFIED, Calendar.getInstance()); content.setProperty(JcrConstants.JCR_MIMETYPE, JcrPackage.MIME_TYPE); content.setProperty(JcrConstants.JCR_DATA, bin); def.unwrap(archive, false); dispatch(PackageEvent.Type.CREATE, pid, null); return new JcrPackageImpl(this, node); }

Example 6

private void unlockAllChildNodes(Node node,User user,List<Node> nodeList,String rootPath) throws Exception{ NodeIterator iter=node.getNodes(); while(iter.hasNext()){ Node nextNode=iter.nextNode(); String absPath=nextNode.getPath(); if(!lockManager.isLocked(absPath)){ continue; } Lock lock=lockManager.getLock(absPath); String owner=lock.getLockOwner(); if(!user.getUsername().equals(owner)){ throw new NodeLockException("当前目录下有子目录被其它人锁定,您不能执行锁定"+rootPath+"目录"); } nodeList.add(nextNode); unlockAllChildNodes(nextNode, user, nodeList, rootPath); } }

Example 7

private Node modifyPrimaryType(Node node, ImportInfoImpl info) throws RepositoryException { String name = node.getName(); Node parent = node.getParent(); // check versionable ensureCheckedOut(node, info); ChildNodeStash recovery = new ChildNodeStash(node.getSession()); recovery.stashChildren(node); node.remove(); // now create the new node Node newNode = parent.addNode(name, nodeType); info.onReplaced(newNode.getPath()); // move the children back recovery.recoverChildren(newNode, info); return newNode; }

Example 8

@Test public void testGetPackageRootNoRootAccess() throws Exception { Node packageRoot = packMgr.getPackageRoot(); // TODO: maybe rather change the setup of the test-base to not assume that everyone has full read-access AccessControlManager acMgr = admin.getAccessControlManager(); JackrabbitAccessControlList acl = AccessControlUtils.getAccessControlList(acMgr, "/"); acMgr.removePolicy(acl.getPath(), acl); AccessControlUtils.getAccessControlList(acMgr, "/etc/packages"); AccessControlUtils.allow(packageRoot, org.apache.jackrabbit.oak.spi.security.principal.EveryonePrincipal.NAME, javax.jcr.security.Privilege.JCR_READ); admin.save(); Session anonymous = repository.login(new GuestCredentials()); try { assertFalse(anonymous.nodeExists("/")); assertFalse(anonymous.nodeExists("/etc")); assertTrue(anonymous.nodeExists("/etc/packages")); JcrPackageManagerImpl jcrPackageManager = new JcrPackageManagerImpl(anonymous, new String[0]); jcrPackageManager.getPackageRoot(false); } finally { anonymous.logout(); } }

Example 9

private void purge(final Context context, final ActionResult actionResult) throws RepositoryException, ActionExecutionException { NodeIterator iterator = getPermissions(context); String normalizedPath = normalizePath(path); while (iterator != null && iterator.hasNext()) { Node node = iterator.nextNode(); if (node.hasProperty(PermissionConstants.REP_ACCESS_CONTROLLED_PATH)) { String parentPath = node.getProperty(PermissionConstants.REP_ACCESS_CONTROLLED_PATH) .getString(); String normalizedParentPath = normalizePath(parentPath); boolean isUsersPermission = parentPath.startsWith(context.getCurrentAuthorizable().getPath()); if (StringUtils.startsWith(normalizedParentPath, normalizedPath) && !isUsersPermission) { RemoveAll removeAll = new RemoveAll(parentPath); ActionResult removeAllResult = removeAll.execute(context); if (Status.ERROR.equals(removeAllResult.getStatus())) { copyErrorMessages(removeAllResult, actionResult); } } } } }

Example 10

private void scan(Node dir) throws RepositoryException { NodeIterator iter = dir.getNodes(); while (iter.hasNext()) { Node child = iter.nextNode(); String name = child.getName(); if (".svn".equals(name) || ".vlt".equals(name)) { continue; } if (child.isNodeType(JcrConstants.NT_FOLDER)) { exportInfo.update(ExportInfo.Type.RMDIR, child.getPath()); scan(child); } else if (child.isNodeType(JcrConstants.NT_FILE)) { exportInfo.update(ExportInfo.Type.DELETE, child.getPath()); } } }

Example 11

/** * {@inheritDoc} */ public boolean includes(Node root, Node node, String path) throws RepositoryException { if (path == null) { path = node.getPath(); } int depth = PathUtil.getDepth(path) - root.getDepth(); boolean isFile = root.isNodeType(JcrConstants.NT_FILE); if (depth == 0) { // should not happen, but ok. return true; } else if (depth == 1) { // on root level, we only allow "jcr:content" if it's a file if (isFile && node.getName().equals(JcrConstants.JCR_CONTENT)) { return true; } } else { // no sub nodes. } // only respect content filter if not empty return !contentFilter.isEmpty() && contentFilter.contains(node, path, depth); }

Example 12

/** * {@inheritDoc} */ @Override public void onWalkBegin(Node root) throws RepositoryException { // init ignored protected properties ignored.clear(); ignored.add(JcrConstants.JCR_CREATED); ignored.add(JcrConstants.JCR_CREATED_BY); ignored.add(JcrConstants.JCR_BASEVERSION); ignored.add(JcrConstants.JCR_VERSIONHISTORY); ignored.add(JcrConstants.JCR_PREDECESSORS); try { writer.writeStartDocument(); } catch (XMLStreamException e) { throw new RepositoryException(e); } }

Example 13

protected void doExecute(VaultFsConsoleExecutionContext ctx, CommandLine cl) throws Exception { String jcrPath = (String) cl.getValue(argJcrPath); if (jcrPath == null) { jcrPath = "/"; } ConsoleFile wo = ctx.getFile(jcrPath, true); if (wo instanceof RepositoryCFile) { Node node = (Node) wo.unwrap(); try { node.getSession().refresh(cl.hasOption(optKeepChanges)); System.out.println("Modifications refreshed."); } catch (RepositoryException e) { throw new ExecutionException("Error while refreshing: " + e); } } else { throw new ExecutionException("'refresh' only possible in repcontext"); } }

Example 14

public ConsoleFile[] listFiles() throws IOException { try { if (item.isNode()) { Node node = (Node) item; ArrayList<RepositoryCFile> ret = new ArrayList<RepositoryCFile>(); PropertyIterator piter = node.getProperties(); while (piter.hasNext()) { ret.add(new RepositoryCFile(piter.nextProperty())); } NodeIterator niter = node.getNodes(); while (niter.hasNext()) { ret.add(new RepositoryCFile(niter.nextNode())); } return ret.toArray(new RepositoryCFile[ret.size()]); } else { return ConsoleFile.EMPTY_ARRAY; } } catch (RepositoryException e) { throw new IOException(e.toString()); } }

Example 15

private void include(Node node, String nodePath) throws RepositoryException { if (nodePath == null) { nodePath = node.getPath(); } String relPath = nodePath.substring(path.length()); if (includes == null || !includes.contains(relPath)) { if (log.isDebugEnabled()) { log.trace("including {} -> {}", path, nodePath); } if (includes == null) { includes = new HashSet<String>(); } includes.add(mgr.cacheString(relPath)); if (!node.isSame(getNode())) { // ensure that parent nodes are included include(node.getParent(), null); } } }

Example 16

private int doPropertyType(Node pdi) throws ParseException, RepositoryException { if (!currentTokenEquals(Lexer.BEGIN_TYPE)) { return PropertyType.UNDEFINED; } nextToken(); int type = PropertyType.UNDEFINED; if (currentTokenEquals(Lexer.STRING)) { type = PropertyType.STRING; } else if (currentTokenEquals(Lexer.BINARY)) { type = PropertyType.BINARY; } else if (currentTokenEquals(Lexer.LONG)) { type = PropertyType.LONG; } else if (currentTokenEquals(Lexer.DOUBLE)) { type = PropertyType.DOUBLE; } else if (currentTokenEquals(Lexer.BOOLEAN)) { type = PropertyType.BOOLEAN; } else if (currentTokenEquals(Lexer.DATE)) { type = PropertyType.DATE; } else if (currentTokenEquals(Lexer.NAME)) { type = PropertyType.NAME; } else if (currentTokenEquals(Lexer.PATH)) { type = PropertyType.PATH; } else if (currentTokenEquals(Lexer.REFERENCE)) { type = PropertyType.REFERENCE; } else if (currentTokenEquals(Lexer.UNDEFINED)) { type = PropertyType.UNDEFINED; } else { lexer.fail("Unknown property type '" + currentToken + "' specified"); } pdi.setProperty(JcrConstants.JCR_REQUIREDTYPE, PropertyType.nameFromValue(type).toUpperCase()); nextToken(); if (!currentTokenEquals(Lexer.END_TYPE)) { lexer.fail("Missing '" + Lexer.END_TYPE + "' delimiter for end of property type"); } nextToken(); return type; }

Example 17

/** * {@inheritDoc} * * Matches if the declaring node type of the item is equal to the one * specified in this filter. If the item is a node and {@code propsOnly} * flag is {@code true} it returns {@code false}. */ public boolean matches(Item item) throws RepositoryException { if (item.isNode()) { return !propsOnly && ((Node) item).getDefinition().getDeclaringNodeType().getName().equals(nodeType); } else { return ((Property) item).getDefinition().getDeclaringNodeType().getName().equals(nodeType); } }

Example 18

/** * {@inheritDoc} */ public ImportInfo accept(Session session, Aggregate file, ArtifactSet artifacts) throws RepositoryException, IOException { Node node = file.getNode(); String name = node.getName(); return accept(file.getManager().getWorkspaceFilter(), name.length() == 0 ? node : node.getParent(), name, (ArtifactSetImpl) artifacts); }

Example 19

public Entity getEntityById(String id) throws NotFoundException { if (entitiesCache.hasElement(id)) { return (Entity) entitiesCache.get(id); } Node node = checkId(id); Entity entity = getEntity(node); entitiesCache.put(id, entity); return entity; }

Example 20

private Optional<ArtifactMetadata> getArtifactOptional(final String repositoryId, final Node n) { try { return Optional.ofNullable(getArtifactFromNode(repositoryId, n)); } catch (RepositoryException e) { return Optional.empty(); } }

Example 21

protected boolean isVersionable(Node node) { try { return node.isNodeType("mix:versionable"); } catch (RepositoryException e) { throw convertJcrAccessException(e); } }

Example 22

private boolean isCloudBoundFolder(Resource resource) { if (isVirtual(resource)) { return false; } Node node = resource.adaptTo(Node.class); try { return node.hasProperty("cq:catalogDataResourceProviderFactory"); } catch (RepositoryException ex) { return false; } }

Example 23

private long getStorageVersion() throws Exception { if (jcrTemplate.itemExists(StorageConstants.NEXT_SERVER_ROOT)) { Node node = (Node) jcrTemplate.getItem(StorageConstants.NEXT_SERVER_ROOT); return node.getProperty("version").getLong(); } return -1; }

Example 24

/** * {@inheritDoc} */ @Nullable public Node getDefNode() throws RepositoryException { Node content = getContent(); return content != null && content.hasNode(NN_VLT_DEFINITION) ? content.getNode(NN_VLT_DEFINITION) : null; }

Example 25

private static Optional<License> getLicense(Node licenseNode) { try { String licenseName = licenseNode.getName(); String licenseUrl = getPropertyString(licenseNode, "url"); License license = new License(); license.setName(licenseName); license.setUrl(licenseUrl); return Optional.of(license); } catch (RepositoryException e) { return Optional.empty(); } }

Example 26

private List<String> crawl(final Node node) throws RepositoryException { List<String> paths = new ArrayList<>(); paths.add(node.getPath()); for (NodeIterator iter = node.getNodes(); iter.hasNext(); ) { paths.addAll(crawl(iter.nextNode())); } return paths; }

Example 27

private Script saveScript(FileDescriptor descriptor, LaunchMetadata launchMetadata, boolean overwrite, ResourceResolver resolver) { Script result = null; try { final Session session = resolver.adaptTo(Session.class); final ValueFactory valueFactory = session.getValueFactory(); final Binary binary = valueFactory.createBinary(descriptor.getInputStream()); final Node saveNode = session.getNode(descriptor.getPath()); final Node fileNode, contentNode; if (overwrite && saveNode.hasNode(descriptor.getName())) { fileNode = saveNode.getNode(descriptor.getName()); contentNode = fileNode.getNode(JcrConstants.JCR_CONTENT); } else { fileNode = saveNode.addNode(generateFileName(descriptor.getName(), saveNode), JcrConstants.NT_FILE); contentNode = fileNode.addNode(JcrConstants.JCR_CONTENT, JcrConstants.NT_RESOURCE); } contentNode.setProperty(JcrConstants.JCR_DATA, binary); contentNode.setProperty(JcrConstants.JCR_ENCODING, SCRIPT_ENCODING.name()); fileNode.addMixin(ScriptNode.APM_SCRIPT); fileNode.setProperty(ScriptNode.APM_LAUNCH_ENABLED, launchMetadata.isExecutionEnabled()); setOrRemoveProperty(fileNode, ScriptNode.APM_LAUNCH_MODE, launchMetadata.getLaunchMode()); setOrRemoveProperty(fileNode, ScriptNode.APM_LAUNCH_ENVIRONMENT, launchMetadata.getLaunchEnvironment()); setOrRemoveProperty(fileNode, ScriptNode.APM_LAUNCH_HOOK, launchMetadata.getExecutionHook()); setOrRemoveProperty(fileNode, ScriptNode.APM_LAUNCH_SCHEDULE, launchMetadata.getExecutionSchedule()); removeProperty(fileNode, ScriptNode.APM_LAST_EXECUTED); JcrUtils.setLastModified(fileNode, Calendar.getInstance()); session.save(); result = scriptFinder.find(fileNode.getPath(), resolver); } catch (RepositoryException e) { LOG.error(e.getMessage(), e); } return result; }

Example 28

private void retrieveFacetProperties(FacetedMetadata metadata, Node node) throws RepositoryException { for (Node n : JcrUtils.getChildNodes(node)) { if (n.isNodeType(FACET_NODE_TYPE)) { String name = n.getName(); MetadataFacetFactory factory = metadataService.getFactory(name); if (factory == null) { log.error("Attempted to load unknown project version metadata facet: {}", name); } else { MetadataFacet facet = createFacetFromNode(factory, n); metadata.addFacet(facet); } } } }

Example 29

@Override public void removeTimestampedArtifact(RepositorySession session, ArtifactMetadata artifactMetadata, String baseVersion) throws MetadataRepositoryException { final Session jcrSession = getSession(session); String repositoryId = artifactMetadata.getRepositoryId(); try { Node root = jcrSession.getRootNode(); String path = getProjectVersionPath(repositoryId, artifactMetadata.getNamespace(), artifactMetadata.getProject(), baseVersion); if (root.hasNode(path)) { Node node = root.getNode(path); for (Node n : JcrUtils.getChildNodes(node)) { if (n.isNodeType(ARTIFACT_NODE_TYPE)) { if (n.hasProperty("version")) { String version = n.getProperty("version").getString(); if (StringUtils.equals(version, artifactMetadata.getVersion())) { n.remove(); } } } } } } catch (RepositoryException e) { throw new MetadataRepositoryException(e.getMessage(), e); } }

Example 30

@Override public void removeRepository(RepositorySession session, String repositoryId) throws MetadataRepositoryException { final Session jcrSession = getSession(session); try { Node root = jcrSession.getRootNode(); String path = getRepositoryPath(repositoryId); if (root.hasNode(path)) { root.getNode(path).remove(); } } catch (RepositoryException e) { throw new MetadataRepositoryException(e.getMessage(), e); } }
Sours: https://www.programcreek.com/java-api-examples/?api=javax.jcr.Node

toodooleedoo/README.md

packageorg.main.test; importjavax.jcr.Node; importjavax.jcr.NodeIterator; importjavax.jcr.Session; importorg.slf4j.Logger; importorg.slf4j.LoggerFactory; importcom.day.cq.wcm.api.Page; publicclassNodePlay {privatefinalstaticLoggerLOG=LoggerFactory.getLogger(NodePlay.class.getName());publicstaticvoidsample(PagecurrentPage, SessionjcrSess) {try {Node jcrNode = currentPage.getContentResource().adaptTo(Node.class); jcrNode.setProperty("javaProperty", "yes");LOG.error("set javaProperty properties value to yes of "+currentPage.getName());if(! jcrNode.hasNode("javaAddNode2")) { jcrNode.addNode("javaAddNode2"); jcrNode.addNode("javaAddNode2/javaAddNode2"); jcrNode.addNode("javaAddNode2/javaAddNode2/javaaddednode");Node n3 = jcrNode.getNode("javaAddNode2/javaAddNode2"); n3.setProperty("n3added", "yes");LOG.error("added javaAddNode2 and it's tree"); } else {LOG.error("javaAddNode2 already exists"); }NodeIterator jcrNodeItr = jcrNode.getNodes();while(jcrNodeItr.hasNext()) {LOG.error("itr");Node nn = jcrNodeItr.nextNode(); nn.setProperty("itrprop","yes");LOG.error("added itrprop to: "+nn.getName());if(nn.getName() !="javaAddNode2") {LOG.error("Removing non javaAddNode2 node: "+nn.getName()); nn.remove(); } }LOG.error("Saving"); jcrSess.save(); } catch(Exception e) {LOG.error("Caught Exception: "+e); } }}
Sours: https://gist.github.com/toodooleedoo/87a196817fee1ca6ca11
  1. Aws batch python example
  2. Cvs wax road
  3. Honda cbr250 top speed
  4. External usb cd burner
  5. Joico red hair color

Best Java code snippets using javax.jcr.Node.setProperty(Showing top 20 results out of 1,800)

Refine searchRefine arrow

  • Common ways to obtain Node

    private void myMethod () {

    }

    protectedvoid setUpFullTextTest() throws RepositoryException { Node node = testRootNode.addNode(nodeName1, testNodeType); node.setProperty(propertyName1, "The quick brown fox jumps over the lazy dog."); node = testRootNode.addNode(nodeName2, testNodeType); node.setProperty(propertyName1, "The quick brown cat jumps over the lazy dog."); testRootNode.getSession().save(); }
    publicvoid testNewStringPropertyParent() throws Exception { testNode.setProperty(propertyName1, s1); testRootNode.getSession().save(); assertEquals("Setting property with Node.setProperty(String, String) and parentNode.save() not working", s1, testNode.getProperty(propertyName1).getString()); }
    publicvoid testMergeNodeNonCorrespondingNodeJcr2() throws RepositoryException { Node subNode = nodeToMerge.addNode(nodeName3, versionableNodeType); subNode.setProperty(propertyName1, CHANGED_STRING); superuserW2.save(); VersionManager versionManager = subNode.getSession().getWorkspace().getVersionManager(); String path = subNode.getPath(); versionManager.checkin(path); versionManager.merge(path, workspace.getName(), true); assertTrue(subNode.getProperty(propertyName1).getString().equals(CHANGED_STRING)); }
    @Testpublicvoid setPropertyStringStringInt() throws RepositoryException { Node node = MgnlContext.getJCRSession("website").getRootNode().addNode("test", MgnlNodeType.NT_CONTENT); assertTrue(NodeUtil.isWrappedWith(node, MgnlAuditLoggingContentDecoratorNodeWrapper.class)); node.setProperty("test", "true", PropertyType.BOOLEAN); assertEquals(PropertyType.BOOLEAN, node.getProperty("test").getType()); }
    @Testpublicvoid setInexistentProperty() throws RepositoryException { Node node = getNode(TEST_PATH); node.addMixin(JcrConstants.MIX_VERSIONABLE); node.getSession().save(); node.getSession().getWorkspace().getVersionManager().checkin(TEST_PATH); node.setProperty("inexistent", (Value) null); }
    @Testpublicvoid doNotOverride() throws Exception { sessionConfig.getRootNode().addNode("someSrcNode").setProperty("someProperty", "somePropertyValue"); sessionConfig.getRootNode().addNode("someDestNode").setProperty("someProperty", "someOldValue"); Task task = new CopyPropertyTask("name", RepositoryConstants.CONFIG, "/someSrcNode", "/someDestNode", "someProperty", false); task.execute(installContext); assertTrue(sessionConfig.propertyExists("/someSrcNode/someProperty")); assertEquals("someOldValue", sessionConfig.getProperty("/someDestNode/someProperty").getString()); }
    @Testpublicvoid testSetReferenceProperty() throws Exception { final String reference2bPropertyName = "reference2b"; Node a = root.addNode("a"); Node b = root.addNode("b"); a.setProperty(reference2bPropertyName, b); Node referencedByPropertyB = a.getProperty(reference2bPropertyName).getNode(); assertEquals(b, referencedByPropertyB); }
    @Before publicvoid setUp() throws Exception { super.setUp(); Session session = MgnlContext.getJCRSession(WEBSITE); session.getWorkspace().getNamespaceRegistry().registerNamespace("unwanted", "urn:unwanted:1.0"); Node foo = session.getRootNode().addNode("foo", NT_UNSTRUCTURED); foo.setProperty("unwanted:prop", "val1"); Node bar = foo.addNode("unwanted:bar", NT_UNSTRUCTURED); bar.setProperty("unwanted:prop", "val2"); }
    publicvoid call() throws RepositoryException { testRootNode.addNode(nodeName1, testNodeType).setProperty(propertyName1, "test"); testRootNode.getSession().save(); } }, Event.PROPERTY_ADDED);
    @Testpublicvoid testNodeReturnedFromParentIsWrapped() throws Exception { MockSession session = new MockSession("sessionName"); Node rootNode = session.getRootNode(); Node foo = rootNode.addNode("foo"); Node fooChild = foo.addNode("fooChild"); foo.setProperty("text", "<html/>"); HTMLEscapingNodeWrapper wrapper = new HTMLEscapingNodeWrapper(fooChild, false); Property property = wrapper.getParent().getProperty("text"); assertTrue(property instanceof HTMLEscapingPropertyWrapper); assertEquals("&lt;html/&gt;", property.getString()); }
    publicvoid testNewValueArrayPropertyParentWithPropertyType() throws Exception { testNode.setProperty(propertyName2, vArray1, PropertyType.STRING); testRootNode.getSession().save(); assertEquals("Setting properties with Node.setProperty(String, Value[], int) and parentNode.save() not working", Arrays.asList(vArray1), Arrays.asList(testNode.getProperty(propertyName2).getValues())); }
    publicvoid testSimpleQuerySQL4() throws Exception { Node foo = testRootNode.addNode("foo"); foo.setProperty("bla", new String[]{"bla"}); Node bla = testRootNode.addNode("bla"); bla.setProperty("bla", new String[]{"bla"}); testRootNode.save(); String sql = "SELECT * FROM nt:unstructured WHERE jcr:path LIKE '" + testRoot + "/%'"; Query q = superuser.getWorkspace().getQueryManager().createQuery(sql, Query.SQL); QueryResult result = q.execute(); checkResult(result, 2); }
    publicvoid call() throws RepositoryException { testRootNode.addNode(nodeName1, testNodeType).setProperty(propertyName1, "test"); testRootNode.getSession().save(); } }, Event.PROPERTY_ADDED);
    @Testpublicvoid testNodeReturnedFromAncestorIsWrapped() throws Exception { MockSession session = new MockSession("sessionName"); Node rootNode = session.getRootNode(); Node foo = rootNode.addNode("foo"); Node fooChild = foo.addNode("fooChild"); foo.setProperty("text", "<html/>"); HTMLEscapingNodeWrapper wrapper = new HTMLEscapingNodeWrapper(fooChild, false); Property property = ((Node) wrapper.getAncestor(1)).getProperty("text"); assertTrue(property instanceof HTMLEscapingPropertyWrapper); assertEquals("&lt;html/&gt;", property.getString()); }
    publicvoid testNewLongPropertyParent() throws Exception { testNode.setProperty(propertyName1, l1); testRootNode.getSession().save(); assertEquals("Setting property with Node.setProperty(String, long) and parentNode.save() not working", new Long(l1), new Long(testNode.getProperty(propertyName1).getLong())); }
    @Before publicvoid setUp() throws Exception { super.setUp(); session = MgnlContext.getJCRSession(WEBSITE); session.getWorkspace().getNamespaceRegistry().registerNamespace("yes", "urn:yes:1.0"); session.getWorkspace().getNamespaceRegistry().registerNamespace("no", "urn:no:1.0"); Node foo = session.getRootNode().addNode("foo", NT_UNSTRUCTURED); foo.setProperty("yes:prop", "yes"); foo.setProperty("no:prop", "no"); }
    private Node addWrite(String parentPath, String property, Node acls) throws PathNotFoundException, RepositoryException, AccessDeniedException { Node acl = acls.addNode(nodeNameHelper.getUniqueName(acls.getSession(), acls.getPath(), "0"), NodeTypes.ContentNode.NAME); acl.setProperty("path", parentPath + "/" + property); acl.setProperty("permissions", Permission.ALL); return acl; }
    @Testpublicvoid setPropertyStringValueArrayInt() throws RepositoryException { Node node = MgnlContext.getJCRSession("website").getRootNode().addNode("test", MgnlNodeType.NT_CONTENT); assertTrue(NodeUtil.isWrappedWith(node, MgnlAuditLoggingContentDecoratorNodeWrapper.class)); Value[] values = {ValueFactoryImpl.getInstance().createValue("true")}; node.setProperty("test", values, PropertyType.BOOLEAN); assertEquals(PropertyType.BOOLEAN, node.getProperty("test").getType()); }
    publicvoid testNewDoublePropertyParent() throws Exception { testNode.setProperty(propertyName1, d1); testRootNode.getSession().save(); assertEquals("Setting property with Node.setProperty(String, double) and parentNode.save() not working", new Double(d1), new Double(testNode.getProperty(propertyName1).getDouble())); }
    publicvoid testFulltextSimple() throws Exception { Node foo = testRootNode.addNode("foo"); foo.setProperty("mytext", new String[]{"the quick brown fox jumps over the lazy dog."}); testRootNode.save(); String sql = "SELECT * FROM nt:unstructured WHERE contains(., 'fox') " + "AND jcr:path LIKE '" + testRoot + "/%'"; Query q = superuser.getWorkspace().getQueryManager().createQuery(sql, Query.SQL); QueryResult result = q.execute(); checkResult(result, 1); }
    Sours: https://www.tabnine.com/code/java/methods/javax.jcr.Node/setProperty

    Best Java code snippets using javax.jcr.Node.hasNode(Showing top 20 results out of 1,485)

    Refine searchRefine arrow

    • Common ways to obtain Node

      private void myMethod () {

      }

      protected String getPathToNonExistingNode() throws RepositoryException { String name = "nonexisting"; String path = name; int i = 0; while (testRootNode.hasNode(path)) { path = name + i; i++; } path = testRootNode.getPath() + "/" + path; return path; }
      protectedsynchronized Node getSystemNode(Node node) throws RepositoryException { if (node.hasNode(SYSTEM_NODE)) { return node.getNode(SYSTEM_NODE); } return node.addNode(SYSTEM_NODE, NodeTypes.System.NAME); } }
      private Node getUserSettingHome(Session session) throws Exception { Node settingNode = session.getRootNode().getNode(AbstractService.SETTING_NODE); Node userHomeNode = null; if (settingNode.hasNode(AbstractService.SETTING_USER_NODE) == false) { userHomeNode = settingNode.addNode(AbstractService.SETTING_USER_NODE, AbstractService.STG_SUBCONTEXT); session.save(); } else { userHomeNode = settingNode.getNode(AbstractService.SETTING_USER_NODE); } return userHomeNode; }
      privatevoid setFolderTitle(Node child, String title) throws RepositoryException{ if (!child.getPath().equals(jcrBasePath)) { if(child.hasNode(JcrConstants.JCR_CONTENT)){ child.getNode(JcrConstants.JCR_CONTENT).setProperty(JcrConstants.JCR_TITLE, title); }else{ child.addNode(JcrConstants.JCR_CONTENT, JcrConstants.NT_UNSTRUCTURED).setProperty(JcrConstants.JCR_TITLE, title); } } }
      privatevoid deleteMyNodes() throws RepositoryException { Node root = testRootNode; while (root.hasNode("testroot")) { root.getNode("testroot").remove(); } root.getSession().save(); }
      protectedvoid removeSubNode(Node node, String name) throws RepositoryException { if(log.isInfoEnabled()) { log.info("Removing subnode " + name + " of node " + node.getPath() + " (" + node.hasNode(name) + ")"); } if (node.hasNode(name)) { node.getNode(name).remove(); } }
      privatestatic List<Node> getQueryTemplateNodes(Session session, String[] templates) throws RepositoryException { List<Node> queryTemplates = new ArrayList<>(); Node hippoTemplates = session.getRootNode().getNode("hippo:configuration/hippo:queries/hippo:templates"); for (String template : templates) { if (hippoTemplates.hasNode(template)) { queryTemplates.add(hippoTemplates.getNode(template)); } } return queryTemplates; }
      privatevoid migrateNoFilterHtmlProcessor(final Node moduleConfigNode) throws RepositoryException { if (!moduleConfigNode.hasNode(NO_FILTER_PROCESSOR)) { log.info("Creating default no-filter HtmlProcessor"); final Node noFilter = moduleConfigNode.addNode(NO_FILTER_PROCESSOR, HIPPOSYS_MODULE_CONFIG); noFilter.setProperty("charset", "UTF-8"); noFilter.setProperty("filter", false); noFilter.setProperty("omitComments", false); if (!dryRun) { session.save(); } } }
      @Test publicvoid testImportCommandDuplicateName() throws Exception { doReturn(true).when(importCommand).checkPermissions(RepositoryConstants.WEBSITE, targetNode.getPath(), Permission.WRITE); targetNode.addNode("about", NodeTypes.Page.NAME); targetNode.getSession().save(); importCommand.execute(context); assertTrue(targetNode.hasNodes()); assertEquals(2, targetNode.getNodes("about").getSize()); assertTrue(targetNode.hasNode("about[2]/extras")); assertTrue(targetNode.hasNode("about[2]/extras/extras1")); }
      publicvoid delete(String name) throws WorkflowException, MappingException, RepositoryException, RemoteException { if (name.startsWith("/")) { name = name.substring(1); } String path = subject.getPath().substring(1); Node folder = (path.equals("") ? rootSession.getRootNode() : rootSession.getRootNode().getNode(path)); if (folder.hasNode(name)) { Node offspring = folder.getNode(name); delete(folder, offspring); } }
      privatevoid moveContainerItems(final Node from, final Node to) throws RepositoryException { Session session = from.getSession(); for (Node fromChild : new NodeIterable(from.getNodes())) { String newName = fromChild.getName(); int counter = 0; while (to.hasNode(newName)) { newName = fromChild.getName() + ++counter; } session.move(fromChild.getPath(), to.getPath() + "/" + newName); } }
      @Override publicboolean hasModulesNode() { try { final Session session = getConfigJCRSession(); return session.getRootNode().hasNode(ModuleManagerImpl.MODULES_NODE); } catch (RepositoryException e) { returnfalse; } }
      publicvoid testMovedNodeGetPath2() throws RepositoryException, NotExecutableException { String oldPath = moveNode.getPath(); if (destParentNode.hasNode(nodeName2)) { thrownew NotExecutableException("Move destination already contains a child node with name " + nodeName2); } doMove(oldPath, destParentNode.getPath() + "/" + nodeName2); superuser.save(); assertEquals("After successful move the moved node must return the destination path.", destinationPath, moveNode.getPath()); }
      @Test publicvoid testCugAtUnsupportedPath() throws Exception { doImport("/", XML_CHILD_WITH_CUG); getImportSession().save(); assertTrue(getImportSession().getRootNode().hasNode("child")); assertFalse(getImportSession().getRootNode().hasNode("child/rep:cugPolicy")); } }
      @Test publicvoid testImportCommand() throws Exception { doReturn(true).when(importCommand).checkPermissions(RepositoryConstants.WEBSITE, targetNode.getPath(), Permission.WRITE); importCommand.execute(context); assertTrue(targetNode.hasNodes()); assertTrue(targetNode.hasNode("about")); assertTrue(targetNode.hasNode("about/extras")); assertTrue(targetNode.hasNode("about/extras/extras1")); }
      privatevoid assertNodeExistWithProperty(Node rootNode, String nodePathToTest, String propertyName, String propertyValue) throws RepositoryException { assertTrue(nodePathToTest + " should have been moved ", rootNode.hasNode(nodePathToTest)); assertTrue(nodePathToTest + " should have property " + propertyName, rootNode.getNode(nodePathToTest).hasProperty(propertyName)); assertEquals(nodePathToTest + " should have property " + propertyName + " with the same value " + propertyValue, (rootNode.getNode(nodePathToTest).getProperty(propertyName)).getValue().getString(), propertyValue); } }
      publicstatic Node createHippoNamespace(final Session session, final String prefix) throws RepositoryException { if (StringUtils.isBlank(prefix)) { thrownew RepositoryException("Unable to create namespace for empty prefix"); } final Node namespaces = session.getRootNode().getNode(HippoNodeType.NAMESPACES_PATH); if (namespaces.hasNode(prefix)) { log.info("Namespace '{}' already registered", prefix); return namespaces.getNode(prefix); } return namespaces.addNode(prefix, HippoNodeType.NT_NAMESPACE); }
      @Override protected Node doExec(Node context, ErrorHandler errorHandler) throws RepositoryException { return (context.hasNode(name)) ? context.getNode(name) : context.addNode(name, nodeType); } };
      privatevoid migrateBlueprint(final Node blueprintNode) throws RepositoryException { if (!blueprintNode.hasNode("hst:channel")) { getLogger().info("No need to migrate blueprint '{}' because does not have an hst:channel node.", blueprintNode.getPath()); return; } final Node blueprintConfigurationNode; if (blueprintNode.hasNode("hst:configuration")) { blueprintConfigurationNode = blueprintNode.getNode("hst:configuration"); } else { blueprintConfigurationNode = blueprintNode.addNode("hst:configuration", "hst:configuration"); } blueprintNode.getSession().move(blueprintNode.getPath() + "/hst:channel", blueprintConfigurationNode.getPath() + "/hst:channel"); }
      publicvoid testNtFile() throws RepositoryException, IOException { while (testRootNode.hasNode(nodeName1)) { testRootNode.getNode(nodeName1).remove(); } String content = "The quick brown fox jumps over the lazy dog."; Node file = JcrUtils.putFile(testRootNode, nodeName1, "text/plain", new ByteArrayInputStream(content.getBytes("UTF-8"))); testRootNode.getSession().save(); String xpath = testPath + "/*[jcr:contains(jcr:content, 'lazy')]"; executeXPathQuery(xpath, new Node[] { file }); }
      Sours: https://www.tabnine.com/code/java/methods/javax.jcr.Node/hasNode

      In node aem api

      In part 1 of this series, I discussed a method for getting AEM Asset Collection items into the JSON representation of a page. This uses the Sling model + HTL component pattern to obtain the collection items and display their values in the JSON, based on asset type. Specifically, the Sling model enables the JSON renderer to display markup in content fragments and SVGs. It also enables the AEM path to binary formatted assets.

      With this method, third party apps and services can consume the JSON, using AEM in a headless manner. Using this approach, authors can update the collections, while the content consumers see those collection updates in their JSON feed. This is a powerful solution already, but we can add some automation in updating the JSON and making it available on the customer/consumer-facing dispatcher domain.

      Automating the JSON Updates

      Let’s start with automating the JSON updates. When an author adds or removes items in one of the collections, this should be automatically reflected in the JSON. To do this, we need to add a JCR Event Listener class to our project which will listen for changes and request the page with our components. You can find such a class here:

      https://github.com/PRFTAdobe/AEM-Tutorials/blob/main/sample/core/src/main/java/com/sample/core/listeners/CollectionsChangeListener.java

      Note: The reference to a CollectionsListenerConfig class. Instead of hard coding the path to the page node, we can obtain an array of paths from the configuration to call one or more pages configured for JSON consumption.

      pages = config.pagesToUpdate();

      In order to listen for changes to the collections, we create a session using a Service user. This is a special type of AEM user principal, better suited for backend service tasks than a real user ID.

      The created session object can then be used to set up the listener. We need to listen for property changes as well as actual node additions and removals under /content/dam/collections.

      session.getWorkspace().getObservationManager().addEventListener(this, Event.PROPERTY_ADDED | Event.PROPERTY_REMOVED | Event.PROPERTY_CHANGED | Event.NODE_ADDED | Event.NODE_REMOVED, "/content/dam/collections", true,null, null, false);

       

      When one of these events occurs, the onEvent method is invoked. This method is where we make a request for each page in the array obtained from the CollectionsListenerConfig. This uses a simple HTTP servlet request for each page, using the same resource resolver obtained via the service user, in the activate method.

      We are not concerned with rendering the pages in a browser, only to call for the pages. This will cause Sling and the HTL engine to process our collections component(s) configured on these pages. Thereby, you trigger the update to their properties with the latest DAM collections data.

      Now about that CollectionsListenerConfig class. This is a simple class that uses the ObjectClassDefinition annotation to define the configuration object and an AttributeDefinition annotation to define the configurable field.

      https://github.com/PRFTAdobe/AEM-Tutorials/blob/main/sample/core/src/main/java/com/sample/core/osgiconfigs/CollectionsListenerConfig.java

      @AttributeDefinition(name = "Pages to Update", description = "The pages that should be invoked via Sling when DAM collections are updated or changed.", type = AttributeType.STRING ) String[] pagesToUpdate();

      When this class is loaded with the bundle, its configuration will be added to the OSGi config admin service’s list of configurable items (provided via the Felix OSGi implementation). AEM administrators will be able to configure the list of pages for this under /system/console/configMgr. This configuration could also be included in your code repository, under a run mode-specific config folder.

      DAM collections pages configuration

       

      With these additions, the solution now provides automatic updating of the JSON in a configurable manner.

      Allowing for Automatic Replication

      One more optional thing we can do is update the IncludeCollectionsModel class to allow for automatic replication. An important thing to do here will be to ensure replication is only being done on an author. We can use the replicator API and the externalizer for this.

      Two methods have been added to the class, checkIfAuthor and replicateContent. The first method is self-explanatory, it’s a boolean method to determine if this is being executed on an Author or not.

      private boolean checkIfAuthor() { Set<String> modes = slingSettingsService.getRunModes(); if (modes.contains(Externalizer.AUTHOR)) { return true; } else { return false; } }

      The second method calls the replicator API to replicate the page.

      public void replicateContent(String path) { try { Session session = resourceResolver.adaptTo(Session.class); replicator.replicate(session, ReplicationActionType.ACTIVATE, path); log.info("{} Collections have been replicated.", LOG_PREFIX); } catch (ReplicationException e) { log.error(e.getMessage(), e); } }

       

      https://github.com/PRFTAdobe/AEM-Tutorials/blob/main/sample/core/src/main/java/com/sample/core/models/IncludeCollectionsModel.java

      The call to replicate needs a session, replication action, and resource path. We obtain a session object by adapting the resource resolver provided by Sling (this is the same resource resolver used in the component to obtain the sling:members for the provided collection path). The benefit of using this session is that it was created in the context of the current user’s applied ACLs. This means that replication will occur only if the service user or an author editing the component has to replicate permissions set to allow for the page.

      We call this method just after the changes to the component properties have been committed, so the replicated page always has the latest updates. Before calling this, we check to ensure the class is being executed on an author and only replicate if checkIfAuthor returns true.

      resourceResolver.commit(); //Replicate the page if this is run on an Author, so the same JSON updates are accessible from the publisher(s). PageManager pageManager= resource.getResourceResolver().adaptTo(PageManager.class); Page currentPage = pageManager.getContainingPage(resource); if (checkIfAuthor() && currentPage != null) { replicateContent(currentPage.getPath()); }

       

      With all of these changes, we’ve maximized automated updates on both authors and publishers. Everything done here uses AEM built-in Sling, Node and Replicator APIs, as well as built-in OSGi services. This illustrates the benefits of extending AEM’s already good building blocks!

       

      About the Author

      I have years of experience in web application support and development, with emphasis on the AEM Framework and Java. I like to write about anything AEM related (Sling, OSGi, the JCR, Dispatcher, etc.).

      More from this Author

      Sours: https://blogs.perficient.com/2021/08/20/aem-content-services-using-sling-and-node-apis-to-provide-asset-collections-part-2/
      Update a node property using an AEM bundle


      Interface Node

      All Superinterfaces:
      Item
      All Known Subinterfaces:
      Version, VersionHistory

      public interface Node
      extends Item

      The interface represents a node in a workspace.



                A constant for the node name declared in .

                A constant for the JCR name .

                A constant for the node name declared in .

                A constant for the node name declared in .

                A constant for the node name declared in .

                A constant for the node name declared in .
       

                Adds the mixin node type named to this node.

                Creates a new node at .

                Creates a new node at of the specified node type.

                Returns if calling on this node with the mixn node type will not fail.

                Deprecated. As of JCR 2.0, should be used instead.

                Deprecated. As of JCR 2.0, should be used instead.

                Deprecated. As of JCR 2.0, should be used instead.

                Deprecated. As of JCR 2.0, should be used instead.

                Causes the lifecycle state of this node to undergo the specified .

                Returns the list of valid state transitions for this node.

                Deprecated. As of JCR 2.0, should be used instead.

                Returns the absolute path of the node in the specified workspace that corresponds to node.

                Returns the node definition that applies to this node.

                Returns the identifier of this node.

                This method returns the index of this node within the ordered set of its same-name sibling nodes.

                Deprecated. As of JCR 2.0, should be used instead.

                Returns an array of objects representing the mixin node types in effect for this node.

                Returns the node at relative to this node.

                Returns all child nodes of this node accessible through the current .

                Gets all child nodes of this node accessible through the current that match .

                Gets all child nodes of this node accessible through the current that match one or more of the strings in the passed array.

                Returns the primary child item of this node.

                Returns the primary node type in effect for this node.

                Returns all properties of this node accessible through the current .

                Gets all properties of this node accessible through the current that match .

                Gets all properties of this node accessible through the current that match one or more of the strings in the passed array.

                Returns the property at relative to node.

                This method returns all properties that refer to this node and that are accessible through the current .

                This method returns all properties that refer to this node, have the specified and that are accessible through the current .

                Returns an iterator over all nodes that are in the shared set of this node.

                Deprecated. As of JCR 2.0, should be used instead.

                Deprecated. As of JCR 2.0, should be used instead.

                This method returns all properties that refer to this node and that are accessible through the current .

                This method returns all properties that refer to this node, have the specified and that are accessible through the current .

                Indicates whether a node exists at Returns if a node accessible through the current exists at and otherwise.

                Indicates whether this node has child nodes.

                Indicates whether this node has properties.

                Indicates whether a property exists at Returns if a property accessible through the current exists at and otherwise.

                Deprecated. As of JCR 2.0, should be used instead.

                Returns if this node is currently in the checked-in state (either due to its own status as a versionable node or due to the effect of a versionable node being checked in above it).

                Returns if this node is locked either as a result of a lock held by this node or by a deep lock on a node above this node; otherwise returns .

                Returns if this node is of the specified primary node type or mixin type, or a subtype thereof.

                Deprecated. As of JCR 2.0, should be used instead.

                Deprecated. As of JCR 2.0, should be used instead.

                If this node supports child node ordering, this method inserts the child node at into the child node list at the position immediately the child node at .

                Removes the specified mixin node type from this node and removes from this node's property.

                Removes this node, but does not remove any other node in the shared set of this node.

                Removes this node and every other node in the shared set of this node.

                Deprecated. As of JCR 2.0, should be used instead.

                Deprecated. As of JCR 2.0, should be used instead.

                Deprecated. As of JCR 2.0, should be used instead.

                Deprecated. As of JCR 2.0, should be used instead.

                Changes the primary node type of this node to .

                The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is , otherwise a best-effort conversion is attempted.

                The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is , otherwise a best-effort conversion is attempted.

                The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is , otherwise a best-effort conversion is attempted.

                The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is , otherwise a best-effort conversion is attempted.

                The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is , otherwise a best-effort conversion is attempted.

                Deprecated. As of JCR 2.0, should be used instead.

                The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is , otherwise a best-effort conversion is attempted.

                The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is or , otherwise a best-effort conversion is attempted.

                Sets the specified single-value property to the specified value.

                Sets the specified property to the specified array of values.

                Sets the specified property to the specified array of values and to the specified type.

                Sets the specified single-value property to the specified value.

                Sets the single-value property of this node called to the specified .

                Sets the multi-value property of this node called to the specified array of values.

                Sets the multi-value property of this node called to the specified array of values.

                Sets the single-value property of this node called to the specified and the specified .

                Deprecated. As of JCR 2.0, should be used instead.

                If this node does have a corresponding node in the workspace , then this replaces this node and its subgraph with a clone of the corresponding node and its subgraph.
       
      Methods inherited from interface javax.jcr.Item
       

      JCR_CONTENT

      static final java.lang.String JCR_CONTENT
      A constant for the JCR name . This is the name of a child node declared in and a property declared in .
      Since:
      JCR 2.0
      See Also:
      Constant Field Values

      JCR_PROPERTY_DEFINITION

      static final java.lang.String JCR_PROPERTY_DEFINITION
      A constant for the node name declared in .
      Since:
      JCR 2.0
      See Also:
      Constant Field Values

      JCR_CHILD_NODE_DEFINITION

      static final java.lang.String JCR_CHILD_NODE_DEFINITION
      A constant for the node name declared in .
      Since:
      JCR 2.0
      See Also:
      Constant Field Values

      JCR_ROOT_VERSION

      static final java.lang.String JCR_ROOT_VERSION
      A constant for the node name declared in .
      Since:
      JCR 2.0
      See Also:
      Constant Field Values

      JCR_VERSION_LABELS

      static final java.lang.String JCR_VERSION_LABELS
      A constant for the node name declared in .
      Since:
      JCR 2.0
      See Also:
      Constant Field Values

      JCR_FROZEN_NODE

      static final java.lang.String JCR_FROZEN_NODE
      A constant for the node name declared in .
      Since:
      JCR 2.0
      See Also:
      Constant Field Values

      addNode

      NodeaddNode(java.lang.String relPath) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException
      Creates a new node at .

      This is session-write method, meaning that the addition of the new node is dispatch upon .

      The provided must not have an index on its final element, otherwise a Repository

      If ordering is supported by the node type of the parent node of the new node then the new node is appended to the end of the child node list.

      The new node's primary node type will be determined by the child node definitions in the node types of its parent. This may occur either immediately, on dispatch (save, whether within or without transactions) or on persist (save without transactions, commit within a transaction), depending on the implementation.

      An will be thrown either immediately, on dispatch (save, whether within or without transactions) or on persist (save without transactions, commit within a transaction), if an item at the specified path already exists and same-name siblings are not allowed. Implementations may differ on when this validation is performed.

      A will be thrown either immediately, on dispatch (save, whether within or without transactions) or on persist (save without transactions, commit within a transaction), if the specified path implies intermediary nodes that do not exist. Implementations may differ on when this validation is performed.

      A will be thrown either immediately, on dispatch (save, whether within or without transactions) or on persist (save without transactions, commit within a transaction), if adding the node would violate a node type or implementation-specific constraint or if an attempt is made to add a node as the child of a property. Implementations may differ on when this validation is performed.

      A will be thrown either immediately, on dispatch (save, whether within or without transactions) or on persist (save without transactions, commit within a transaction), if the node to which the new child is being added is read-only due to a checked-in node. Implementations may differ on when this validation is performed.

      A will be thrown either immediately, on dispatch (save, whether within or without transactions) or on persist (save without transactions, commit within a transaction), if a lock prevents the addition of the node. Implementations may differ on when this validation is performed.

      Parameters:
      - The path of the new node to be created.
      Returns:
      The node that was added.
      Throws:
      - if an item at the specified path already exists, same-name siblings are not allowed and this implementation performs this validation immediately.
      - if the specified path implies intermediary s that do not exist or the last element of has an index, and this implementation performs this validation immediately.
      - if a node type or implementation-specific constraint is violated or if an attempt is made to add a node as the child of a property and this implementation performs this validation immediately.
      - if the node to which the new child is being added is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the addition of the node and this implementation performs this validation immediately.
      - If the last element of has an index or if another error occurs.


      addNode

      NodeaddNode(java.lang.String relPath, java.lang.String primaryNodeTypeName) throws ItemExistsException, PathNotFoundException, NoSuchNodeTypeException, LockException, VersionException, ConstraintViolationException, RepositoryException
      Creates a new node at of the specified node type. The behavior of this method is identical to except that the primary node type of the new node is explicitly specified.

      Parameters:
      - the path of the new node to be created.
      - The name of the primary node type of the new node.
      Returns:
      the node that was added.
      Throws:
      - if an item at the specified path already exists, same-name siblings are not allowed and this implementation performs this validation immediately instead of waiting until .
      - if the specified path implies intermediary s that do not exist or the last element of has an index, and this implementation performs this validation immediately instead of waiting until .
      - if the specified node type is not recognized and this implementation performs this validation immediately instead of waiting until .
      - if a node type or implementation-specific constraint is violated or if an attempt is made to add a node as the child of a property and this implementation performs this validation immediately instead of waiting until .
      - if the node to which the new child is being added is read-only due to a checked-in node and this implementation performs this validation immediately instead of waiting until .
      - if a lock prevents the addition of the node and this implementation performs this validation immediately instead of waiting until .
      - if the last element of has an index or if another error occurs.


      orderBefore

      void orderBefore(java.lang.String srcChildRelPath, java.lang.String destChildRelPath) throws UnsupportedRepositoryOperationException, VersionException, ConstraintViolationException, ItemNotFoundException, LockException, RepositoryException
      If this node supports child node ordering, this method inserts the child node at into the child node list at the position immediately the child node at .

      To place the node at the end of the list, a of is used.

      Note that (apart from the case where is ) both of these arguments must be relative paths of depth one, in other words they are the names of the child nodes, possibly suffixed with an index.

      If and are the same, then no change is made.

      This is session-write method, meaning that a change made by this method is dispatched on

      A will be thrown either immediately, on dispatch (save whether within or without transactions) or on persist (save without transactions, commit within a transaction), if this operation would violate a node type or implementation-specific constraint. Implementations may differ on when this validation is performed.

      A will be thrown either immediately, on dispatch (save whether within or without transactions) or on persist (save without transactions, commit within a transaction), if this node is read-only due to it or a node above it being checked-in Implementations may differ on when this validation is performed.

      A will be thrown either immediately (by this method), or on , if a lock prevents the re-ordering. Implementations may differ on when this validation is performed.

      Parameters:
      - the relative path to the child node (that is, name plus possible index) to be moved in the ordering
      - the the relative path to the child node (that is, name plus possible index) before which the node will be placed.
      Throws:
      - if ordering is not supported on this node.
      - if an implementation-specific ordering restriction is violated and this implementation performs this validation immediately.
      - if either parameter is not the relative path of a child node of this node.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the re-ordering and this implementation performs this validation immediately.
      - if another error occurs.


      setProperty

      PropertysetProperty(java.lang.String name, Value value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      Sets the single-value property of this node called to the specified .

      If the property does not yet exist, it is created and its property type determined by the by the node type of this node. If, based on the and passed, there is more than one property definition that applies, the repository chooses one definition according to some implementation-specific criteria. Once a property with name has been created, the behavior of a subsequent may differ across implementations. Some repositories may allow to be dynamically re-bound to a different property definition (based for example, on the new value being of a different type than the original value) while other repositories may not allow such dynamic re-binding.

      If the property type of the supplied object is different from that required, then a best-effort conversion is attempted.

      If the node type of this node does not indicate a specific property type, then the property type of the supplied object is used and if the property already exists it assumes both the new value and new property type.

      Passing a as the second parameter removes the property. It is equivalent to calling on the object itself.

      This is a session-write method, meaning that changes made through this method are dispatched on .

      A will be thrown either immediately, on dispatch (save whether within or without transactions) or on persist (save without transactions, commit within a transaction), if the change would violate a node type or implementation-specific constraint. Implementations may differ on when this validation is performed.

      A will be thrown either immediately, on dispatch (save whether within or without transactions) or on persist (save without transactions, commit within a transaction), if this node is read-only due to a checked-in node. Implementations may differ on when this validation is performed.

      A will be thrown either immediately, on dispatch (save whether within or without transactions) or on persist (save without transactions, commit within a transaction), if a lock prevents the setting of the property. Implementations may differ on when this validation is performed.

      Parameters:
      - The name of a property of this node
      - The value to be assigned
      Returns:
      The updated object
      Throws:
      - if the specified property is a but the cannot be expressed in the ISO 8601-based format defined in the JCR 2.0 specification and the implementation does not support dates incompatible with that format or if cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.


      setProperty

      PropertysetProperty(java.lang.String name, Value value, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      Sets the single-value property of this node called to the specified and the specified .

      The behavior of this method is identical to that of except that the intended property type is explicitly specified.

      If the property does not yet exist, it is created. If the property already exists it assumes both the new value and the new property type.

      Parameters:
      - the name of the property to be set.
      - a object.
      - the type of the property.
      Returns:
      the object set, or if this method was used to remove a property (by setting its value to ).
      Throws:
      - if cannot be converted to the specified type or if the property already exists and is multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.


      setProperty

      PropertysetProperty(java.lang.String name, Value[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      Sets the multi-value property of this node called to the specified array of values.

      If the property does not yet exist, it is created.

      The behavior of this method is identical to that of except that an array of objects is assigned instead of a single .

      The property type of the property will be that specified by the node type of this node. If the property type of one or more of the supplied objects is different from that required, then a best-effort conversion is attempted, according to an implemention-dependent definition of "best effort". If the conversion fails, a is thrown.

      If the property is not multi-valued then a is also thrown. If another error occurs, a is thrown.

      If the node type of this node does not indicate a specific property type, then the property type of the supplied objects is used and if the property already exists it assumes both the new values and the new property type.

      Passing a as the second parameter removes the property. It is equivalent to calling on the object itself. Note that this is different from passing an array that contains elements. In such a case, the array is compacted by removing the values. The resulting set of values never contains a null. However, the set may be empty: would set the property to the empty set of values.

      Parameters:
      - the name of the property to be set.
      - an array of objects.
      Returns:
      the updated object.
      Throws:
      - if cannot be converted to the type of the specified property or if the property already exists and is not multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.


      setProperty

      PropertysetProperty(java.lang.String name, Value[] values, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      Sets the multi-value property of this node called to the specified array of values.

      The behavior of this method is identical to that of except that the type of the property is explicitly specified.

      If the property does not yet exist, it is created. The type of the property is determined by the parameter specified.

      If the property type of one or more of the supplied objects is different from that specified, then a best-effort conversion is attempted, according to an implemention-dependent definition of "best effort". If the conversion fails, a is thrown.

      If the property already exists it assumes both the new values and the new property type.

      Parameters:
      - the name of the property to be set.
      - an array of objects.
      - the type of the property.
      Returns:
      the updated object.
      Throws:
      - if a value cannot be converted to the specified type or if the property already exists and is not multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.


      setProperty

      PropertysetProperty(java.lang.String name, java.lang.String[] values) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      Sets the specified property to the specified array of values. Same as except that the values are specified as objects instead of objects.

      Parameters:
      - the name of the property to be set.
      - an array of objects.
      Returns:
      the updated object.
      Throws:
      - if a value cannot be converted to the type of the specified property or if the property already exists and is not multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.


      setProperty

      PropertysetProperty(java.lang.String name, java.lang.String[] values, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      Sets the specified property to the specified array of values and to the specified type. Same as except that the values are specified as objects instead of objects.

      Parameters:
      - the name of the property to be set.
      - an array of objects.
      - the type of the property.
      Returns:
      the updated object.
      Throws:
      - if a value cannot be converted to the specified type or if the property already exists and is not multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.


      setProperty

      PropertysetProperty(java.lang.String name, java.lang.String value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      Sets the specified single-value property to the specified value. The behavior of this method is identical to that of except that the value is specified as a . and, if possible, the type assigned to the property is , otherwise a best-effort conversion is attempted.

      Parameters:
      - The name of a property of this node
      - The value to assigned
      Returns:
      The updated object
      Throws:
      - if cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.


      setProperty

      PropertysetProperty(java.lang.String name, java.lang.String value, int type) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      Sets the specified single-value property to the specified value. If the property does not yet exist, it is created.

      The behavior of this method is identical to that of except that the intended type of the property is explicitly specified by the parameter.

      Parameters:
      - the name of the property to be set.
      - a object.
      - the type of the property.
      Returns:
      the object set, or if this method was used to remove a property (by setting its value to ).
      Throws:
      - if cannot be converted to the specified type or if the property already exists and is multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.


      setProperty

      PropertysetProperty(java.lang.String name, java.io.InputStream value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      Deprecated. As of JCR 2.0, should be used instead.

      The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is , otherwise a best-effort conversion is attempted.

      The passed stream is closed before this method returns either normally or because of an exception.

      Parameters:
      - The name of a property of this node
      - The value to assigned
      Returns:
      The updated object
      Throws:
      - if cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.


      setProperty

      PropertysetProperty(java.lang.String name, Binary value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is , otherwise a best-effort conversion is attempted.

      Parameters:
      - The name of a property of this node
      - The value to assigned
      Returns:
      The updated object
      Throws:
      - if cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.
      Since:
      JCR 2.0


      setProperty

      PropertysetProperty(java.lang.String name, boolean value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is , otherwise a best-effort conversion is attempted.

      Parameters:
      - The name of a property of this node
      - The value to assigned
      Returns:
      The updated object
      Throws:
      - if cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.


      setProperty

      PropertysetProperty(java.lang.String name, double value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is , otherwise a best-effort conversion is attempted.

      Parameters:
      - The name of a property of this node
      - The value to assigned
      Returns:
      The updated object
      Throws:
      - if cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.


      setProperty

      PropertysetProperty(java.lang.String name, java.math.BigDecimal value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is , otherwise a best-effort conversion is attempted.

      Parameters:
      - The name of a property of this node
      - The value to assigned
      Returns:
      The updated object
      Throws:
      - if cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.
      Since:
      JCR 2.0


      setProperty

      PropertysetProperty(java.lang.String name, long value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is , otherwise a best-effort conversion is attempted.

      Parameters:
      - The name of a property of this node
      - The value to assigned
      Returns:
      The updated object
      Throws:
      - if cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.


      setProperty

      PropertysetProperty(java.lang.String name, java.util.Calendar value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is , otherwise a best-effort conversion is attempted.

      Parameters:
      - The name of a property of this node
      - The value to assigned
      Returns:
      The updated object
      Throws:
      - if the specified property is a but the cannot be expressed in the ISO 8601-based format defined in the JCR 2.0 specification (section 3.6.4.3) and the implementation does not support dates incompatible with that format or if cannot be converted to the type of the specified property or if the property already exists and is multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.


      setProperty

      PropertysetProperty(java.lang.String name, Node value) throws ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException
      The behavior of this method is identical to that of except that the value is specified as a and, if possible, the type assigned to the property is or , otherwise a best-effort conversion is attempted.

      The value to which the property is set is the identifier of the passed node.

      If the named property does not yet exist and the repository cannot determine whether a or property is intended, then a property is created.

      Parameters:
      - The name of a property of this node
      - The value to assigned
      Returns:
      The updated object.
      Throws:
      - if this property is not of type or or the specified node is not referenceable or if the specified property already exists and is multi-valued.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the setting of the property and this implementation performs this validation immediately.
      - if the change would violate a node-type or other constraint and this implementation performs this validation immediately.
      - if another error occurs.


      getNode

      NodegetNode(java.lang.String relPath) throws PathNotFoundException, RepositoryException
      Returns the node at relative to this node.

      If contains a path element that refers to a node with same-name sibling nodes without explicitly including an index using the array-style notation (), then the index [1] is assumed (indexing of same name siblings begins at 1, not 0, in order to preserve compatibility with XPath).

      Within the scope of a single object, if a object has been acquired, any subsequent call of reacquiring the same node must return a object reflecting the same state as the earlier object. Whether this object is actually the same instance, or simply one wrapping the same state, is up to the implementation.

      Parameters:
      - The relative path of the node to retrieve.
      Returns:
      The node at .
      Throws:
      - if no node exists at the specified path or the current does not read access to the node at the specified path.
      - If another error occurs.


      getNodes

      NodeIteratorgetNodes() throws RepositoryException
      Returns all child nodes of this node accessible through the current . Does not include properties of this . The same reacquisition semantics apply as with . If this node has no accessible child nodes, then an empty iterator is returned.

      Returns:
      A over all child s of this .
      Throws:
      - if an error occurs.


      getNodes

      NodeIteratorgetNodes(java.lang.String namePattern) throws RepositoryException
      Gets all child nodes of this node accessible through the current that match . The pattern may be a full name or a partial name with one or more wildcard characters (""), or a disjunction (using the "" character to represent logical ) of these. For example,

      would return a holding all accessible child nodes of that are either called '', begin with the prefix '' or are called ''.

      The substrings within the pattern that are delimited by "" characters and which may contain wildcard characters ("") are called globs.

      Note that leading and trailing whitespace around a glob is ignored, but whitespace within a disjunct forms part of the pattern to be matched.

      The pattern is matched against the names (not the paths) of the immediate child nodes of this node.

      If this node has no accessible matching child nodes, then an empty iterator is returned.

      The same reacquisition semantics apply as with .

      Parameters:
      - a name pattern.
      Returns:
      a .
      Throws:
      - if an unexpected error occurs.


      getNodes

      NodeIteratorgetNodes(java.lang.String[] nameGlobs) throws RepositoryException
      Gets all child nodes of this node accessible through the current that match one or more of the strings in the passed array.

      A glob may be a full name or a partial name with one or more wildcard characters (""). For example,

      would return a holding all accessible child nodes of that are either called '', begin with the prefix '' or are called ''.

      Note that unlike in the case of the leading and trailing whitespace around a glob is not ignored.

      The globs are matched against the names (not the paths) of the immediate child nodes of this node.

      If this node has no accessible matching child nodes, then an empty iterator is returned.

      The same reacquisition semantics apply as with .

      Parameters:
      - an array of globbing strings.
      Returns:
      a .
      Throws:
      - if an unexpected error occurs.
      Since:
      JCR 2.0


      getProperty

      PropertygetProperty(java.lang.String relPath) throws PathNotFoundException, RepositoryException
      Returns the property at relative to node. The same reacquisition semantics apply as with .

      Parameters:
      - The relative path of the property to retrieve.
      Returns:
      The property at .
      Throws:
      - if no property exists at the specified path or if the current

      does not have read access to the specified property.

      - If another error occurs.


      getProperties

      PropertyIteratorgetProperties() throws RepositoryException
      Returns all properties of this node accessible through the current . Does not include child nodes of this node. The same reacquisition semantics apply as with . If this node has no accessible properties, then an empty iterator is returned.

      Returns:
      A .
      Throws:
      - if an error occurs.


      getProperties

      PropertyIteratorgetProperties(java.lang.String namePattern) throws RepositoryException
      Gets all properties of this node accessible through the current that match . The pattern may be a full name or a partial name with one or more wildcard characters (""), or a disjunction (using the "" character to represent logical ) of these. For example,

      would return a holding all accessible properties of that are either called '', begin with the prefix '' or are called ''.

      The substrings within the pattern that are delimited by "" characters and which may contain wildcard characters ("") are called globs.

      Note that leading and trailing whitespace around a glob is ignored, but whitespace within a disjunct forms part of the pattern to be matched.

      The pattern is matched against the names (not the paths) of the immediate child properties of this node.

      If this node has no accessible matching properties, then an empty iterator is returned.

      The same reacquisition semantics apply as with .

      Parameters:
      - a name pattern.
      Returns:
      a .
      Throws:
      - if an unexpected error occurs.


      getProperties

      PropertyIteratorgetProperties(java.lang.String[] nameGlobs) throws RepositoryException
      Gets all properties of this node accessible through the current that match one or more of the strings in the passed array.

      A glob may be a full name or a partial name with one or more wildcard characters (""). For example,

      would return a holding all accessible properties of that are either called '', begin with the prefix '' or are called ''.

      Note that unlike in the case of the leading and trailing whitespace around a glob is not ignored.

      The globs are matched against the names (not the paths) of the properties of this node.

      If this node has no accessible matching properties, then an empty iterator is returned.

      The same reacquisition semantics apply as with .

      Parameters:
      - an array of globbing strings.
      Returns:
      a .
      Throws:
      - if an unexpected error occurs.
      Since:
      JCR 2.0


      getPrimaryItem

      ItemgetPrimaryItem() throws ItemNotFoundException, RepositoryException
      Returns the primary child item of this node. The primary node type of this node may specify one child item (child node or property) of this node as the primary child item. This method returns that item.

      In cases where the primary child item specifies the name of a set same-name sibling child nodes, the node returned will be the one among the same-name siblings with index [1].

      The same reacquisition semantics apply as with .

      Returns:
      the primary child item.
      Throws:
      - if this node does not have a primary child item, either because none is declared in the node type or because a declared primary item is not present on this node instance, or because none is accessible through the current .
      - if another error occurs.


      getUUID

      java.lang.String getUUID() throws UnsupportedRepositoryOperationException, RepositoryException
      Deprecated. As of JCR 2.0, should be used instead.

      Returns the UUID of this node as recorded in this node's property. This method only works on nodes of mixin node type .

      On nonreferenceable nodes, this method throws an . To avoid throwing an exception to determine whether a node has a UUID, a call to can be made.

      Returns:
      the UUID of this node.
      Throws:
      - if this node nonreferenceable.
      - if another error occurs.


      getIdentifier

      java.lang.String getIdentifier() throws RepositoryException
      Returns the identifier of this node. Applies to both referenceable and non-referenceable nodes.

      A is thrown if an error occurs.

      Returns:
      the identifier of this node.
      Throws:
      - if an error occurs.
      Since:
      JCR 2.0


      getIndex

      int getIndex() throws RepositoryException
      This method returns the index of this node within the ordered set of its same-name sibling nodes. This index is the one used to address same-name siblings using the square-bracket notation, e.g., . Note that the index always starts at 1 (not 0), for compatibility with XPath. As a result, for nodes that do not have same-name-siblings, this method will always return 1.

      Returns:
      The index of this node within the ordered set of its same-name sibling nodes.
      Throws:
      - if an error occurs.


      getReferences

      PropertyIteratorgetReferences() throws RepositoryException
      This method returns all properties that refer to this node and that are accessible through the current . Equivalent to .

      If this node has no referring properties, an empty iterator is returned. This includes the case where this node is not referenceable.

      Returns:
      A .
      Throws:
      - if an error occurs.
      See Also:


      getReferences

      PropertyIteratorgetReferences(java.lang.String name) throws RepositoryException
      This method returns all properties that refer to this node, have the specified and that are accessible through the current .

      If the parameter is then all referring are returned regardless of name.

      Some implementations may only return properties that have been persisted. Some may return both properties that have been persisted and those that have been dispatched but not persisted (for example, those saved within a transaction but not yet committed) while others implementations may return these two categories of property as well as properties that are still pending and not yet dispatched.

      In implementations that support versioning, this method does not return properties that are part of the frozen state of a version in version storage.

      If this node has no referring properties with the specified name, an empty iterator is returned. This includes the case where this node is not referenceable.

      Parameters:
      - name of referring properties to be returned; if then all referring s are returned.
      Returns:
      A .
      Throws:
      - if an error occurs.
      Since:
      JCR 2.0


      getWeakReferences

      PropertyIteratorgetWeakReferences() throws RepositoryException
      This method returns all properties that refer to this node and that are accessible through the current . Equivalent to .

      If this node has no referring properties, an empty iterator is returned. This includes the case where this node is not referenceable.

      Returns:
      A .
      Throws:
      - if an error occurs.
      Since:
      JCR 2.0
      See Also:


      getWeakReferences

      PropertyIteratorgetWeakReferences(java.lang.String name) throws RepositoryException
      This method returns all properties that refer to this node, have the specified and that are accessible through the current .

      If the parameter is then all referring are returned regardless of name.

      Some implementations may only return properties that have been persisted. Some may return both properties that have been persisted and those that have been dispatched but not persisted (for example, those saved within a transaction but not yet committed) while others implementations may return these two categories of property as well as properties that are still pending and not yet dispatched.

      In implementations that support versioning, this method does not return properties that are part of the frozen state of a version in version storage.

      If this node has no referring properties with the specified name, an empty iterator is returned. This includes the case where this node is not referenceable.

      Parameters:
      - name of referring properties to be returned; if then all referring s are returned.
      Returns:
      A .
      Throws:
      - if an error occurs.
      Since:
      JCR 2.0


      hasNode

      boolean hasNode(java.lang.String relPath) throws RepositoryException
      Indicates whether a node exists at Returns if a node accessible through the current exists at and otherwise.

      Parameters:
      - The path of a (possible) node.
      Returns:
      if a node exists at ; otherwise.
      Throws:
      - if an error occurs.


      hasProperty

      boolean hasProperty(java.lang.String relPath) throws RepositoryException
      Indicates whether a property exists at Returns if a property accessible through the current exists at and otherwise.

      Parameters:
      - The path of a (possible) property.
      Returns:
      if a property exists at ; otherwise.
      Throws:
      - if an error occurs.


      hasNodes

      boolean hasNodes() throws RepositoryException
      Indicates whether this node has child nodes. Returns if this node has one or more child nodes accessible through the current ; otherwise.

      Returns:
      if this node has one or more child nodes; otherwise.
      Throws:
      - if an error occurs.


      hasProperties

      boolean hasProperties() throws RepositoryException
      Indicates whether this node has properties. Returns if this node has one or more properties accessible through the current ; otherwise.

      Returns:
      if this node has one or more properties; otherwise.
      Throws:
      - if an error occurs.


      getPrimaryNodeType

      NodeTypegetPrimaryNodeType() throws RepositoryException
      Returns the primary node type in effect for this node. Which is returned when this method is called on the root node of a workspace is up to the implementation.

      Returns:
      a object.
      Throws:
      - if an error occurs


      getMixinNodeTypes

      NodeType[] getMixinNodeTypes() throws RepositoryException
      Returns an array of objects representing the mixin node types in effect for this node. This includes only those mixin types explicitly assigned to this node. It does not include mixin types inherited through the addition of supertypes to the primary type hierarchy or through the addition of supertypes to the type hierarchy of any of the declared mixin types.

      Returns:
      an array of objects.
      Throws:
      - if an error occurs


      isNodeType

      boolean isNodeType(java.lang.String nodeTypeName) throws RepositoryException
      Returns if this node is of the specified primary node type or mixin type, or a subtype thereof. Returns otherwise.

      This method respects the effective node type of the node.

      Parameters:
      - the name of a node type.
      Returns:
      If this node is of the specified primary node type or mixin type, or a subtype thereof. Returns otherwise.
      Throws:
      - if an error occurs.


      setPrimaryType

      void setPrimaryType(java.lang.String nodeTypeName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException
      Changes the primary node type of this node to . Also immediately changes this node's property appropriately. Semantically, the new node type may take effect immediately or on dispatch but must take effect on persist. The behavior adopted must be the same as the behavior adopted for and the behavior that occurs when a node is first created.

      If the presence of an existing property or child node would cause an incompatibility with the new node type then a is thrown either immediately, on dispatch or on persist.

      If the new node type would cause this node to be incompatible with the node type of its parent then a is thrown either immediately, on dispatch or on persist.

      A is also thrown either immediately, on dispatch or on persist if a conflict with an already assigned mixin occurs.

      A may also be thrown either immediately , on dispatch or on persist if the attempted change violates implementation-specific node type transition rules. A repository that disallows all primary node type changes would simple throw this exception in all cases.

      If the specified node type is not recognized a is thrown either immediately, on dispatch or on persist.

      A is thrown either immediately , on dispatch or on persist if this node is read-only dues to a check-in.

      A is thrown either immediately, on dispatch or on persist if a lock prevents the change of node type.

      Parameters:
      - the name of the new node type.
      Throws:
      - if the specified primary node type creates a type conflict and this implementation performs this validation immediately.
      - If the specified is not recognized and this implementation performs this validation immediately.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the change of the primary node type and this implementation performs this validation immediately.
      - if another error occurs.
      Since:
      JCR 2.0


      addMixin

      void addMixin(java.lang.String mixinName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException
      Adds the mixin node type named to this node. If this node is already of type (either due to a previously added mixin or due to its primary type, through inheritance) then this method has no effect. Otherwise is added to this node's property.

      Semantically, the new node type may take effect immediately, on dispatch or on persist. The behavior adopted must be the same as the behavior adopted for and the behavior that occurs when a node is first created.

      A is thrown either immediately, on dispatch or on persist, if a conflict with another assigned mixin or the primary node type or for an implementation-specific reason. Implementations may differ on when this validation is done.

      In some implementations it may only be possible to add mixin types before a a node is persisted for the first time. I such cases any later calls to will throw a either immediately, on dispatch or on persist.

      A is thrown either immediately, on dispatch or on persist, if the specified is not recognized. Implementations may differ on when this validation is done.

      A is thrown either immediately, on dispatch or on persist, if this node is read-only due to a checked-in node. Implementations may differ on when this validation is done.

      A is thrown either immediately, on dispatch or on persist, if a lock prevents the addition of the mixin. Implementations may differ on when this validation is done.

      Parameters:
      - the name of the mixin node type to be added
      Throws:
      - If the specified is not recognized and this implementation performs this validation immediately.
      - if the specified mixin node type creates a conflict and this implementation performs this validation immediately.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the addition of the mixin and this implementation performs this validation immediately.
      - if another error occurs.


      removeMixin

      void removeMixin(java.lang.String mixinName) throws NoSuchNodeTypeException, VersionException, ConstraintViolationException, LockException, RepositoryException
      Removes the specified mixin node type from this node and removes from this node's property. Both the semantic change in effective node type and the persistence of the change to the property occur on persist.

      If this node does not have the specified mixin, a is thrown either immediately, on dispatch or on persist. Implementations may differ on when this validation is done.

      A will be thrown either immediately, on dispatch or on persist, if the removal of a mixin is not allowed. Implementations are free to enforce any policy with regard to mixin removal and may differ on when this validation is done.

      A is thrown either immediately, on dispatch or on persist, if this node is read-only due to a checked-in node. Implementations may differ on when this validation is done.

      A is thrown either immediately or on if a lock prevents the removal of the mixin. Implementations may differ on when this validation is done.

      Parameters:
      - the name of the mixin node type to be removed.
      Throws:
      - if the specified is not currently assigned to this node and this implementation performs this validation immediately.
      - if the specified mixin node type is prevented from being removed and this implementation performs this validation immediately.
      - if this node is read-only due to a checked-in node and this implementation performs this validation immediately.
      - if a lock prevents the removal of the mixin and this implementation performs this validation immediately.
      - if another error occurs.


      canAddMixin

      boolean canAddMixin(java.lang.String mixinName) throws NoSuchNodeTypeException, RepositoryException
      Returns if calling on this node with the mixn node type will not fail. Returns otherwise.

      Parameters:
      - The name of the mixin to be tested.
      Returns:
      if addMixin will not fail when called on this node with the specified ; otherwise.
      Throws:
      - if the specified mixin node type name is not recognized.
      - if another error occurs.


      getDefinition

      NodeDefinitiongetDefinition() throws RepositoryException
      Returns the node definition that applies to this node. In some cases there may appear to be more than one definition that could apply to this node. However, it is assumed that upon creation of this node, a single particular definition was used and it is that definition that this method returns. How this governing definition is selected upon node creation from among others which may have been applicable is an implementation issue and is not covered by this specification. The returned when this method is called on the root node of a workspace is also up to the implementation.

      Returns:
      a object.
      Throws:
      - if an error occurs.
      See Also:


      checkin

      Versioncheckin() throws VersionException, UnsupportedRepositoryOperationException, InvalidItemStateException, LockException, RepositoryException
      Deprecated. As of JCR 2.0, should be used instead.

      Creates a new version of this node and returns that object. The new version becomes the base version of this node. The name of the new version is implementaion determined.

      This node becomes checked-in and its property is set to false to reflect this. On a successful check-in the change to this property is made as a workspace-write, and therefore does not require a .

      The part of the subgraph of this node that is affected by check-in becomes read-only (see the specification for details).

      If this node is already checked-in, this method has no effect but returns the current base version of this node.

      Returns:
      the created version.
      Throws:
      - if a child item of this node has an status of . This includes the case (under full versioning) where an unresolved merge failure exists on this node, as indicated by the presence of a property. Under full versioning this exception is also thrown if the


      checkout

      void checkout() throws UnsupportedRepositoryOperationException, LockException, ActivityViolationException, RepositoryException
      Deprecated. As of JCR 2.0, should be used instead.

      Sets this versionable node to checked-out status by setting its property to . Under full versioning it also sets the property to be a reference to the current base version (the same value as held in ). These changes are made by worksapce-write and therefore do require a .

      The part of the subgraph of this node that is affected by the checked-out status of this node becomes no longer read-only.

      If this node is already checked-out, this method has no effect.

      Throws:
      - if this node is not versionable.
      - if a lock prevents the checkout.
      - if the checkout conflicts with the activity present on the current session.
      - if another error occurs.


      doneMerge

      void doneMerge(Version version) throws VersionException, InvalidItemStateException, UnsupportedRepositoryOperationException, RepositoryException
      Deprecated. As of JCR 2.0, should be used instead.

      Support for this method is only required under full versioning.

      Completes the merge process with respect to this node and the specified .

      When the method is called on a node, every versionable node in that subgraph is compared with its corresponding node in the indicated other workspace and a "merge test result" is determined indicating one of the following:

      1. This node will be updated to the state of its correspondee (if the base version of the correspondee is more recent in terms of version history).
      2. This node will be left alone (if this node's base version is more recent in terms of version history).
      3. This node will be marked as having failed the merge test (if this node's base version is on a different branch of the version history from the base version of its corresponding node in the other workspace, thus preventing an automatic determination of which is more recent).
      (See for more details)

      In the last case the merging of the subgraph of the versionable node in question must be done by the application (for example, by providing a merge tool for the user).

      Additionally, once the subgraphs of the nodes has been merged, their version graph branches must also be merged. The JCR versioning system provides for this by keeping a record, for each versionable node that fails the merge test, of the base version of the corresponding node that caused the merge failure. This record is kept in the property of this node. After a , this property will contain one or more (if multiple merges have been performed) s that point to the "failed versions".

      To complete the merge process, the client calls passing the version object referred to be the property that the client wishes to connect to node in the version graph. This has the effect of moving the reference to the indicated version from the property of node to the .

      If the client chooses not to connect this node to a particular version referenced in the property, he calls . This has the effect of removing the reference to the specified from without adding it to .

      Once the last reference in has been either moved to (with ) or just removed from (with ) the property is automatically removed, thus enabling node to be checked-in, creating a new version (note that before the is removed, its setting of prevents checkin). This new version will have a predecessor connection to each version for which was called, thus joining those branches of the version graph.

      If successful, these changes are persisted immediately, there is no need to call .

      Parameters:
      - a version referred to by this node's property.
      Throws:
      - if the version specifed is not among those referenced in this node's or if this node is currently checked-in.
      - if there are unsaved changes pending on this node.
      - if this node is not versionable.
      - if another error occurs.


      cancelMerge

      void cancelMerge(Version version) throws VersionException, InvalidItemStateException, UnsupportedRepositoryOperationException, RepositoryException
      Deprecated. As of JCR 2.0, should be used instead.

      Support for this method is only required under full versioning.

      Cancels the merge process with respect to this node and specified .

      See for a full explanation. Also see for more details.

      If successful, these changes are persisted immediately, there is no need to call .

      Parameters:
      - a version referred to by this node's property.
      Throws:
      - if the version specified is not among those referenced in this node's or if this node is currently checked-in.
      - if there are unsaved changes pending on this node.
      - if this node is not versionable.
      - if another error occurs.


      update

      void update(java.lang.String srcWorkspace) throws NoSuchWorkspaceException, AccessDeniedException, LockException, InvalidItemStateException, RepositoryException
      If this node does have a corresponding node in the workspace , then this replaces this node and its subgraph with a clone of the corresponding node and its subgraph.

      If this node does not have a corresponding node in the workspace , then the method has no effect.

      If the succeeds the changes made are persisted immediately, there is no need to call .

      Note that does not respect the checked-in status of nodes. An may change a node even if it is currently checked-in (This fact is only relevant in an implementation that supports versioning).

      Parameters:
      - the name of the source workspace.
      Throws:
      - If does not exist.
      - if this (not necessarily this ) has pending unsaved changes.
      - If the current session does not have sufficent access to perform the operation.
      - if a lock prevents the update.
      - If another error occurs.


      merge

      NodeIteratormerge(java.lang.String srcWorkspace, boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException
      Deprecated. As of JCR 2.0, should be used instead.

      Support for this method is only required under full versioning.

      This method can be thought of as a version-sensitive update.

      It recursively tests each versionable node in the subgraph of this node against its corresponding node in with respect to the relation between their respective base versions and either updates the node in question or not, depending on the outcome of the test.

      A is thrown if is and a versionable node is encountered whose corresponding node's base version is on a divergent branch from this node's base version.

      If successful, the changes are persisted immediately, there is no need to call .

      This method returns a over all versionable nodes in the subgraph that received a merge result of fail. If is , this iterator will be empty (since if returns successfully, instead of throwing an exception, it will be because no failures were encountered). If is , this iterator will contain all nodes that received a fail during the course of this operation.

      Parameters:
      - the name of the source workspace.
      - a boolean
      Returns:
      iterator over all nodes that received a merge result of "fail" in the course of this operation.
      Throws:
      - if is and a failed merge result is encountered.
      - if this session (not necessarily this ) has pending unsaved changes.
      - if the specified does not exist.
      - if the current session does not have sufficient rights to perform the operation.
      - if a lock prevents the merge.
      - if another error occurs.


      getCorrespondingNodePath

      java.lang.String getCorrespondingNodePath(java.lang.String workspaceName) throws ItemNotFoundException, NoSuchWorkspaceException, AccessDeniedException, RepositoryException
      Returns the absolute path of the node in the specified workspace that corresponds to node.

      Parameters:
      - the name of the workspace.
      Returns:
      the absolute path to the corresponding node.
      Throws:
      - if no corresponding node is found.
      - if the workspace is unknown.
      - if the current has insufficent access capabilities to perform this operation.
      - if another error occurs.


      getSharedSet

      NodeIteratorgetSharedSet() throws RepositoryException
      Returns an iterator over all nodes that are in the shared set of this node. If this node is not shared then the returned iterator contains only this node.

      Returns:
      a .
      Throws:
      - if an error occurs.
      Since:
      JCR 2.0


      removeSharedSet

      void removeSharedSet() throws VersionException, LockException, ConstraintViolationException, RepositoryException
      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 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.

      Throws:
      - if the parent node of this item is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until .
      - if a lock prevents the removal of this item and this implementation performs this validation immediately instead of waiting until .
      - if removing the specified item would violate a node type or implementation-specific constraint and this implementation performs this validation immediately instead of waiting until .
      - if another error occurs.
      Since:
      JCR 2.0
      See Also:
      , ,


      removeShare

      void removeShare() throws VersionException, LockException, ConstraintViolationException, RepositoryException
      Removes this node, but does not remove any other node in the shared set of this node.

      Throws:
      - if the parent node of this item is versionable and checked-in or is non-versionable but its nearest versionable ancestor is checked-in and this implementation performs this validation immediately instead of waiting until .
      - if a lock prevents the removal of this item and this implementation performs this validation immediately instead of waiting until .
      - if removing the specified item would violate a node type or implementation-specific constraint and this implementation performs this validation immediately instead of waiting until .
      - if if this node cannot be removed without removing another node in the shared set of this node or another error occurs.
      Since:
      JCR 2.0
      See Also:
      , ,


      isCheckedOut

      boolean isCheckedOut() throws RepositoryException
      Returns if this node is currently in the checked-in state (either due to its own status as a versionable node or due to the effect of a versionable node being checked in above it). Otherwise this method returns . This includes the case where the repository does not support versioning (and therefore all nodes are always "checked-out", by default).

      Returns:
      a boolean
      Throws:
      - if an error occurs.


      restore

      void restore(java.lang.String versionName, boolean removeExisting) throws VersionException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException
      Deprecated. As of JCR 2.0, should be used instead.

      Restores node to the state defined by the version with the specified .

      This method will work regardless of whether this node is checked-in or not.

      An identifier collision occurs when a node exists outside the subgraph rooted at this node with the same identifier as a node that would be introduced by the operation into the subgraph at this node. The result in such a case is governed by the flag. If is , then the incoming node takes precedence, and the existing node (and its subgraph) is removed (if possible; otherwise a is thrown). If is , then a is thrown and no changes are made. Note that this applies not only to cases where the restored node itself conflicts with an existing node but also to cases where a conflict occurs with any node that would be introduced into the workspace by the restore operation. In particular, conflicts involving subnodes of the restored node that have settings of or are also governed by the flag.

      Parameters:
      - a object
      - a boolean flag that governs what happens in case of an identifier collision.
      Throws:
      - if this node is not versionable.
      - if the specified is not part of this node's version history or if an attempt is made to restore the root version ().
      - if is and an identifier collision occurs.
      - if a lock prevents the restore.

      Sours: https://docs.adobe.com/content/docs/en/spec/jsr170/javadocs/jcr-2.0/javax/jcr/Node.html

      Similar news:

      Modifier and TypeMethod and Description

      Returns the binary property value at from or if no such property exists.

      Returns the binary property value at or if no such property exists.

      Returns the boolean property value at from or if no such property exists.

      Returns the boolean property value at or if no such property exists.

      Returns an over the children of the given node.

      Returns an over those children of the given node that match the given name pattern.

      Returns an over those children of the given node that match the given name patterns.

      Returns the date property value at from or if no such property exists.

      Returns the date property value at or if no such property exists.

      Returns the decimal property value at from or if no such property exists.

      Returns the decimal property value at or if no such property exists.

      Returns the double property value at from or if no such property exists.

      Returns the double property value at or if no such property exists.

      Returns the last modified date of the given file node.

      Returns the long property value at from or if no such property exists.

      Returns the long property value at or if no such property exists.

      Get the node at from or if no such node exists.

      Gets the node at or if no such node exists.

      Returns an over nodes in the given query result.

      Returns the named child of the given node, creating it as an nt:folder node if it does not already exist.

      Returns the named child of the given node, creating the child if it does not already exist.

      Returns the named child of the given node, creating the child if it does not already exist.

      Creates or gets the at the given path relative to the baseNode.

      Creates or gets the at the given Path.

      Creates or gets the at the given Path.

      Creates or gets the at the given Path.

      Creates or gets the at the given path.

      Creates a at the given Path.

      Returns an over the properties of the given node.

      Returns an over those properties of the given node that match the given name pattern.

      Returns an over those properties of the given node that match the given name patterns.

      Returns the numeric constant value of the property type with the specified name.

      Return the property type names including or excluding 'undefined' depending on the specified flag.

      Returns an over references to the given node.

      Returns an over those references to the given node that have the given name.

      Returns the default repository of the current environment.

      Looks up the available and returns the that one of the factories returns for the given settings.

      Returns the repository identified by the given URI.

      Returns an over nodes in the given query result.

      Returns an over the shared set of the given node.

      Returns the string property value at from or if no such property exists.

      Returns the string property value at or if no such property exists.

      Returns an over weak references to the given node.

      Returns an over those weak references to the given node that have the given name.

      Transform an into an for single use in a Java 5 for-each loop.

      Transform an into an for single use in a Java 5 for-each loop.

      Transform an into an for single use in a Java 5 for-each loop.

      Transform any type of into an for single use in a Java 5 for-each loop.

      Transform an into an for single use in a Java 5 for-each loop.

      Transform an into an for single use in a Java 5 for-each loop.

      Transform an into an for single use in a Java 5 for-each loop.

      Transform an into an for single use in a Java 5 for-each loop.

      Transform an into an for single use in a Java 5 for-each loop.

      Creates or updates the named child of the given node.

      Creates or updates the named child of the given node.

      Returns a stream for reading the contents of the file stored at the given node.

      Writes the contents of file stored at the given node to the given stream.

      Sets the last modified date of the given file node.

      Returns a string representation of the given item.

      Sours: https://jackrabbit.apache.org/api/2.14/org/apache/jackrabbit/commons/JcrUtils.html


      738 739 740 741 742