}
}
// user sets
UserSetManager userSetManager = new UserSetManager(locale,session);
long[] sourceUserSetIds = f.getSourceUserSetIds();
if (sourceUserSetIds != null){
long[] selectedUserSetIds = f.getSelectedUserSetIds();
for (int i = 0; i < sourceUserSetIds.length; i++){
long sourceUserSetId = sourceUserSetIds[i];
UserSet sourceUserSet = userSetManager.getUserSet(sourceUserSetId);
if (sourceUserSet == null){
throw new InputException(getResources(req).getMessage(locale, "smssvc.SourceUserSetNotAvailableAnymore"),"user set #" + sourceUserSetId + " not found",null,null);
}
checkAccessRights(req,sourceUserSet.getGroup());
long selectedUserSetId = selectedUserSetIds[i];
if (selectedUserSetId >= 1){ // mapping entry => assign; no entry => create
UserSet selectedUserSet = userSetManager.getUserSet(selectedUserSetId);
if (selectedUserSet == null){
throw new InputException(getResources(req).getMessage(locale, "smssvc.SelectedUserSetNotAvaliableAnymore"),"user set #" + selectedUserSetId + " not found",null,null);
}
checkAccessRights(req,selectedUserSet.getGroup());
mappingSet.add(new Entry(sourceUserSet), new Entry(selectedUserSet));