0

I try to get the Subgroup of a Group in the standard Cognos Namespace.

Quering the Contentstore to get ALL groups works fine. The standard methodes to get "members" of objects return the users or only the "root" group (the group I want the subgroups of). Nothing else....

Am I doing something wrong or is it just "not to be done" ?

4

1 回答 1

0

我找到了一种方法:

假设你有你想要子组的组的搜索路径。使用以下 PropEnum 查询它的内容存储:

PropEnum[] props = { 
    PropEnum.defaultName, 
    PropEnum.searchPath, 
    PropEnum.members };

结果你得到一个BaseClass[] object(虽然只有一个元素......)。Import com.cognos.developer.schemas.bibus._3.Group<--- 这是 Cognos SDK 库的一部分,现在您可以将其object[0]转换为 Group。

object.getMembers().getValue()[]是所有成员的数组,包括组、角色、帐户。

在java中它看起来像这样(查询已经完成的对象):

Group group = (Group)object[0];
BaseClass obj = null;
for (int i = 0; i < group.getMembers().getValue().length; i++){
   obj = group.getMembers().getValue();
   System.out.println(obj.getSearchPath().getValue());
}
于 2010-01-13T15:48:36.383 回答