Examples of addChildNodeEntry()


Examples of org.apache.jackrabbit.core.persistence.util.NodePropBundle.addChildNodeEntry()

                        int l = (int) System.currentTimeMillis();
                        int r = new Random().nextInt();
                        int n = l + r;
                        String nodeName = Integer.toHexString(n);
                        parentBundle.addChildNodeEntry(NameFactoryImpl
                                .getInstance().create("{}" + nodeName), id);
                        log.info("NodeState '" + id + "' adds itself to its parent node '" + parentId + "' with a new name '" + nodeName + "'");
                        modifications.add(parentBundle);
                    }
                }
View Full Code Here

Examples of org.apache.jackrabbit.core.persistence.util.NodePropBundle.addChildNodeEntry()

                            if (fix && lostNFoundId != null) {
                                // add a child to lost+found
                                NodePropBundle lfBundle = pm.loadBundle(lostNFoundId);
                                lfBundle.markOld();
                                String nodeName = id + "-" + System.currentTimeMillis();
                                lfBundle.addChildNodeEntry(NF.create("", nodeName), id);
                                pm.storeBundle(lfBundle);
                                pm.evictBundle(lostNFoundId);

                                // set lost+found parent
                                bundle.setParentId(lostNFoundId);
View Full Code Here

Examples of org.apache.jackrabbit.core.state.NodeState.addChildNodeEntry()

                pt.setValues(new InternalValue[]{InternalValue.create(NameConstants.REP_ACTIVITIES)});
                root.addPropertyName(pt.getName());

                // add activities as child
                NodeState historyState = pMgr.load(storageId);
                historyState.addChildNodeEntry(NameConstants.JCR_ACTIVITIES, activitiesId);
                               
                ChangeLog cl = new ChangeLog();
                cl.added(root);
                cl.added(pt);
                cl.modified(historyState);
View Full Code Here

Examples of org.apache.jackrabbit.core.state.NodeState.addChildNodeEntry()

                    (NodeState) targetNode.getOrCreateTransientItemState();
            targetState.setParentId(destParentNode.getNodeId());
            // 3. add child node entry to new parent
            NodeState destParentState =
                    (NodeState) destParentNode.getOrCreateTransientItemState();
            destParentState.addChildNodeEntry(destName.getName(), targetId);
        }

        // change definition of target
        targetNode.onRedefine(newTargetDef.unwrap());
    }
View Full Code Here

Examples of org.apache.jackrabbit.core.state.NodeState.addChildNodeEntry()

            // but preserving original position
            state.removeAllChildNodeEntries();
            for (ChildNodeEntry cne : cneList) {
                if (cne.getId().equals(id)) {
                    // replace entry with different name
                    state.addChildNodeEntry(nodeName, id);
                } else {
                    state.addChildNodeEntry(cne.getName(), cne.getId());
                }
            }
        }
View Full Code Here

Examples of org.apache.jackrabbit.core.state.NodeState.addChildNodeEntry()

            for (ChildNodeEntry cne : cneList) {
                if (cne.getId().equals(id)) {
                    // replace entry with different name
                    state.addChildNodeEntry(nodeName, id);
                } else {
                    state.addChildNodeEntry(cne.getName(), cne.getId());
                }
            }
        }

        return node;
View Full Code Here

Examples of org.apache.jackrabbit.core.state.NodeState.addChildNodeEntry()

        // (6) modify the state of 'this', i.e. the parent node
        NodeId srcId = src.getNodeId();
        thisState = (NodeState) getOrCreateTransientItemState();
        // add new child node entry
        thisState.addChildNodeEntry(name, srcId);

        return itemMgr.getNode(srcId, parentId);
    }

    // -----------------------------------------------------------------< Item >
View Full Code Here

Examples of org.apache.jackrabbit.core.state.NodeState.addChildNodeEntry()

        }

        // modify the state of 'this', i.e. the parent node
        NodeState thisState = (NodeState) getOrCreateTransientItemState();
        // add new child node entry
        thisState.addChildNodeEntry(name, nodeState.getNodeId());

        // add 'auto-create' properties defined in node type
        for (PropertyDefinition aPda : nodeType.getAutoCreatedPropertyDefinitions()) {
            PropertyDefinitionImpl pd = (PropertyDefinitionImpl) aPda;
            node.createChildProperty(pd.unwrap().getName(), pd.getRequiredType(), pd);
View Full Code Here

Examples of org.apache.jackrabbit.core.state.NodeState.addChildNodeEntry()

            // re-parent target node
            target.setParentId(destParent.getNodeId());

            // add child node entry to new parent
            destParent.addChildNodeEntry(destName.getName(), target.getNodeId());
        }

        // store states
        stateMgr.store(target);
        if (renameOnly) {
View Full Code Here

Examples of org.apache.jackrabbit.core.state.NodeState.addChildNodeEntry()

        }

        // modify the state of 'this', i.e. the parent node
        NodeState thisState = (NodeState) getOrCreateTransientItemState();
        // add new child node entry
        thisState.addChildNodeEntry(name, nodeState.getNodeId());

        // add 'auto-create' properties defined in node type
        for (PropertyDefinition aPda : nodeType.getAutoCreatedPropertyDefinitions()) {
            PropertyDefinitionImpl pd = (PropertyDefinitionImpl) aPda;
            node.createChildProperty(pd.unwrap().getName(), pd.getRequiredType(), pd);
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.