cancel
Showing results for 
Search instead for 
Did you mean: 

How to achieve mass user mapping

Former Member
0 Kudos

do we have any programs for mass user mapping

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Ganesh,

to acheive mass user mapping, assign all the users to a group and do the usermapping for this group.

Gopi

Former Member
0 Kudos

could you be more descrptive am not able to get it as i am new to Portals.

Former Member
0 Kudos

Hi Ganesh,

In portal u can not map user-id against Group(i.e. collection of users)

So one way is that,

1. Create a group of users having same backend user-id

2. In program get all the users which are under that group(using UME api)

3. Map the required user-id and password against each group member(as given by Santhosh)

With Regards,

Amol

Former Member
0 Kudos

Hi Ganesh,

You just need to create an abstract portal component.

I am providing the code in this post to retrieve all users from the group..The <b>vector users</b> contain all the users of ur group name.

Also combine the code of user mapping service in my previous post with the folloing code


IGroupFactory gFact = UMFactory.getGroupFactory();
IGroupSearchFilter gsf = gFact.getGroupSearchFilter();
gsf.setDisplayName("you group name",ISearchAttribute.EQUALS_OPERATOR,false);
ISearchResult sr = gFact.searchGroups(gsf);
if (sr != null)
{
String uniqueId = (String) sr.next();
IGroup grp = gFact.getMutableGroup(uniqueId);

Iterator it = grp.getUserMembers(false);

Vector users = new Vector();
IUserFactory userFact = UMFactory.getUserFactory();
while (it.hasNext()) 
{
	String userName = (String) it.next();
	IUser usr = null;
	usr = userFact.getUser(userName);				 
	users.addElement(usr);
}
}

Former Member
0 Kudos

Hi Ganesh,

You can use Usermanagement API to update the user mapping data.Following is the code,which uses UserMaping Service and updates the user mapping data.Hope this might be helpful..In portalapp.xml you need to give reference to User management and user mapping services

IUserMappingService iums = (IUserMappingService)
 PortalRuntime.getRuntimeResources().getService(IUserMappingService.KEY);
  IUserMappingData iumd = iums.getMappingData (systemalias, iuser); 
   Map map = new HashMap (); 
   try { 
      iumd.enrich (map); 
  map.put(“user”,”new user name”);
  map.put(“mappedpassword”,”new password”);
iumd.storeLogonData(map);//This saves the new user and //password to that system
} 
     catch (NoLogonDataAvailableException nldae)   {   
   // Error handling 
   }

Rgds,

Santhosh