/** * Get a list of restricted roles, taking into account the current site type * * @param siteType * the current site's type * @return a list of restricted role IDs for the given site type */ public static Set<String> getRestrictedRoles( String siteType ) { // Add all root level restricted roles Set<String> retVal = new HashSet<String>(); retVal.addAll(Arrays.asList(ArrayUtils.nullToEmpty(scs.getStrings(SAK_PROP_RESTRICTED_ROLES)))); // Add all site type specficic restricted roles if(siteType != null && !"".equals(siteType)) { retVal.addAll(Arrays.asList(ArrayUtils.nullToEmpty(scs.getStrings(SAK_PROP_RESTRICTED_ROLES + "." + siteType)))); } return retVal; }
if ((this.paramsToUseForLimit != null)) { if ((this.paramsToUseForLimit.length() > 0)) { this.paramsToCompare = Arrays.asList(ArrayUtils.nullToEmpty(StringUtils.split(this.paramsToUseForLimit)));
@Override protected Map<String, Object> configureParameters(final Component component) { final Map<String, Object> variables = super.configureParameters(component); //the url to be notified when uploading has done variables.put("fileUploadDoneUrl", settings.getUploadDoneNotificationUrl()); variables.put("selectionChangeUrl", settings.getSelectionChangeNotificationUrl()); final List<String> allowedExtensions = Arrays.asList(ArrayUtils.nullToEmpty(settings.getAllowedExtensions())); variables.put("acceptFileTypes", getAcceptFileTypesPattern("|")); // Localized error messages variables.put(MAX_NUMBER_OF_FILES_EXCEEDED_WIDGET, getMessage(MAX_NUMBER_OF_FILES_EXCEEDED_WIDGET)); final String maxFileSizeMB = String.format("%2.1fMB", Bytes.bytes(settings.getMaxFileSize()).megabytes()); variables.put(MAX_FILESIZE_MESSAGE, getMessage(MAX_FILESIZE_MESSAGE, maxFileSizeMB)); variables.put(INVALID_EXTENSION_MESSAGE, getMessage(INVALID_EXTENSION_MESSAGE, getAcceptFileTypesPattern(", "))); return variables; }
public void init() { studentAccountNotified = turnitinConn.isStudentAccountNotified(); sendSubmissionNotification = turnitinConn.getSendSubmissionNotification(); maxRetry = turnitinConn.getMaxRetry(); defaultAssignId = turnitinConn.getDefaultAssignId(); defaultClassPassword = turnitinConn.getDefaultClassPassword(); spoilEmailAddresses = serverConfigurationService.getBoolean("turnitin.spoilEmailAddresses", false); preferSystemProfileEmail = serverConfigurationService.getBoolean("turnitin.preferSystemProfileEmail", true); preferGuestEidEmail = serverConfigurationService.getBoolean("turnitin.preferGuestEidEmail", true); enabledSiteTypes = Arrays .asList(ArrayUtils.nullToEmpty(serverConfigurationService.getStrings("turnitin.sitetypes"))); log.info("init(): spoilEmailAddresses=" + spoilEmailAddresses + " preferSystemProfileEmail=" + preferSystemProfileEmail + " preferGuestEidEmail=" + preferGuestEidEmail); if (enabledSiteTypes != null && !enabledSiteTypes.isEmpty()) { log.info("Turnitin is enabled for site types: " + StringUtils.join(enabledSiteTypes, ",")); } if (!turnitinConn.isUseSourceParameter()) { if (serverConfigurationService.getBoolean("turnitin.updateAssingments", false)) doAssignments(); } }
m_ignoreExtensions = Arrays.asList(ArrayUtils.nullToEmpty(m_serverConfigurationService.getStrings("content.mimeMagic.ignorecontent.extensions"))); m_ignoreMimeTypes = Arrays.asList(ArrayUtils.nullToEmpty(m_serverConfigurationService.getStrings("content.mimeMagic.ignorecontent.mimetypes")));