cancel
Showing results for 
Search instead for 
Did you mean: 

The type IUser is deprecated

govardan_raj
Contributor
0 Kudos

Hi experts,

In the below method the Iuser is deprecated in nwds 7.31 sp 12 , do we have any other aleternative for this , im using the below code to read data from KM

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

try 

{

epUser = WPUMFactory.getUserFactory().getEP5User(sapUser);

}

catch(Exception e)

{

}

Regards

Govardan

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi,

Please use IUserFactory API where in you can use the method:getLogonByUserId().Also there are additional methods of IUserAccount as well.

Do try and let me know.

Regards,

Nimisha

govardan_raj
Contributor
0 Kudos

Hi ,

IuserFactory and other api were already tried , Still it gives error.

Regards

Govardan

Sharathmg
Active Contributor
0 Kudos

Do not use the method getEP5User.

Try to use get User by Login ID.

Regards,

Sharath

govardan_raj
Contributor
0 Kudos

Hi sharath ,

As specified earlier ,

   

IResourceContext resourceContext = new ResourceContext(epUser);

will give error when we use User from Login ID 

Regards

Sharathmg
Active Contributor
0 Kudos

Try to check for the Jar which provides the IUser for you. IUser in the older may be deprecated and to resolve, you may have to use the new Jar for 7.3 under JDK6.

For example: For IRole, you need to replace com.sapportals.portal.security.usermanagement.IRoleFactory with com.sap.security.api.IRoleFactory and import com.sap.security.api.IRoleFactory instead of com.sapportals.portal.security.usermanagement.IRole. while migrating the Portal applications from 7.0x to 7.3

Try to look up for something similar for IUser.

Hopefully it should solve your issue.

Regards,

Sharath

govardan_raj
Contributor
0 Kudos

hi Sharath ,

Im currently working on that but could not find the jar file still , ill let you know if it is solved .

Regards

Govardan

Former Member
0 Kudos

Hi Giovardan,

You can try com.sap.security.api.IUserAccountFactory api, then get user by logon ID.

http://help.sap.com/javadocs/nwce/ce71/se/SP5/com/sap/security/api/IUserAccountFactory.html

Regards,

Nikhil

govardan_raj
Contributor
0 Kudos

hi Nikhil ,

It is not getting the login id , in the above code we have to get the Iuser , and based on this resource context etc is depended which we use for KM content read etc..

Regards

Govardan

Former Member
0 Kudos

Hi,

tyr using

IUserContext userContext = request.getUser();

String usr =userContext.getLogonUid();

Or if this does not help then please explain in details what excatly is the requirement.