Ibm cm开发java api,项目类型的自动链接属性

问题描述:

我正在开发使用java api的ibm db2内容管理器的新应用程序。就像在ibm cm系统管理客户端中一样,我试图通过java编码将现有项目类型的属性复制到新项目类型。Ibm cm开发java api,项目类型的自动链接属性

我只会改变项目类型的名称和定义。所有重新租赁的财产将按原样复制;像属性,保留策略,自动链接,集合名称..

是否有人知道如何获取现有项目类型的“自动链接”属性并将其设置为新的项目类型?

最好的问候,

我用下面的方式来获取和设置自动链接属性。


boolean autoLinkBol = source_itemType.getAutoLinkEnable(); 
new_itemType.setAutoLinkEnable(autoLinkBol); 
dkCollection coll = source_itemType.getAutoLinkRule(); 
dkIterator iter = coll.createIterator(); // Create an iterator to iterate 
while(iter.more()){ // while there are still items in the list, continue 
    DKAutoLinkDefICM autoLinkDef = (DKAutoLinkDefICM) iter.next(); 
    DKAutoLinkDefICM autoLinkDef_new = new DKAutoLinkDefICM(); 
    autoLinkDef_new.setLinkType(autoLinkDef.get`enter code here`LinkType()); 
    autoLinkDef_new.setSourceEntityName(autoLinkDef.getSourceEntityName()); 
    autoLinkDef_new.setAttributeId(autoLinkDef.getAttributeId()); 
    autoLinkDef_new.setTargetEntityName("XXX_05"); 
    new_itemType.addAutoLinkRule(autoLinkDef_new); 
}