cancel
Showing results for 
Search instead for 
Did you mean: 

Portal Groups

Former Member
0 Kudos

Hi everybody,

I have a question because I want to get a list of ALL groups that are in the portal.

I have worked with UMFactory.getGroupFactory() but it does not return the list of all Groups present in the portal.

Anyone has an idea.

Thanks in advance

Armando

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Look at [this |https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b09cc7ef-8185-2b10-4aaa-96ffc93d237c]article.

Good luck,

Ola

Former Member
0 Kudos

Hi Ola

The link you provide permits to filter the Groups/Roles depending on a criteria

My issue is that I want to list the ALL Groups in the portal without any filtering.

Thanks

Armando

vmadhuvarshi_
Contributor
0 Kudos

Armando,

Use following code to get all groups from portal.


public void wdDoInit()
  {
    //@@begin wdDoInit()
	  IWDMessageManager msg = wdComponentAPI.getMessageManager();
	  Ifactory factory = UMFactory.getfactory();
	  try{
	  IGroupSearchFilter filter = factory.getGroupSearchFilter();
	  filter.setDisplayName("*",ISearchAttribute.LIKE_OPERATOR, false);
	  ISearchResult result = factory.searchGroups(filter);
	  while(result.hasNext()){
			String uid = (String) result.next();
			msg.reportSuccess(uid);
		//	IGroup group = factory.getGroup(uid);
                //      Store group to use later

		
		}
	  }
	  catch(Exception e){}
    //@@end
  }

This method have some issues as described [here|] but it worked well for me.

Hope this helps.

Regards,

Vishwas.

Former Member
0 Kudos

Hi Vishwas,

Thanks very much for your answers, it worked for me but I supposed you missed: IGroupFactory

Thanks very much for all your anwers.

Armando

vmadhuvarshi_
Contributor
0 Kudos

Armando,

You are right. It should have been.

IGroupFactory factory = UMFactory.getGroupFactory();

Thanks for letting me know.

Vishwas.

Answers (0)