@Override public ChildReference getChild( Name name, int snsIndex, Context context ) { ChildReference firstReferencesChild = firstReferences.getChild(name, snsIndex, context); if (firstReferencesChild != null) { return firstReferencesChild; } return secondReferences.getChild(name, snsIndex, context); }
@Override public boolean hasACL( NodeCache cache ) { if (hasACL == null) { hasACL = getChildReferences(cache).getChild(ModeShapeLexicon.ACCESS_LIST_NODE_NAME) != null; } return hasACL; }
@Override public boolean hasACL( NodeCache cache ) { if (hasACL == null) { hasACL = getChildReferences(cache).getChild(ModeShapeLexicon.ACCESS_LIST_NODE_NAME) != null; } return hasACL; }
public NodeKey indexesKey() { if (indexesKey == null) { // This is idempotent, so no need to lock CachedNode systemNode = systemNode(); ChildReference nodeTypesRef = systemNode.getChildReferences(system).getChild(ModeShapeLexicon.INDEXES); indexesKey = nodeTypesRef.getKey(); } return indexesKey; }
public NodeKey nodeTypesKey() { if (nodeTypesKey == null) { // This is idempotent, so no need to lock CachedNode systemNode = systemNode(); ChildReference nodeTypesRef = systemNode.getChildReferences(system).getChild(JcrLexicon.NODE_TYPES); nodeTypesKey = nodeTypesRef.getKey(); } return nodeTypesKey; }
public NodeKey versionStorageKey() { if (versionStorageKey == null) { // This is idempotent, so no need to lock CachedNode systemNode = systemNode(); ChildReference locksRef = systemNode.getChildReferences(system).getChild(JcrLexicon.VERSION_STORAGE); versionStorageKey = locksRef.getKey(); } return versionStorageKey; }
public NodeKey indexesKey() { if (indexesKey == null) { // This is idempotent, so no need to lock CachedNode systemNode = systemNode(); ChildReference nodeTypesRef = systemNode.getChildReferences(system).getChild(ModeShapeLexicon.INDEXES); indexesKey = nodeTypesRef.getKey(); } return indexesKey; }
public NodeKey versionStorageKey() { if (versionStorageKey == null) { // This is idempotent, so no need to lock CachedNode systemNode = systemNode(); ChildReference locksRef = systemNode.getChildReferences(system).getChild(JcrLexicon.VERSION_STORAGE); versionStorageKey = locksRef.getKey(); } return versionStorageKey; }
public NodeKey nodeTypesKey() { if (nodeTypesKey == null) { // This is idempotent, so no need to lock CachedNode systemNode = systemNode(); ChildReference nodeTypesRef = systemNode.getChildReferences(system).getChild(JcrLexicon.NODE_TYPES); nodeTypesKey = nodeTypesRef.getKey(); } return nodeTypesKey; }
public NodeKey namespacesKey() { if (namespacesKey == null) { // This is idempotent, so no need to lock CachedNode systemNode = systemNode(); ChildReference namespacesRef = systemNode.getChildReferences(system).getChild(ModeShapeLexicon.NAMESPACES); namespacesKey = namespacesRef.getKey(); } return namespacesKey; }
public NodeKey locksKey() { if (locksKey == null) { // This is idempotent, so no need to lock CachedNode systemNode = systemNode(); ChildReference locksRef = systemNode.getChildReferences(system).getChild(ModeShapeLexicon.LOCKS); locksKey = locksRef.getKey(); } return locksKey; }
public NodeKey systemKey() { if (systemKey == null) { // This is idempotent, so no need to lock CachedNode rootNode = system.getNode(system.getRootKey()); ChildReference systemRef = rootNode.getChildReferences(system).getChild(JcrLexicon.SYSTEM); systemKey = systemRef.getKey(); } return systemKey; }
public NodeKey systemKey() { if (systemKey == null) { // This is idempotent, so no need to lock CachedNode rootNode = system.getNode(system.getRootKey()); ChildReference systemRef = rootNode.getChildReferences(system).getChild(JcrLexicon.SYSTEM); systemKey = systemRef.getKey(); } return systemKey; }
protected CachedNode getNodeAtPath( Path path, NodeCache cache ) { CachedNode node = cache.getNode(cache.getRootKey()); for (Segment segment : path) { ChildReference childRef = node.getChildReferences(cache).getChild(segment); if (childRef == null) return null; node = cache.getNode(childRef); } return node; }
private void loadStoredProjections( boolean validate ) { assert !started(); SessionCache systemSession = repository.createSystemSession(repository.context(), false); CachedNode systemNode = getSystemNode(systemSession); ChildReference federationNodeRef = systemNode.getChildReferences(systemSession).getChild(ModeShapeLexicon.FEDERATION); if (federationNodeRef != null) { Collection<Projection> newProjections = loadStoredProjections(systemSession, federationNodeRef, validate); Snapshot current = this.snapshot.get(); Snapshot updated = current.withProjections(newProjections); this.snapshot.compareAndSet(current, updated); } }
@Override protected Segment segment() throws RepositoryException { AbstractJcrNode parent = parent(); CachedNode node = parent.node(); SessionCache cache = session.cache(); ChildReference childRef = node.getChildReferences(cache).getChild(sharedSet.key()); return childRef.getSegment(); } }
protected AbstractJcrNode getNodeIfExists( Name childName ) throws RepositoryException { // It's just a name, so look for a child ... ChildReference ref = node().getChildReferences(sessionCache()).getChild(childName); return ref != null ? session().node(ref.getKey(), null, key()) : null; }
@Override Path path() throws ItemNotFoundException, InvalidItemStateException { AbstractJcrNode parent = parent(); CachedNode node = parent.node(); SessionCache cache = session.cache(); ChildReference childRef = node.getChildReferences(cache).getChild(sharedSet.key()); Path parentPath = parent.path(); return session().pathFactory().create(parentPath, childRef.getSegment()); }
AbstractJcrNode getNode( Name childName ) throws PathNotFoundException, RepositoryException { // It's just a name, so look for a child ... ChildReference ref = node().getChildReferences(sessionCache()).getChild(childName); if (ref == null) { String msg = JcrI18n.childNotFoundUnderNode.text(readable(childName), location(), session.workspaceName()); throw new PathNotFoundException(msg); } return session().node(ref.getKey(), null, key()); }