Skip to Content
0
Former Member
Nov 29, 2007 at 03:00 PM

ResourceContext(IUser) constructor is undefined,problem of Deprecated IUser

38 Views

Hi Experts,

I have created an IUser as follows:

com.sap.security.api.IUser user = UMFactory.getUserFactory().getUserByLogonID("Kmuser");

now i m using this user into the following:

IResourceContext resourceContext = new ResourceContext(user);

For this i m getting a compiler error that constructor for ResourceContext(user) doesnt exist.

I did explored and studied about the IUser then i came to know that thare are two types of IUser one is com.sapportals.wcm.util.usermanagement.IUser which is deprecated and the newer one is com.sap.security.api.IUser.

ResourceContext class has all the constructor which takes only the deprecated IUser.

So does SAP APIs provides any other ResourceContext class which Works well with com.sap.security.api.IUser?????

Or is there any way to cast com.sap.security.api.IUser to com.sapportals.wcm.util.usermanagement.IUser????

Please help me out

Help will be appreciated and rewarded