Rev 1699 | Rev 1703 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1699 | Rev 1700 | ||
---|---|---|---|
Line 1164... | Line 1164... | ||
1164 | CourseStudiesPlan plan = DaoFactory.getCourseStudiesPlanDaoImpl().load(studiesPlanId); |
1164 | CourseStudiesPlan plan = DaoFactory.getCourseStudiesPlanDaoImpl().load(studiesPlanId); |
1165 | plan.setImportLog(plan.getImportLog() + "\n\n############\n\n##MERGING\n\n" + importer.getLog()); |
1165 | plan.setImportLog(plan.getImportLog() + "\n\n############\n\n##MERGING\n\n" + importer.getLog()); |
1166 | return importer; |
1166 | return importer; |
1167 | } |
1167 | } |
1168 | 1168 | ||
1169 | public UserRoleConfig createRoleCourseComission(long courseId,UserSession userSession) throws AccessDeniedException |
1169 | public UserRoleConfigService.ReplaceRoleResult createRoleCourseComission(long courseId,UserSession userSession) throws AccessDeniedException |
1170 | { |
1170 | { |
1171 | Course c = DaoFactory.getCourseDaoImpl().load(courseId); |
1171 | Course c = DaoFactory.getCourseDaoImpl().load(courseId); |
1172 | 1.5.0/docs/api/java/lang/String.html">String normalizedName = StringsUtils.getNormalizedNameSafeforCode(c.getName()); |
1172 | 1.5.0/docs/api/java/lang/String.html">String normalizedName = StringsUtils.getNormalizedNameSafeforCode(c.getName()); |
1173 | if(normalizedName == null) |
1173 | if(normalizedName == null) |
1174 | throw new 1.5.0/docs/api/java/lang/RuntimeException.html">RuntimeException("Erro o curso " + c.getId() +" + nao tem nome"); |
1174 | throw new 1.5.0/docs/api/java/lang/RuntimeException.html">RuntimeException("Erro o curso " + c.getId() +" + nao tem nome"); |
Line 1200... | Line 1200... | ||
1200 | { |
1200 | { |
1201 | logger.error("Tentado CRIAR um Role que já existe e não é Administrador nem Super user"); |
1201 | logger.error("Tentado CRIAR um Role que já existe e não é Administrador nem Super user"); |
1202 | throw new AccessDeniedException("Tentado CRIAR um Role que já existe e não é Administrador nem Super user"); |
1202 | throw new AccessDeniedException("Tentado CRIAR um Role que já existe e não é Administrador nem Super user"); |
1203 | } |
1203 | } |
1204 | c.setValidationRole(roleValidation); |
1204 | c.setValidationRole(roleValidation); |
1205 | return newUserRoleConfig; |
1205 | return result; |
1206 | } catch (AccessDeniedException e) { |
1206 | } catch (AccessDeniedException e) { |
1207 | logger.error("Tentado alterar um Role e não é Administrador nem Super user"); |
1207 | logger.error("Tentado alterar um Role e não é Administrador nem Super user"); |
1208 | throw e; |
1208 | throw e; |
1209 | } |
1209 | } |
1210 | } |
1210 | } |