addUserRole(userId, app, rm);
}
@Override
public void addUserRole(String userId, IApplicationMetaInfo application, IRoleInstanceMetaInfo rm) throws DataModelException {
IUserRole role = userRoleDao.findRole(userId, application.getId(), rm.getId());
if (role != null) {
throw new DataModelException("Role is already assigned"); //$NON-NLS-1$
}
UserRole ur = new UserRole();
ur.setRoleInstanceMetaInfo(rm);