public static void save(org.sakaiproject.site.api.Site param0) throws org.sakaiproject.exception.IdUnusedException, org.sakaiproject.exception.PermissionException { org.sakaiproject.site.api.SiteService service = getInstance(); if (service == null) return; service.save(param0); }
public static void save(org.sakaiproject.site.api.Site param0) throws org.sakaiproject.exception.IdUnusedException, org.sakaiproject.exception.PermissionException { org.sakaiproject.site.api.SiteService service = getInstance(); if (service == null) return; service.save(param0); }
/** * {@inheritDoc} */ @Override public boolean saveSite(final Site site) { try { this.siteService.save(site); } catch (final IdUnusedException e) { e.printStackTrace(); return false; } catch (final PermissionException e) { e.printStackTrace(); return false; } return true; }
m_siteService.save(edit);
siteService.save(site);
siteService.save(site);
siteService.save(site);
siteService.save(site); saved = true; } catch (IdUnusedException e) {
siteService.save(site); changed = true;
m_siteService.save(toSite);
m_siteService.save(toSite);
siteService.save(site);
siteService.save(site); saved = true; } catch (IdUnusedException e) {
siteProperties.addProperty(SITE_PROPERTY_COURSE_SITE_PUBLISHED, "set"); site.setPublished(true); siteService.save(site); numSitesPublished++;
String tool_id = (String) payload.get("tool_id"); try { siteService.save(site); M_log.info("Site saved role=" + newRole + " user="+ user.getId() + " site=" + site.getId());
site.removePage(page); try { siteService.save(site); } catch (Exception e) { return rb.getString("error.placement.not.removed");
protected boolean updateSite(JobExecutionContext context, Site site) throws JobExecutionException { // The toolId we are wanting to add to the site. String toolId = context.getMergedJobDataMap().getString("tool"); if (toolId == null || toolId.isEmpty()) { throw new JobExecutionException("tool isn't set in job data."); } Tool tool = toolManager.getTool(toolId); if (tool == null) { throw new JobExecutionException("Failed to find tool with id: "+ toolId); } ToolConfiguration toolConfiguration = site.getToolForCommonId(toolId); if (toolConfiguration == null) { // Add the tool to the site. SitePage page = site.addPage(); page.setTitle(tool.getTitle()); page.addTool(tool); try { siteService.save(site); return true; } catch (IdUnusedException|PermissionException e) { log.warn("Failed to save site: "+ site.getId(), e); } } else { log.debug(String.format("Site: %s already has tool: %s on page: %s", site.getId(), toolId, toolConfiguration.getContainingPage().getId())); } return false; }
protected boolean updateSite(JobExecutionContext context, Site site) throws JobExecutionException { // The toolId we are wanting to add to the site. String toolId = context.getMergedJobDataMap().getString("tool"); if (toolId == null || toolId.isEmpty()) { throw new JobExecutionException("tool isn't set in job data."); } Tool tool = toolManager.getTool(toolId); if (tool == null) { throw new JobExecutionException("Failed to find tool with id: "+ toolId); } ToolConfiguration toolConfiguration = site.getToolForCommonId(toolId); if (toolConfiguration == null) { // Add the tool to the site. SitePage page = site.addPage(); page.setTitle(tool.getTitle()); page.addTool(tool); try { siteService.save(site); return true; } catch (IdUnusedException|PermissionException e) { log.warn("Failed to save site: "+ site.getId(), e); } } else { log.debug(String.format("Site: %s already has tool: %s on page: %s", site.getId(), toolId, toolConfiguration.getContainingPage().getId())); } return false; }
page.addTool("sakai.resources"); siteService.save(adminSite); m_log.debug("init() site " + this.m_adminSiteName + " has been created");
siteService.save(site);