If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Extract all the added user information in the portal using SDK

Started by nishi, 08 Jan 2009 02:39:29 PM

Previous topic - Next topic

nishi

Hi,

Is anyone have a sdk java code to extract the users added to the cognos.

Thanks

jue

Are you wanting to create a list of all the users contained in user groups? If so, you can do this simply by firing some SQL off against the Content Store. No SDK required.

nishi

Yes, We want to know the list of users added to the groups in cognos namespace but not querying the content store database.

I am searching for some sample sdk java code.

Thanks.

jue

The SDK code will query the content store at some point though. We did have a piece of SDK code a couple of years back. In our environment (35,000 users) it took about 3 mins to bring back all the information. The SQL query we wrote takes 5 seconds.

I don't have a copy of the SDK code that did this anymore unfortunately.

nishi

Thanks for your reply. I am looking for some sample code.

xiska

Hi

Try things like that:

get the namespace seachrpath out of the properties - may be written wrong.

Accounts Cognos Namespace default camID = /directory/CamID(":")//account
Accounts Namespace default camID = /directory/CamID("default")//account
Groups camID = /directory/CamID("default")//group
Roles camID = /directory/CamID("default")//role

PropEnum props[] = new PropEnum[] {PropEnum.searchPath, PropEnum.defaultName};
    Sort sOpt[] = new Sort[]{};
    QueryOptions qOpt = new QueryOptions();
    SearchPathMultipleObject spMulti = new SearchPathMultipleObject(camID);
   try
      {
         // retrieve the user account object from content store
         BaseClass account[] = cmService.query(spMulti, props, sOpt, qOpt);
         if (account.length == 0){
      for ( int i = 0,
...

Remember: There is no major difference query a folder or a namespace. The only difference is the Path and you can alway find them in the properties.