- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Create NdRomEntry copy (API)
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-11-2012 06:57 AM - last edited on 01-30-2012 09:36 AM
Hi,
in my application I want to copy some NdRomEntry from one project to another. I don't known what kind of source entry (function, ruleset, template, instance, provider, ...) is selected by user. Exists Download Free Programs the way, how realize this operation using NdPromItemContent from source object without creating new one, empty using correct factory like NdPromSrlConstructContentFactory for the functions.
My code:
NdPromItem sourcePromItem = (NdPromItem) sourceProject.lookupEntry(NdLocationFactory.create
NdRomSchemaManager sourceSchemaManager = sourceProject.getRomConnectionContext().getSchemaM
NdRomSchemaElementInfo info = sourceSchemaElement.getSchemaElementInfo(); NdRomSchemaManager targetSchemaManager = targetDir.getProject().getRomConnectionContext().g
NdRomSchemaElement targetSchemaElement = targetSchemaManager.lookupSchemaElement(info.getTy
NdPromItemFactory factoryTarget = targetSchemaElement.getItemFactory();
NdPromItem newItem = factoryTarget.newItem(sourcePromItem.getItemConten
newItem.save();
The first problem occures, when I try copy some function. FactoryTarget.newItem throws an exception:
com.blazesoft.template.engine.NdTemplateRuntimeExc
Is it possible in some way reset, delete sourcePromItem parent? How solve this issue? I dont want create blank object and set all the stuffs like: name, body, generic type, comment content, parameters, value holders, ...
Thanks for advice,

