Currently Being Moderated

Hello Experts,

 

I have developed a Web Dynpro Java application in NWDS 7.0.1 to connect KM repository.

For importing external jars I have created External Library DC and added the below jars to the public part (Assembly and Compilation)

  • bc.rf.framework_api.jar
  • bc.rf.global.service.urlgenerator_api.jar
  • bc.sf.framework_api.jar
  • bc.util.public_api.jar
  • com.sap.security.api.ep5.jar
  • com.sap.security.api.ep.jar
  • prtapi.jar

After adding assembly public part to the deployable unit of the External Library DC, the deployable unit has been added successfully to the WD application as a used dc. Library and sharing references have been added. WD dc built successfully but for implementation I cannot import the following:

 

import com.sapportals.portal.security.usermanagement.IUserFactory;

import com.sapportals.wcm.repository.ICollection;

import com.sapportals.wcm.repository.IResource;

import com.sapportals.wcm.repository.IResourceContext;

import com.sapportals.wcm.repository.IResourceFactory;

import com.sapportals.wcm.repository.IResourceList;

import com.sapportals.wcm.repository.IResourceListIterator;

import com.sapportals.wcm.repository.ResourceContext;

import com.sapportals.wcm.util.uri.RID;

import com.sapportals.wcm.util.usermanagement.WPUMFactory;

 

I am using the below code for my application:

 

 

 

          IWDClientUser currentWDUser = null;

          currentWDUser = WDClientUser.getCurrentUser();

 

 

          com.sapportals.portal.security.usermanagement.IUser ep5User = null;

          com.sap.security.api.IUser user = currentWDUser.getSAPUser();

 

 

                    IUserFactory portalUserFactory = WPUMFactory.getUserFactory();

                    ep5User = portalUserFactory.getEP5User(user);

                    IResourceContext context = new ResourceContext(ep5User);

                    String resourceID = wdContext.currentContextElement().getConditionOfSupplyFolder();

                    IResourceFactory resourceFactory = com.sapportals.wcm.repository.ResourceFactory.getInstance();

                    RID rid = RID.getRID(resourceID);

                    ICollection collection = (ICollection)resourceFactory.getResource(rid,context);

                    IResourceList resourceList = collection.getChildren();

                    IResourceListIterator resourceListIterator = resourceList.listIterator();

                    wdContext.nodeKMContent().invalidate();

                    while (resourceListIterator.hasNext()) {

                              IPublicPspclDocsComp.IKMContentElement contentElem = null;

                              contentElem = wdContext.nodeKMContent().createKMContentElement();

 

                              com.sapportals.wcm.repository.IResource tempResource = resourceListIterator.next();

 

                              contentElem.setConditionOfSupply(tempResource.getName());

 

 

                              wdContext.nodeKMContent().addElement(contentElem);

 

 

                    }

                    if(wdContext.nodeKMContent().size()<6){

                              wdContext.currentContextElement().setLineItem(wdContext.nodeKMContent().size());

                    }else{

                              wdContext.currentContextElement().setLineItem(5);

                    }

 

 

Any help you can provide on this problem is very much appreciated.

 

 

Thanks in advance

Ghanshyam.

Comments

Filter Blog

By author: By date:
By tag: