cancel
Showing results for 
Search instead for 
Did you mean: 

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

Amey-Mogare
Contributor
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Amey-Mogare
Contributor
0 Kudos

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

DeeptiChavare
Active Participant
0 Kudos

Hi Amey,

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

Regards,

Deepti

Amey-Mogare
Contributor
0 Kudos

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