/** * {@inheritDoc} */ @Override public boolean isStudentProfileEnabled() { return this.serverConfigurationService.getBoolean( "profile2.profile.student.enabled", ProfileConstants.SAKAI_PROP_PROFILE2_PROFILE_STUDENT_ENABLED); }
/** * {@inheritDoc} */ @Override public boolean isProfileImageImportEnabled() { return this.serverConfigurationService.getBoolean("profile2.import.images", ProfileConstants.SAKAI_PROP_PROFILE2_IMPORT_IMAGES_ENABLED); }
/** * Asks SCS for the value of the "content.cleaner.add.blank.target", DEFAULT is true (match legacy) * @return true if we should add ' target="_blank" ' to all A tags which contain no target, false if they should not be touched */ private boolean addBlankTargetToLinks() { boolean add = defaultAddBlankTargetToLinks; if (serverConfigurationService != null) { // this keeps the tests from dying add = serverConfigurationService.getBoolean("content.cleaner.add.blank.target", defaultAddBlankTargetToLinks); } return add; }
/** * Asks SCS for the value of the "content.cleaner.default.low.security", DEFAULT is false * @return true if low security is on be default for the scanner OR false to use high security scan (no unsafe embeds or objects) */ private boolean defaultLowSecurity() { boolean defaultLowSecurity = false; if (serverConfigurationService != null) { // this keeps the tests from dying defaultLowSecurity = serverConfigurationService.getBoolean("content.cleaner.default.low.security", defaultLowSecurity); } return defaultLowSecurity; }
/** * @return true if the session clustering is enabled */ private boolean isSessionClusteringEnabled() { boolean enabled = false; if (serverConfigurationService != null) { enabled = serverConfigurationService.getBoolean("session.cluster.replication", false); } return enabled; }
@Override public boolean allowAllContent() { // Turntin reports errors when content is submitted that it can't check originality against. So we will block unsupported content. return serverConfigurationService.getBoolean(PROP_ACCEPT_ALL_FILES, false); }
/** * Initialization */ public void init() { portalUseSectionTitle = scs.getBoolean( SAK_PROP_PORTAL_USE_SECTION_TITLE, false ); portalUseSecTitlePreferredCategory = scs.getString( SAK_PROP_PORTAL_USE_SEC_TITLE_PREFERRED_CAT, DEFAULT_PREFERRED_CAT ); }
/** * {@inheritDoc} */ @Override public boolean isPreferenceEnabledGlobally() { if (!isMenuEnabledGlobally()) { return false; } else { return this.serverConfigurationService.getBoolean("profile2.preference.enabled", ProfileConstants.SAKAI_PROP_PROFILE2_PREFERENCE_ENABLED); } }
public static boolean getBoolean(java.lang.String param0, boolean param1) { org.sakaiproject.component.api.ServerConfigurationService service = getInstance(); if (service == null) return false; return service.getBoolean(param0, param1); }
public void init() { if (serverConfigurationService.getBoolean("auto.ddl", true)) { sqlService.ddl(this.getClass().getClassLoader(), "commons_tables"); } }
public boolean isAdditionalNotesEnabled(Site site) { try { return (serverConfigurationService.getBoolean(SYSTEM_PROP_DISPLAY_ADDITIONAL_INFORMATION, false) || (site != null && Boolean.parseBoolean(site.getProperties().getProperty(SITE_PROP_DISPLAY_ADDITIONAL_INFORMATION)))); } catch(Exception e) { log.warn("Error on isAdditionalNotesEnabled (sample) ", e); } return false; }
public boolean useInstitutionalAnonymousId(Site site) { try { return (serverConfigurationService.getBoolean(SYSTEM_PROP_USE_INSTITUTIONAL_ANONYMOUS_ID, false) || (site != null && Boolean.parseBoolean(site.getProperties().getProperty(SITE_PROP_USE_INSTITUTIONAL_ANONYMOUS_ID)))); } catch(Exception e) { log.warn("Error on useInstitutionalAnonymousId (sample) ", e); } return false; }
@Override public boolean isInstitutionalNumericIdEnabled(Site site) { try { return (serverConfigurationService.getBoolean(SYSTEM_PROP_USE_INSTITUTIONAL_NUMERIC_ID, false) || (site != null && Boolean.parseBoolean(site.getProperties().getProperty(SITE_PROP_USE_INSTITUTIONAL_NUMERIC_ID)))); } catch(Exception e) { log.warn("Error on isInstitutionalNumericIdEnabled (sample) ", e); } return false; }
public boolean useInstitutionalAnonymousId(Site site) { log.debug("useInstitutionalAnonymousId from fallback provider"); try { return (serverConfigurationService.getBoolean(PROP_USE_INSTITUTIONAL_ANONYMOUS_ID, false) || (site != null && Boolean.parseBoolean(site.getProperties().getProperty(PROP_USE_INSTITUTIONAL_ANONYMOUS_ID)))); } catch(Exception ignore) {} return false; }
public boolean useInstitutionalAnonymousId(Site site) { log.debug("useInstitutionalAnonymousId from fallback provider"); try { return (serverConfigurationService.getBoolean(PROP_USE_INSTITUTIONAL_ANONYMOUS_ID, false) || (site != null && Boolean.parseBoolean(site.getProperties().getProperty(PROP_USE_INSTITUTIONAL_ANONYMOUS_ID)))); } catch(Exception ignore) {} return false; }
public void init() { if(log.isInfoEnabled()) log.info("init()"); if(scs().getBoolean("auto.ddl", true)) { sqlService().ddl(this.getClass().getClassLoader(), "sakai_cm_index"); } }
public boolean useInstitutionalAnonymousId(Site site) { try { return (serverConfigurationService.getBoolean(PROP_USE_INSTITUTIONAL_ANONYMOUS_ID, false) || (site != null && site.getProperties().getBooleanProperty(PROP_USE_INSTITUTIONAL_ANONYMOUS_ID))); } catch(Exception ignore) {} return false; }
public boolean isAdditionalNotesEnabled(Site site) { try { return (serverConfigurationService.getBoolean(PROP_DISPLAY_ADDITIONAL_INFORMATION, false) || (site != null && site.getProperties().getBooleanProperty(PROP_DISPLAY_ADDITIONAL_INFORMATION))); } catch(Exception ignore) {} return false; }
private void addStudentNumberProperty(String number, ResourceProperties userEditProperties) { String studentNumber = number; if (scs.getBoolean(AttributeMappingConstants.SYSTEM_PROP_ENCRYPT_NUMERIC_ID, true)) { studentNumber = encryption.encrypt(studentNumber, studentNumberLength); } userEditProperties.addProperty(USER_PROP_STUDENT_NUMBER, studentNumber); } }
public void init(){ serviceUrl = serverConfigurationService.getString("vericite.serviceUrl", ""); consumer = serverConfigurationService.getString("vericite.consumer", ""); consumerSecret = serverConfigurationService.getString("vericite.consumerSecret", ""); userUrlCache = memoryService.createCache("com.vericite.ContentReviewServiceVeriCite.userUrlCache", new SimpleConfiguration<>(10000, CACHE_EXPIRE_URLS_MINS * 60, -1)); contentScoreCache = memoryService.createCache("com.vericite.ContentReviewServiceVeriCite.contentScoreCache", new SimpleConfiguration<>(10000, CONTENT_SCORE_CACHE_MINS * 60, -1)); assignmentLastCheckedCache = memoryService.createCache("com.vericite.ContentReviewServiceVeriCite.assignmentLastCheckedCache", new SimpleConfiguration<>(10000, CONTENT_SCORE_CACHE_MINS * 60, -1)); assignmentTitleCache = memoryService.getCache("com.vericite.ContentReviewServiceVeriCite.assignmentTitleCache"); showPreliminary = serverConfigurationService.getBoolean("contentreview.config.show_preliminary_score", true); }