/** * 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"); }
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; } }
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; }
/** * 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()) + ">"; }
/** * @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}); } }
String skinRepo = ServerConfigurationService.getString("skin.repo"); String includeExtraHead = ServerConfigurationService.getString("portal.include.extrahead", ""); rcontext.put("includeExtraHead",includeExtraHead); String universalAnalyticsId = ServerConfigurationService.getString("portal.google.universal_analytics_id", null); if ( universalAnalyticsId != null ) { rcontext.put("googleUniversalAnalyticsId", universalAnalyticsId); rcontext.put("googleAnonymizeIp", ServerConfigurationService.getBoolean("portal.google.anonymize.ip", false)); String analyticsId = ServerConfigurationService.getString("portal.google.analytics_id", null); if ( analyticsId != null ) { rcontext.put("googleAnalyticsId", analyticsId); rcontext.put("googleAnalyticsDomain", ServerConfigurationService.getString("portal.google.analytics_domain")); rcontext.put("googleAnalyticsDetail", ServerConfigurationService.getBoolean("portal.google.analytics_detail", false)); String googleTagManagerContainerId = ServerConfigurationService.getString("portal.google.tag.manager.container_id", null); if ( googleTagManagerContainerId != null ) { rcontext.put("googleTagManagerContainerId", googleTagManagerContainerId); rcontext.put("loggedOutUrl",ServerConfigurationService.getLoggedOutUrl()); rcontext.put("portalPath",ServerConfigurationService.getPortalUrl()); rcontext.put("timeoutDialogEnabled",Boolean.valueOf(ServerConfigurationService.getBoolean("timeoutDialogEnabled", true))); rcontext.put("timeoutDialogWarningSeconds", Integer.valueOf(ServerConfigurationService.getInt("timeoutDialogWarningSeconds", 600))); String cookieNoticeText = rloader.getFormattedMessage("cookie_notice_text", ServerConfigurationService.getString("portal.cookie.policy.warning.url","/library/content/cookie_policy.html")); rcontext.put("cookieNoticeEnabled", ServerConfigurationService.getBoolean("portal.cookie.policy.warning.enabled",false));
String loginUserFirstName = null; boolean displayUserloginInfo = ServerConfigurationService. getBoolean("display.userlogin.info", true); boolean topLogin = ServerConfigurationService.getBoolean("top.login", true); boolean containerLogin = ServerConfigurationService.getBoolean("container.login", false); if (containerLogin) topLogin = false; logInOutUrl += ServerConfigurationService.getString("portalPath") + "/login"; .trimToNull(ServerConfigurationService.getString("login.url")); if (overrideLoginUrl != null) logInOutUrl = overrideLoginUrl; .getString("login.text")); if (message == null) message = rloader.getString("log.login"); .getString("login.icon")); ServerConfigurationService.getString("xlogin.enabled"))) .getString("xlogin.text")); if (message2 == null) message2 = rloader.getString("log.xlogin"); image2 = StringUtils.trimToNull(ServerConfigurationService .getString("xlogin.icon")); logInOutUrl2 = ServerConfigurationService.getString("portalPath") + "/xlogin"; logInOutUrl += ServerConfigurationService.getString("portalPath")
public boolean available(ContentEntity entity) { return ServerConfigurationService.getBoolean(ContentHostingService.RESOURCES_ZIP_ENABLE, true) || ServerConfigurationService.getBoolean(ContentHostingService.RESOURCES_ZIP_ENABLE_COMPRESS, true); } }
public String getIconUrl() { String url = ServerConfigurationService.getServerUrl() + "/library/image/silk/page_edit.png"; return url; }
/** * Returns the CDN query string or empty string (i.e. never null) */ public static String getCDNQuery() { long expire = ServerConfigurationService.getInt("portal.cdn.expire", 0); String version = ServerConfigurationService.getString("portal.cdn.version", ServerConfigurationService.getString("version.service", "0")); StringBuilder cdnQuery = new StringBuilder(); cdnQuery.append("?version=").append(version); if ( expire > 0 ) { Instant instant = Instant.now(); expire = instant.getEpochSecond() / expire; cdnQuery.append("&expire=").append(expire); } return cdnQuery.toString(); }
boolean doReplaceSiteIds = ServerConfigurationService.getBoolean("samigo.publish.update.siteids", true); if (doReplaceSiteIds == false) { return assessmentStringData; String sakaiSiteResourcePath = ServerConfigurationService.getServerUrl() + SITECONTENTPATH; int beginIndex = assessmentStringData.indexOf(sakaiSiteResourcePath);
/** * Access the partial URL that forms the root of resource URLs. * * @param relative * if true, form within the access path only (i.e. starting with /msg) * @return the partial URL that forms the root of resource URLs. */ protected String getAccessPoint(boolean relative) { return (relative ? "" : ServerConfigurationService.getAccessUrl()) + REFERENCE_ROOT; } // getAccessPoint
/********************************************************************************************************************************************************************************************************************************************************** * Init and Destroy *********************************************************************************************************************************************************************************************************************************************************/ public void init() { log.info("init()"); m_addresses.clear(); locks = new Object[nLocks]; for (int i = 0; i < nLocks; i++) locks[i] = new Object(); m_checkEvery = ServerConfigurationService.getInt("courier.maintThreadChecks", 300); m_aggressiveCleanup = ServerConfigurationService.getBoolean("courier.aggressiveCleanup", false); // start the maintenance thread scheduler = Executors.newSingleThreadScheduledExecutor(); scheduler.scheduleWithFixedDelay( this, 0, m_checkEvery, // run every TimeUnit.SECONDS ); }
ServerConfigurationService.getBoolean("portal.error.showdetail", false); String problem = throwableDisplay(t); String problemdigest = computeSha1(problem); String postAddr = ServerConfigurationService.getPortalUrl() + "/error-report"; String requestURI = req.getRequestURI();
public boolean isSecureSupported() { String portalUrl = ServerConfigurationService.getPortalUrl(); if ( portalUrl == null ) return false; if ( portalUrl.startsWith("https:") ) return true; return false; } }
public static int getMaxZipExtractFiles() { if(MAX_ZIP_EXTRACT_FILES == null){ MAX_ZIP_EXTRACT_FILES = ServerConfigurationService.getInt(org.sakaiproject.content.api.ContentHostingService.RESOURCES_ZIP_EXPAND_MAX,MAX_ZIP_EXTRACT_FILES_DEFAULT); } if (MAX_ZIP_EXTRACT_FILES <= 0) { MAX_ZIP_EXTRACT_FILES = MAX_ZIP_EXTRACT_FILES_DEFAULT; // any less than this is useless so probably a mistake log.warn("content.zip.expand.maxfiles is set to a value less than or equal to 0, defaulting to "+MAX_ZIP_EXTRACT_FILES_DEFAULT); } return MAX_ZIP_EXTRACT_FILES; }
/** * Returns the global feed generator string. * * @param siteId * The site id to get the feed description from * * @return String * The global feed generator string. */ public String getPodfeedGenerator(String siteId) { // Generator consists of 3 parts, first 2 pulled from sakai.properties: // ui.service - institution name // version.service - version number for the instance // last part is url of this instance final String localSakaiName = ServerConfigurationService.getString("ui.service","Sakai"); //localsakainame final String versionNumber = ServerConfigurationService.getString("version.service", "?");//dev final String portalUrl = ServerConfigurationService.getPortalUrl(); //last part exactly http:// final String generatorString = localSakaiName + " " + versionNumber + " " + portalUrl.substring(0, portalUrl.lastIndexOf("/")+1); return generatorString; }
String skinRepo = ServerConfigurationService.getString("skin.repo"); String includeExtraHead = ServerConfigurationService.getString("portal.include.extrahead", ""); rcontext.put("includeExtraHead",includeExtraHead); String universalAnalyticsId = ServerConfigurationService.getString("portal.google.universal_analytics_id", null); if ( universalAnalyticsId != null ) { rcontext.put("googleUniversalAnalyticsId", universalAnalyticsId); String analyticsId = ServerConfigurationService.getString("portal.google.analytics_id", null); if ( analyticsId != null ) { rcontext.put("googleAnalyticsId", analyticsId); rcontext.put("googleAnalyticsDomain", ServerConfigurationService.getString("portal.google.analytics_domain")); rcontext.put("googleAnalyticsDetail", ServerConfigurationService.getBoolean("portal.google.analytics_detail", false)); String googleTagManagerContainerId = ServerConfigurationService.getString("portal.google.tag.manager.container_id", null); if ( googleTagManagerContainerId != null ) { rcontext.put("googleTagManagerContainerId", googleTagManagerContainerId); rcontext.put("loggedOutUrl",ServerConfigurationService.getLoggedOutUrl()); rcontext.put("portalPath",ServerConfigurationService.getPortalUrl()); rcontext.put("timeoutDialogEnabled",Boolean.valueOf(ServerConfigurationService.getBoolean("timeoutDialogEnabled", true))); rcontext.put("timeoutDialogWarningSeconds", Integer.valueOf(ServerConfigurationService.getInt("timeoutDialogWarningSeconds", 600))); String cookieNoticeText = rloader.getFormattedMessage("cookie_notice_text", ServerConfigurationService.getString("portal.cookie.policy.warning.url","/library/content/cookie_policy.html")); rcontext.put("cookieNoticeEnabled", ServerConfigurationService.getBoolean("portal.cookie.policy.warning.enabled",false)); rcontext.put("cookieNoticeText", cookieNoticeText);
String loginUserFirstName = null; boolean displayUserloginInfo = ServerConfigurationService. getBoolean("display.userlogin.info", true); boolean topLogin = ServerConfigurationService.getBoolean("top.login", true); boolean containerLogin = ServerConfigurationService.getBoolean("container.login", false); if (containerLogin) topLogin = false; logInOutUrl += ServerConfigurationService.getString("portalPath") + "/login"; .trimToNull(ServerConfigurationService.getString("login.url")); if (overrideLoginUrl != null) logInOutUrl = overrideLoginUrl; .getString("login.text")); if (message == null) message = rloader.getString("log.login"); .getString("login.icon")); ServerConfigurationService.getString("xlogin.enabled"))) .getString("xlogin.text")); if (message2 == null) message2 = rloader.getString("log.xlogin"); image2 = StringUtils.trimToNull(ServerConfigurationService .getString("xlogin.icon")); logInOutUrl2 = ServerConfigurationService.getString("portalPath") + "/xlogin"; logInOutUrl += ServerConfigurationService.getString("portalPath")
public boolean isAvailable() { if (!setup) { if (!experimental) { available = true; } else if (ServerConfigurationService.getBoolean("wiki.experimental", false)) { available = true; } else { available = false; } setup = true; } return available; }