Examples of replaceChild()


Examples of org.apache.hadoop.hdfs.server.namenode.INodeDirectory.replaceChild()

    INodeDirectory dir2 = fsdir.getINode4Write(sdir2.toString()).asDirectory();
    INodeDirectory mockDir2 = spy(dir2);
    doReturn(false).when(mockDir2).addChild((INode) anyObject(), anyBoolean(),
           Mockito.anyInt());
    INodeDirectory root = fsdir.getINode4Write("/").asDirectory();
    root.replaceChild(dir2, mockDir2, fsdir.getINodeMap());
   
    final Path newfoo = new Path(sdir2, "foo");
    boolean result = hdfs.rename(foo, newfoo);
    assertFalse(result);
   
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.INodeDirectory.replaceChild()

    INodeDirectory dir2 = fsdir.getINode4Write(sdir2.toString()).asDirectory();
    INodeDirectory mockDir2 = spy(dir2);
    doReturn(false).when(mockDir2).addChild((INode) anyObject(), anyBoolean(),
            Mockito.anyInt());
    INodeDirectory root = fsdir.getINode4Write("/").asDirectory();
    root.replaceChild(dir2, mockDir2, fsdir.getINodeMap());
   
    final Path newfoo = new Path(sdir2, "foo");
    boolean result = hdfs.rename(foo, newfoo);
    assertFalse(result);
   
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.INodeDirectory.replaceChild()

    INodeDirectory dir3 = fsdir.getINode4Write(sdir3.toString()).asDirectory();
    INodeDirectory mockDir3 = spy(dir3);
    doReturn(false).when(mockDir3).addChild((INode) anyObject(), anyBoolean(),
            Mockito.anyInt());
    INodeDirectory root = fsdir.getINode4Write("/").asDirectory();
    root.replaceChild(dir3, mockDir3, fsdir.getINodeMap());
   
    final Path foo_dir2 = new Path(sdir2, "foo2");
    final Path foo_dir3 = new Path(sdir3, "foo3");
    hdfs.rename(foo, foo_dir2);
    boolean result = hdfs.rename(foo_dir2, foo_dir3);
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.INodeDirectory.replaceChild()

    doReturn(false).when(mockDir3).addChild((INode) Mockito.isNull(),
        anyBoolean(), Mockito.anyInt());
    Mockito.when(mockDir3.addChild((INode) Mockito.isNotNull(), anyBoolean(),
        Mockito.anyInt())).thenReturn(false).thenCallRealMethod();
    INodeDirectory root = fsdir.getINode4Write("/").asDirectory();
    root.replaceChild(dir3, mockDir3, fsdir.getINodeMap());
    foo3Node.setParent(mockDir3);
   
    try {
      hdfs.rename(foo, foo3, Rename.OVERWRITE);
      fail("the rename from " + foo + " to " + foo3 + " should fail");
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument.replaceChild()

      this.isCurrentlySaving = true;
      model.aboutToChangeModel();
      // reattach root node from document
      IDOMDocument document = ((DOMModelImpl) model).getDocument();
      Node root = document.getDocumentElement();
      document.replaceChild(diagram.getNode(), root);

      formatElement(monitor);
      model.changedModel();
      model.save();
      getCommandStack().markSaveLocation();
View Full Code Here

Examples of org.exist.dom.ElementImpl.replaceChild()

                        "Please consider removing the document or use 'xu:update' to just replace the children of the root.");}
                switch (node.getNodeType()) {
                    case Node.ELEMENT_NODE:
                        if (modifications == 0) {modifications = 1;}
                        temp = children.item(0);
                        parent.replaceChild(transaction, temp, node);
                        break;
                    case Node.TEXT_NODE:
                        temp = children.item(0);
                        text = new TextImpl(temp.getNodeValue());
                        modifications = 1;
View Full Code Here

Examples of org.exoplatform.webui.core.UITabPane.replaceChild()

         UIPortal uiPortal = event.getSource();
         UIPortalApplication application = uiPortal.getAncestorOfType(UIPortalApplication.class);
         UIPortalComposer composer = application.findFirstComponentOfType(UIPortalComposer.class);
         UITabPane uiTabPane = composer.getChild(UITabPane.class);
         String appListId = uiTabPane.getChild(UIApplicationList.class).getId();
         uiTabPane.replaceChild(appListId, composer.createUIComponent(UIApplicationList.class, null, null));
      }
   }

   public static class EditPortalPropertiesActionListener extends EventListener<UIPortal>
   {
View Full Code Here

Examples of org.exoplatform.webui.core.UITabPane.replaceChild()

        public void execute(Event<UIPortal> event) throws Exception {
            UIPortalApplication application = Util.getUIPortalApplication();
            UIPortalComposer composer = application.findFirstComponentOfType(UIPortalComposer.class);
            UITabPane uiTabPane = composer.getChild(UITabPane.class);
            String appListId = uiTabPane.getChild(UIApplicationList.class).getId();
            uiTabPane.replaceChild(appListId, composer.createUIComponent(UIApplicationList.class, null, null));
        }
    }

    public static class EditPortalPropertiesActionListener extends EventListener<UIPortal> {
        public void execute(Event<UIPortal> event) throws Exception {
View Full Code Here

Examples of org.exoplatform.webui.core.UITabPane.replaceChild()

        public void execute(Event<UIPortal> event) throws Exception {
            UIPortalApplication application = Util.getUIPortalApplication();
            UIPortalComposer composer = application.findFirstComponentOfType(UIPortalComposer.class);
            UITabPane uiTabPane = composer.getChild(UITabPane.class);
            String appListId = uiTabPane.getChild(UIApplicationList.class).getId();
            uiTabPane.replaceChild(appListId, composer.createUIComponent(UIApplicationList.class, null, null));
        }
    }

    public static class EditPortalPropertiesActionListener extends EventListener<UIPortal> {
        public void execute(Event<UIPortal> event) throws Exception {
View Full Code Here

Examples of org.jboss.virtual.spi.VirtualFileHandler.replaceChild()

      VirtualFileHandler newHandler = fileSystemContext.getRoot();
      oldVFSContext.addTempInfo(new BasicTempInfo(path, copy, newHandler));

      VirtualFileHandler parent = handler.getParent();
      if (parent != null && replaceOldHandler(parent, handler, newHandler))
         parent.replaceChild(handler, newHandler);

      return newHandler.getVirtualFile();
   }

   /**
 
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.