Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324504 - Provide API to create CDOResourceFolders
Summary: Provide API to create CDOResourceFolders
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard: Power to the People
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2010-09-04 01:25 EDT by Eike Stepper CLA
Modified: 2011-06-23 03:37 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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