Package org.modeshape.jcr.cache

Examples of org.modeshape.jcr.cache.MutableCachedNode.removeProperty()


                    if (retentionInfoRetained && !isValidReference(node, JcrLexicon.RETENTION_POLICY, false)) {
                        // The 'jcr:retentionPolicy' REFERENCE values is not valid or does not reference an existing node,
                        // so the 'jcr:retentionPolicy', 'jcr:hold' and 'jcr:isDeep' properties should be removed ...
                        mutable.removeProperty(cache, JcrLexicon.HOLD);
                        mutable.removeProperty(cache, JcrLexicon.IS_DEEP);
                        mutable.removeProperty(cache, JcrLexicon.RETENTION_POLICY);
                    }

                }

                // --------------------
View Full Code Here


                    this.locksByNodeKey.remove(lockedNodeKey);

                    CachedNode lockedNode = internalSession.getWorkspace().getNode(lockedNodeKey);
                    if (lockedNode != null) {
                        MutableCachedNode mutableLockedNode = internalSession.mutable(lockedNodeKey);
                        mutableLockedNode.removeProperty(internalSession, JcrLexicon.LOCK_IS_DEEP);
                        mutableLockedNode.removeProperty(internalSession, JcrLexicon.LOCK_OWNER);
                        mutableLockedNode.unlock();
                    }
                }
                internalSession.save();
View Full Code Here

                    CachedNode lockedNode = internalSession.getWorkspace().getNode(lockedNodeKey);
                    if (lockedNode != null) {
                        MutableCachedNode mutableLockedNode = internalSession.mutable(lockedNodeKey);
                        mutableLockedNode.removeProperty(internalSession, JcrLexicon.LOCK_IS_DEEP);
                        mutableLockedNode.removeProperty(internalSession, JcrLexicon.LOCK_OWNER);
                        mutableLockedNode.unlock();
                    }
                }
                internalSession.save();
            }
View Full Code Here

            if (session.cache().getNode(lockedNodeKey) == null) {
                // the node on which the lock was placed, has been removed
                continue;
            }
            MutableCachedNode lockedNode = lockingSession.mutable(lockedNodeKey);
            lockedNode.removeProperty(lockingSession, JcrLexicon.LOCK_IS_DEEP);
            lockedNode.removeProperty(lockingSession, JcrLexicon.LOCK_OWNER);
            lockedNode.unlock();
        }

        // Now save the two sessions ...
View Full Code Here

                // the node on which the lock was placed, has been removed
                continue;
            }
            MutableCachedNode lockedNode = lockingSession.mutable(lockedNodeKey);
            lockedNode.removeProperty(lockingSession, JcrLexicon.LOCK_IS_DEEP);
            lockedNode.removeProperty(lockingSession, JcrLexicon.LOCK_OWNER);
            lockedNode.unlock();
        }

        // Now save the two sessions ...
        lockingSession.save(systemSession, null);
View Full Code Here

                // remove the new property from 4.0 which actually stores the ACL count to simulate a pre 4.0 repository
                SessionCache systemSession = repository.createSystemSession(repository.runningState().context(), false);
                SystemContent systemContent = new SystemContent(systemSession);
                MutableCachedNode systemNode = systemContent.mutableSystemNode();
                systemNode.removeProperty(systemSession, ModeShapeLexicon.ACL_COUNT);
                systemSession.save();
                return null;
            }
        }, config);
View Full Code Here

                // TODO author=Horia Chiorean date=25-Mar-14 description=Why null ?!
                acm.removePolicy("/testNode", null);
                session.save();

                // remove the new property from 4.0 which actually stores the ACL count to simulate a pre 4.0 repository
                systemNode.removeProperty(systemSession, ModeShapeLexicon.ACL_COUNT);
                systemSession.save();
                return null;
            }
        }, config);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.