/** * @param id * id of the resource to set the UUID for * @param uuid * the new UUID of the resource * @throws IdInvalidException * if the given resource already has a UUID set */ public void setUuid(String id, String uuid) throws IdInvalidException { String existingUuid = findUuid(id); if (existingUuid != null) { throw new IdInvalidException(id); } setUuidInternal(id, uuid); }
log.error(e.getMessage(), e); } catch (PermissionException e) { log.error(e.getMessage(), e);
/** * {@inheritDoc} */ @Override public Site addSite(final String id, final String type) { Site site = null; try { site = this.siteService.addSite(id, type); } catch (final IdInvalidException e) { e.printStackTrace(); } catch (final IdUsedException e) { e.printStackTrace(); } catch (final PermissionException e) { e.printStackTrace(); } return site; }
log.warn("ResourcesHandler.addContentResource IdUsedException: {}", e.toString()); } catch (IdInvalidException e) { log.error(e.getMessage(), e); } catch (InconsistentException e) { log.error(e.getMessage(), e);
throw new IdInvalidException(""); throw new IdInvalidException(id);
ToolManager.getTool("sakai.samigo").getTitle(), mimeType, content, props); } catch (IdInvalidException e) { log.error("IdInvalidException:" + e.getMessage()); } catch (PermissionException e) { log.error("PermissionException:" + e.getMessage());
if (!Validator.checkResourceId(submissionFromXml.getId())) throw new IdInvalidException(submissionFromXml.getId());
ToolManager.getTool("sakai.samigo").getTitle(), mimeType, content, props); } catch (IdInvalidException e) { log.error("IdInvalidException:" + e.getMessage()); } catch (PermissionException e) { log.error("PermissionException:" + e.getMessage());
if (!m_entityManager.checkReference(ref)) throw new IdInvalidException(ref);
/** * {@inheritDoc} */ public Calendar getCalendarById(String calendarId) throws PermissionException { Calendar calendar = null; try { calendar = calendarService.getCalendar(calendarId); } catch (IdUnusedException e) { try { CalendarEdit calendarEdit = calendarService.addCalendar(calendarId); calendarService.commitCalendar(calendarEdit); calendar = getCalendarById(calendarId); } catch (IdInvalidException highlyUnlikely) { log.error(highlyUnlikely.getMessage()); } catch (IdUsedException extremelyUnlikely) { log.error(extremelyUnlikely.getMessage()); } } return calendar; }
if (!m_entityManager.checkReference(ref)) throw new IdInvalidException(ref);
log.warn("ResourcesHandler.addContentResource IdUsedException: {}", e.toString()); } catch (IdInvalidException e) { log.error(e.getMessage(), e); } catch (InconsistentException e) { log.error(e.getMessage(), e);
throw new IdInvalidException("Id " + id + " is not a valid id format"); throw new IdInvalidException("Type " + type + " is not a valid type format");
log.error(e.getMessage(), e); } catch (PermissionException e) { log.error(e.getMessage(), e);
if (!m_entityManager.checkReference(ref)) throw new IdInvalidException(ref);
throw new IdInvalidException(alias);
if (!Validator.checkResourceId(assignmentFromXml.getId())) throw new IdInvalidException(assignmentFromXml.getId());
if (!Validator.checkResourceId(contentFromXml.getId())) throw new IdInvalidException(contentFromXml.getId());
throw new IdInvalidException("Id " + id + " is not valid");