public String getCurrentUserId() { return developerHelperService.getCurrentUserId(); }
/** * Methods */ public String getCurrentLocationId() { return developerHelperService.getCurrentLocationId(); }
public String getCurrentLocationReference() { log.debug("getCurrentLocationReference"); return developerHelperService.getCurrentLocationReference(); }
public String exportData(String reference, Search search, OutputStream data, boolean destructive, Map<String, Object> params) { LOG.info("exportData(): reference="+reference+", destructive="+destructive); if(M_dhs.entityExists(reference)) { //String destSiteId = M_dhs.getLocationIdFromRef(reference); String exportInfo = IMPORTEXPORT_DEFAULT_ENCODING + "|" + IMPORTEXPORT_CURRENT_VERSION; List<ReportDef> list = M_rm.getReportDefinitions(M_dhs.getCurrentLocationId(), false, true); if(list != null && !list.isEmpty()) { try{ String xml = DigesterUtil.convertReportDefsToXml(list); data.write(xml.getBytes(IMPORTEXPORT_DEFAULT_ENCODING)); if(destructive) { for(ReportDef rd : list) { M_rm.removeReportDefinition(rd); } } return exportInfo; }catch(Exception e){ LOG.error("Unable to export SiteStats reports", e); } } } return null; }
public String getCurrentuserReference() { return developerHelperService.getCurrentUserReference(); }
buffer.append(rb.getString("noti.site.url") + " <a href=\""+ siteUrl+ "\">" + siteUrl + "</a>"+ newline); String linkToToolInSite = "<a href=\"" + developerHelperService.getToolViewURL( "sakai.assignment.grades", null, null, null ) + "\">" + siteTitle + "</a>"; buffer.append(rb.getFormattedMessage("noti.releasegrade.text", new String[]{a.getTitle(), linkToToolInSite}));
public boolean isUserAdmin(String userId) { return developerHelperService.isUserAdmin(USER_ENTITY_PREFIX + userId); }
user = userDirectoryService.getUserByEid(userEid); replacementValues.put("localSakaiName", developerHelperService.getConfigurationSetting("ui.service", "Sakai")); replacementValues.put("recipientFirstName",user.getFirstName()); replacementValues.put("recipientDisplayName", user.getDisplayName());
while (itg.hasNext()) { String groupRef = itg.next(); String siteId = developerHelperService.getLocationIdFromRef(groupRef); try { Site s = siteService.getSite(siteId);
public String[] importData(String reference, InputStream data, String encodingKey, Map<String, Object> params) { LOG.info("importData(): reference="+reference+", encodingKey="+encodingKey+", params="+params); String[] imported = new String[0]; if(M_dhs.entityExists(reference)) { //String srcSiteId = M_dhs.getLocationIdFromRef(reference); String[] importInfo = encodingKey.split("\\|"); try{ byte[] bytes = new byte[data.available()]; data.read(bytes); List<ReportDef> list = DigesterUtil.convertXmlToReportDefs(new String(bytes, importInfo[0])); String thisSiteId = M_dhs.getCurrentLocationId(); for(ReportDef rf : list) { rf.setId(0); rf.setSiteId(thisSiteId); rf.getReportParams().setSiteId(thisSiteId); M_rm.saveReportDefinition(rf); } }catch(Exception e){ LOG.error("Unable to import SiteStats reports", e); } } return imported; }
public boolean isAllowedInLocation(String permission, String locationReference) { log.debug("isAllowed in location( " + permission + " , " + locationReference); return isAllowedInLocation(permission, locationReference, developerHelperService.getCurrentUserReference()); }
String linkToToolInSite = "<a href=\"" + developerHelperService.getToolViewURL( "sakai.assignment.grades", null, null, null ) + "\">" + siteTitle + "</a>"; if (canSubmit(context,a,userId)) { buffer.append(rb.getFormattedMessage("noti.releaseresubmission.text", new String[]{a.getTitle(), linkToToolInSite}));
private String getCheckedCurrentUser() throws SecurityException { String currentUserId = developerHelperService.getCurrentUserId(); if (StringUtils.isBlank(currentUserId)) { throw new SecurityException("You must be logged in to use this service"); } else { return currentUserId; } }
public boolean userIsViewingAsRole() { String effectiveRole = securityService.getUserEffectiveRole(developerHelperService.getCurrentLocationReference()); if (effectiveRole != null) return true; return false; }
private String getCheckedCurrentUser() throws SecurityException { String currentUserId = developerHelperService.getCurrentUserId(); if (StringUtils.isBlank(currentUserId)) { throw new SecurityException("You must be logged in to use this service"); } else { return currentUserId; } }
userId = developerHelperService.getCurrentUserId();
userId = developerHelperService.getCurrentUserId();