Skip to Content

KM API : com.sapportals.portal.security.usermanagement.IUser is deprecated

Hi,

I am using KM api to create a resource of type external link in Portal KM folder.

This is part of code I am using to get ResourceContext and Collection

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

IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
com.sap.security.api.IUser sapIUser = wdClientUser.getSAPUser();
com.sapportals.portal.security.usermanagement.IUser ep5User = WPUMFactory.getUserFactory().getEP5User(sapIUser);
IResourceContext resourceContext = new ResourceContext(ep5User);

collection = (ICollection)resourceFactory.getResource(pathRID, resourceContext);

Here, its showing this com.sapportals.portal.security.usermanagement.IUser as deprecated.

Can anybody tell me alternate way to get this?

Thanks and regards,

Amey Mogare

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 24, 2009 at 06:57 AM

    Hi Amey,

    You can user com.sap.security.api.IUser API.

    Regards,

    Deepti

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Deepti,

      Yes, I tried using that.. But when I get IUser from com.sap.security.api.IUser API, it doesn't match with the new ResourceContext(IUser) constructor.

      //at this line --> 
      //Compilation error
      IResourceContext resourceContext = new ResourceContext(ep5User);
      

      Thanks and regards,

      Amey Mogare

  • Mar 18, 2010 at 12:45 PM

    There's nothing we can do here. IUser deprecated warning still remains!

    Add comment
    10|10000 characters needed characters exceeded