Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324504

Summary: Provide API to create CDOResourceFolders
Product: [Modeling] EMF Reporter: Eike Stepper <stepper>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: enhancement    
Priority: P3 Keywords: noteworthy
Version: 4.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: Power to the People

Description Eike Stepper CLA 2010-09-04 01:25:21 EDT
Currently the addition of resources and folders depends on the parent node:

      node = EresourceFactory.eINSTANCE.createCDOResourceFolder();
      node.setName(nameame);
      if (parent instanceof CDOResourceFolder)
      {
        ((CDOResourceFolder)parent).getNodes().add(node);
      }
      else
      {
        ((CDOResource)parent).getContents().add(node);
      }
Comment 1 Eike Stepper CLA 2010-09-04 01:27:29 EDT
I've added to CDOTransaction:

		public CDOResourceFolder createResourceFolder(String path);
		
And to CDOResourceFolder:

  public CDOResourceFolder addResourceFolder(String name);
  public CDOResource addResource(String name);
Comment 2 Eike Stepper CLA 2010-09-04 01:28:35 EDT
Committed to HEAD
Comment 3 Eike Stepper CLA 2011-06-23 03:37:22 EDT
Available in R20110608-1407