FileNet
一、把Document放到Folder下
ReferentialContainmentRe
lationship rel = test1.file(myDoc,
lationship rel = test1.file(myDoc,
AutoUniqueName.AUTO_UNIQUE, null,
DefineSecurityParentage.DO_NOT_DEFINE_SECURITY_PARENTAGE);
rel.set_ContainmentName(“temp.jpg”);
rel.save(RefreshMode.NO_REFRESH);
二、把Document从Folder下删除,挂载关系
ReferentialContainmentRe
lationship rcr = test1.unfile(Factory.Document.fetchInstance(Obj, new Id(“{7A3457B8-5990-4616-BF3C-F0ACD064CECB}”), null));
lationship rcr = test1.unfile(Factory.Document.fetchInstance(Obj, new Id(“{7A3457B8-5990-4616-BF3C-F0ACD064CECB}”), null));
rcr.save(RefreshMode.NO_REFRESH);
三、查看Document,都放到了那些Folder下
Document doc = Factory.Document.fetchInstance(Obj, new Id(“{6E95712F-EB6C-4B38-A090-1E63707D882E}”), null);
FolderSet folders = (FolderSet) doc.getProperties().getObjectValue(“FoldersFiledIn”);
Iterator folderIter = folders.iterator();
while(folderIter.hasNext()){
Folder folderaaa = folderIter.next();
System.out.println(folderaaa.get_Id().toString());
}
版权声明:本文为hai2653068原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。