Skip to Content

Get the KM Resources of a Group using Webdynpro java

Hi Experts.

I want to display the KM Resources (fodler,sub folders, document etc...) of selected Group using Webdynpro java (NWDS 7.0.1).

First I have extracted the all Groups in table using Webdynpro java. Next I have tried to get the KM Resources using selected Group from table.

But I am getting compile time error messages

IResourceContext resourceContext = new ResourceContext(ep5Group);". The error is "The constructor ResourceContext(IGroup) is undefined"

Please help me. 

Here I have attached the coding which I had tried.


groupFact = UMFactory.getGroupFactory();

IGroupSearchFilter groupFilt = groupFact.getGroupSearchFilter();

groupFilt.setUniqueName("*", ISearchAttribute.LIKE_OPERATOR, false);

ISearchResult result = groupFact.searchGroups(groupFilt);


  if(result.getState() == ISearchResult.SEARCH_RESULT_OK) {  

   wdComponentAPI.getMessageManager().reportSuccess("result:" +result.size());

   while(result.hasNext()) {

    String uniqId = (String);

    IGroup thisGroup = groupFact.getGroup(uniqId);
 ep5Group  = null;

    ep5Group = (;    

    IResourceContext context = new ResourceContext(ep5Group);   

    RID rid = RID.getRID("/documents/CCElectronics Content/Folder View/");

    IResource resource = ResourceFactory.getInstance().getResource(rid, context);

    if(resource.isCollection() == true) {

          ICollection collection = (ICollection)resource;

          IResourceList resourceList = collection.getChildren();


          if(resourceList.size()>0) {

                IResourceListIterator resourceListIterator = resourceList.listIterator();

                for(IResourceListIterator itr = collection.getChildren().listIterator(); itr.hasNext();) {

                      IResource res = (IResource);

                      wdComponentAPI.getMessageManager().reportSuccess("KM Content1:" + res.getDisplayName());

                      wdComponentAPI.getMessageManager().reportSuccess("KM Content2:" + res.getDisplayName(true));      







} catch (Exception e) {

  // TODO Auto-generated catch block





Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Sep 25, 2013 at 09:13 AM


    ResourceContext is defined for Iuser inly, not iGroup

    IResourceContext resourceContext = new ResourceContext(ep5Group);

    this will not work, you should use

    ResourceContext getInstance( user, Locale fallbackLocale)

    Hope this helps!!


    Vijay Kalluri

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 10, 2013 at 07:21 AM


    Add comment
    10|10000 characters needed characters exceeded