/** * Get the file browser that should be used when picking a file in CKEditor. * @return The file browser, i.e. fckeditor, elfinder */ public static String getCKEditorFileBrowser() { return ServerConfigurationService.getString("wysiwyg.editor.ckeditor.browser", "elfinder"); }
/** * Access the identifier for the editor currently in use. This value is * supplied by the ServerConfigurationService and uniquely identifies a * particular editor supported by Sakai. * @return The unique identifier for the editor as specified in * "sakai.properties". */ public static String getWysiwigEditor() { return ServerConfigurationService.getString("wysiwyg.editor"); }
/** * Returns a URL for the tool_base.css suitable for putting in an href= field. * * @return <code>cssToolBase</code> URL for the tool_base.css */ public static String getCssToolBase() { String skinRepo = ServerConfigurationService.getString("skin.repo"); String cssToolBase = skinRepo + "/tool_base.css"; return cssToolBase; }
/** * Returns the CDN Path or empty string (i.e. never null) */ public static String getCDNPath() { return ServerConfigurationService.getString("portal.cdn.path", ""); }
/** * Get the user agent to use for web requests. */ protected String getUserAgent() { return "Sakai/"+ ServerConfigurationService.getString("version.sakai")+ " ("+ TOOL_ID+ ")"; } }
public String getString(String key, String defaultValue){ return (ServerConfigurationService.getString(key, defaultValue)); } }
/** * Format a from address from the service, no reply. * * @return a from address from the service, no reply. */ protected String getFromService() { return "\"" + ServerConfigurationService.getString("ui.service", "Sakai") + "\" <"+ ServerConfigurationService.getString("setup.request","no-reply@"+ ServerConfigurationService.getServerName()) + ">"; }
public boolean doGatewaySiteList() { String gatewaySiteListPref = ServerConfigurationService .getString("gatewaySiteList"); if (gatewaySiteListPref == null) return false; return (gatewaySiteListPref.trim().length() > 0); }
public int compareTo(CategoryBean cb) {; if (!"".equals(ServerConfigurationService.getString("help.location"))){ return id.compareTo(cb.id); } else{ return name.compareTo(cb.name); } } }
public static String getOurServerUrl() { String ourUrl = ServerConfigurationService.getString("sakai.lti.serverUrl"); if (ourUrl == null || ourUrl.equals("")) ourUrl = ServerConfigurationService.getString("serverUrl"); if (ourUrl == null || ourUrl.equals("")) ourUrl = ServerConfigurationService.getServerUrl(); if (ourUrl == null || ourUrl.equals("")) ourUrl = "http://127.0.0.1:8080"; if ( ourUrl.endsWith("/") && ourUrl.length() > 2 ) ourUrl = ourUrl.substring(0,ourUrl.length()-1); return ourUrl; }
public static String getIssuer(String site_id) { String retval = getOurServerUrl(); String deployment_id = ServerConfigurationService.getString(LTI13_DEPLOYMENT_ID, LTI13_DEPLOYMENT_ID_DEFAULT); if ( ! LTI13_DEPLOYMENT_ID_DEFAULT.equals(deployment_id) ) { retval += "/deployment/" + deployment_id; } if ( StringUtils.isNotEmpty(site_id) ) { retval = retval + "/site/" + site_id; } return retval; }
public static String getSubject(String user_id) { String retval = getOurServerUrl(); String deployment_id = ServerConfigurationService.getString(LTI13_DEPLOYMENT_ID, LTI13_DEPLOYMENT_ID_DEFAULT); if ( ! LTI13_DEPLOYMENT_ID_DEFAULT.equals(deployment_id) ) { retval += "/deployment/" + deployment_id; } retval = retval + "/user/" + user_id; return retval; }
public void init() { String classBean = ServerConfigurationService.getString("profile.manager.integration.bean", "org.sakaiproject.api.app.profile.LegacyProfileManager"); if (profileManagerImplementation == null) { profileManagerImplementation = (ProfileManager) ComponentManager.get(classBean); } }
public static String encryptSecret(String orig) { if ( orig == null || orig.trim().length() < 1 ) return orig; String encryptionKey = ServerConfigurationService.getString(BASICLTI_ENCRYPTION_KEY, null); if ( encryptionKey == null ) return orig; // May throw runtime exception - just let it log as this is abnormal... String newsecret = SimpleEncryption.encrypt(encryptionKey, orig); return newsecret; }
public void forwardPortal(ActiveTool tool, HttpServletRequest req, HttpServletResponse res, ToolConfiguration p, String skin, String toolContextPath, String toolPathInfo) throws ToolException, IOException { String portalPath = ServerConfigurationService.getString("portalPath", "/portal"); // if there is a stored request state, and path, extract that from the // session and reinstance it // generate the forward to the tool page placement String portalPlacementUrl = portalPath + getPortalPageUrl(p) + "?" + req.getQueryString(); res.sendRedirect(portalPlacementUrl); return; }
public DateFormat getDefaultDateFormat() { String defaultFormat = ServerConfigurationService.getString("dateWidget.defaultFormat"); if ("dd/MM/yyyy".equals(defaultFormat)) { return DD_MM_YYYY(); } return MM_DD_YYYY(); }
public boolean getAutoDdl() { boolean autoDdl = false; if(ServerConfigurationService.getString("sitestats.db", "internal").equals("internal")) { autoDdl = ServerConfigurationService.getBoolean("auto.ddl", true); }else{ autoDdl = ServerConfigurationService.getBoolean("sitestats.externalDb.auto.ddl", true); } return autoDdl; } }
/** * @inheritDoc */ protected String getTag(String title, boolean shouldUseHtml) { if (shouldUseHtml) { return rb.getFormattedMessage("noti.tag.html", new Object[]{ServerConfigurationService.getString("ui.service", "Sakai"), ServerConfigurationService.getPortalUrl(), title}); } else { return rb.getFormattedMessage("noti.tag", new Object[]{ServerConfigurationService.getString("ui.service", "Sakai"), ServerConfigurationService.getPortalUrl(), title}); } }