Returns the skin mapping from the Jawr config, here the resource mapping
type is locale_skin

@param rsBrowser
the resource browser
@param config
the jawr config
@param skinMapping
the skin mapping
@param skinRootDirectories
the skin root directories
766681
private void updateSkinMappingUsingTypeLocaleSkin(ResourceBrowser rsBrowser, JawrConfig config,
			Map<String, Map<String, VariantSet>> skinMapping, Set<String> skinRootDirectories) {

		String defaultSkinName = null;
		String defaultLocaleName = null;

		// Check if there are no directory which is contained in another root
		// directory
		for (Iterator<String> itRootDir = skinRootDirectories.iterator(); itRootDir.hasNext();) {
			String defaultLocaleDir = PathNormalizer.asDirPath(itRootDir.next());
			String defaultLocaleDirName = PathNormalizer.getPathName(defaultLocaleDir);
			String localeRootDir = PathNormalizer.getParentPath(defaultLocaleDir);

			String skinName = null;
			String localeName = null;

			if (!LocaleUtils.LOCALE_SUFFIXES.contains(defaultLocaleDirName)) { // The
																				// rootDir
																				// point
																				// to
																				// a
																				// skin
																				// directory
				skinName = defaultLocaleDirName;
				localeName = PathNormalizer.getPathName(localeRootDir);
				localeRootDir = PathNormalizer.getParentPath(localeRootDir);

			} else {
				localeName = defaultLocaleDirName;
			}

			if (defaultSkinName == null) {
				defaultSkinName = skinName;
			} else if (!defaultSkinName.equals(skinName)) {
				throw new BundlingProcessException(
						"The default skin for the skin root directories are not the same. Please check your configuration.");
			}

			if (defaultLocaleName == null) {
				defaultLocaleName = localeName;
			} else if (!defaultLocaleName.equals(localeName)) {
				throw new BundlingProcessException(
						"The default locale for the skin root directories are not the same. Please check your configuration.");
			}

			checkRootDirectoryNotOverlap(defaultLocaleDir, skinRootDirectories);

			Map<String, VariantSet> variantsMap = getVariants(rsBrowser, localeRootDir, skinName, localeName, false);

			skinMapping.put(localeRootDir, variantsMap);
		}

		CssSkinVariantResolver skinResolver = (CssSkinVariantResolver) config.getGeneratorRegistry()
				.getVariantResolver(JawrConstant.SKIN_VARIANT_TYPE);
		if (skinResolver == null) {
			skinResolver = new CssSkinVariantResolver(defaultSkinName, config.getSkinCookieName());
			config.getGeneratorRegistry().registerVariantResolver(skinResolver);
		} else {
			skinResolver.setDefaultSkin(defaultSkinName);
			skinResolver.setSkinCookieName(config.getSkinCookieName());
		}

	}
15896
public synchronized void removeSSLConfigFromMap(String alias, SSLConfig sslConfig) throws Exception {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "removeSSLConfigFromMap", new Object[] { alias });

        sslConfigMap.remove(alias);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "removeSSLConfigFromMap");
    }
797422
@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map getMap(NodeConfig nodeConfig) {
		Map map = new HashMap();
		List<AttributeConfig> attributes = nodeConfig.getAttribute();
		map.putAll(getAttribute(attributes));

		List<NodeConfig> childrenNodes = nodeConfig.getChildrenNodes();
		if (childrenNodes != null && childrenNodes.size() > 0) {
			for (NodeConfig childNode : childrenNodes) {
				String name = childNode.getName();
				Object value = childNode.getValue();

				if (childNode.hasChildren()) {
					Map childNodeMap = getMap(childNode);
					map.put(name, addToList(map.get(name), childNodeMap));
				} else {
					if (childNode.hasAttributes()) {
						Map attributeMap = new HashMap();
						attributeMap = getAttribute(childNode.getAttribute());
						if (attributeMap.size() > 0) {
							if (value != null && value instanceof String) {
								attributeMap.put("nodeValue", value);
							}
							value = attributeMap;
						}
					}
				}

				if (value != null) {
					map.put(name, addToList(map.get(name), value));
				}
			}
		}
		if (nodeConfig.getName() != null && nodeConfig.getValue() != null) {
			map.put(nodeConfig.getName(), nodeConfig.getValue());
		}
		return map;
	}
938894
public static function config($skin, $colour)
    {
        if (!empty($skin) && !empty($colour)) {
            if (!env('APP_CDN', true)) {
                FrontendAsset::add('vendor/icheck/'.$skin.'/'.$colour.'.css');
            } else {
                $version = FrontendAsset::version(class_basename(__CLASS__));
                FrontendAsset::add('https://cdnjs.cloudflare.com/ajax/libs/iCheck/'.$version.'/skins/'.$skin.'/'.$colour.'.css');
            }
        }
    }
1239642
@Override
	public synchronized void configLoaded(IConfig config, long sequence) {
		String previousRawConfig = rawConfig;
		rawConfig = config.toString();

		if (previousRawConfig == null || !previousRawConfig.equals(rawConfig)) {
			processDeps(validate, false, sequence);
			validate = false;
		}
	}
231025
function SiteBuilder(config, fileMap) {
  this.config = config;
  this.root = config.root;

  var helperFile = path.join(this.root, '_lib', 'helpers.js');
  if (existsSync(helperFile)) {
    userHelpers = require(helperFile);
  }

  var filterFile = path.join(this.root, '_lib', 'filters.js');
  if (existsSync(filterFile)) {
    userFilters = require(filterFile);
  }

  var postFilterFile = path.join(this.root, '_lib', 'post-filters.js');
  if (existsSync(postFilterFile)) {
    userPostFilters = require(postFilterFile);
  }

  this.outputRoot = config.output;
  this.fileMap = fileMap;
  this.posts = [];
  this.helpers = helpers;
  this.events = new EventEmitter();
  this.includes = {};

  this.loadPlugins();
}
650189
public static void configureTls(ServerBuilder sb, Ssl ssl,
                                    @Nullable Supplier<KeyStore> keyStoreSupplier,
                                    @Nullable Supplier<KeyStore> trustStoreSupplier) {
        if (!ssl.isEnabled()) {
            return;
        }
        try {
            if (keyStoreSupplier == null && trustStoreSupplier == null &&
                ssl.getKeyStore() == null && ssl.getTrustStore() == null) {
                logger.warn("Configuring TLS with a self-signed certificate " +
                            "because no key or trust store was specified");
                sb.tlsSelfSigned();
                return;
            }

            final KeyManagerFactory keyManagerFactory = getKeyManagerFactory(ssl, keyStoreSupplier);
            final TrustManagerFactory trustManagerFactory = getTrustManagerFactory(ssl, trustStoreSupplier);

            sb.tls(keyManagerFactory, sslContextBuilder -> {
                sslContextBuilder.trustManager(trustManagerFactory);

                final SslProvider sslProvider = ssl.getProvider();
                if (sslProvider != null) {
                    sslContextBuilder.sslProvider(sslProvider);
                }
                final List<String> enabledProtocols = ssl.getEnabledProtocols();
                if (enabledProtocols != null) {
                    sslContextBuilder.protocols(enabledProtocols.toArray(new String[enabledProtocols.size()]));
                }
                final List<String> ciphers = ssl.getCiphers();
                if (ciphers != null) {
                    sslContextBuilder.ciphers(ImmutableList.copyOf(ciphers),
                                              SupportedCipherSuiteFilter.INSTANCE);
                }
                final ClientAuth clientAuth = ssl.getClientAuth();
                if (clientAuth != null) {
                    sslContextBuilder.clientAuth(clientAuth);
                }
            });
        } catch (Exception e) {
            throw new IllegalStateException("Failed to configure TLS: " + e, e);
        }
    }
1017705
public static SarlConfig getConfiguration(ConfigurationFactory configFactory) {
		assert configFactory != null;
		return configFactory.config(SarlConfig.class, PREFIX);
	}
866765
protected void processJawrServlets(String destDirPath,
			List<ServletDefinition> jawrServletDefinitions,
			boolean keepUrlMapping) throws Exception {

		String appRootDir = "";
		String jsServletMapping = "";
		String cssServletMapping = "";
		String binaryServletMapping = "";

		for (Iterator<ServletDefinition> iterator = jawrServletDefinitions
				.iterator(); iterator.hasNext();) {

			ServletDefinition servletDef = (ServletDefinition) iterator.next();
			ServletConfig servletConfig = servletDef.getServletConfig();

			// Force the production mode, and remove config listener parameters
			Map<?, ?> initParameters = ((MockServletConfig) servletConfig)
					.getInitParameters();
			initParameters.remove("jawr.config.reload.interval");

			String jawrServletMapping = servletConfig
					.getInitParameter(JawrConstant.SERVLET_MAPPING_PROPERTY_NAME);
			String servletMapping = servletConfig
					.getInitParameter(JawrConstant.SPRING_SERVLET_MAPPING_PROPERTY_NAME);
			if (servletMapping == null) {
				servletMapping = jawrServletMapping;
			}

			ResourceBundlesHandler bundleHandler = null;
			BinaryResourcesHandler binaryRsHandler = null;

			// Retrieve the bundle Handler
			ServletContext servletContext = servletConfig.getServletContext();
			String type = servletConfig.getInitParameter(TYPE_INIT_PARAMETER);
			if (type == null || type.equals(JawrConstant.JS_TYPE)) {
				bundleHandler = (ResourceBundlesHandler) servletContext
						.getAttribute(JawrConstant.JS_CONTEXT_ATTRIBUTE);
				String contextPathOverride = bundleHandler.getConfig()
						.getContextPathOverride();
				if (StringUtils.isNotEmpty(contextPathOverride)) {
					int idx = contextPathOverride.indexOf("//");
					if (idx != -1) {
						idx = contextPathOverride.indexOf("/", idx + 2);
						if (idx != -1) {
							appRootDir = PathNormalizer
									.asPath(contextPathOverride.substring(idx));
						}
					}
				}

				if (jawrServletMapping != null) {
					jsServletMapping = PathNormalizer
							.asPath(jawrServletMapping);
				}

			} else if (type.equals(JawrConstant.CSS_TYPE)) {
				bundleHandler = (ResourceBundlesHandler) servletContext
						.getAttribute(JawrConstant.CSS_CONTEXT_ATTRIBUTE);
				if (jawrServletMapping != null) {
					cssServletMapping = PathNormalizer
							.asPath(jawrServletMapping);
				}
			} else if (type.equals(JawrConstant.BINARY_TYPE)) {
				binaryRsHandler = (BinaryResourcesHandler) servletContext
						.getAttribute(JawrConstant.BINARY_CONTEXT_ATTRIBUTE);
				if (jawrServletMapping != null) {
					binaryServletMapping = PathNormalizer
							.asPath(jawrServletMapping);
				}
			}

			if (bundleHandler != null) {
				createBundles(servletDef.getServlet(), bundleHandler,
						destDirPath, servletMapping, keepUrlMapping);
			} else if (binaryRsHandler != null) {
				createBinaryBundle(servletDef.getServlet(), binaryRsHandler,
						destDirPath, servletConfig, keepUrlMapping);
			}
		}

		// Create the apache rewrite config file.
		createApacheRewriteConfigFile(destDirPath, appRootDir,
				jsServletMapping, cssServletMapping, binaryServletMapping);

	}
1027270
@Singleton
    public AbstractConfigurableTemplateResolver templateResolver(ViewsConfiguration viewsConfiguration,
                                                          ThymeleafViewsRendererConfiguration rendererConfiguration) {
        ClassLoaderTemplateResolver templateResolver = new ClassLoaderTemplateResolver();

        templateResolver.setPrefix(viewsConfiguration.getFolder());
        templateResolver.setCharacterEncoding(rendererConfiguration.getCharacterEncoding());
        templateResolver.setTemplateMode(rendererConfiguration.getTemplateMode());
        templateResolver.setSuffix(rendererConfiguration.getSuffix());
        templateResolver.setForceSuffix(rendererConfiguration.getForceSuffix());
        templateResolver.setForceTemplateMode(rendererConfiguration.getForceTemplateMode());
        templateResolver.setCacheTTLMs(rendererConfiguration.getCacheTTLMs());
        templateResolver.setCheckExistence(rendererConfiguration.getCheckExistence());
        templateResolver.setCacheable(rendererConfiguration.getCacheable());

        return templateResolver;
    }
437429
public ActionMapping getMapping(HttpServletRequest request, ConfigurationManager configManager) {
    ActionMapping mapping = new ActionMapping();
    parseNameAndNamespace(RequestUtils.getServletPath(request), mapping);

    String method = request.getParameter(MethodParam);
    if (Strings.isNotEmpty(method)) mapping.setMethod(method);
    return mapping;
  }
212081
@Override
	protected BundleRenderer createRenderer(ResourceBundlesHandler rsHandler,
			Boolean useRandomParam, ComponentTag tag) {
		
		final IValueMap attributes = tag.getAttributes();
		String media = attributes.getString(JawrConstant.MEDIA_ATTR);
        String title = attributes.getString(JawrConstant.TITLE_ATTR);
        boolean alternate = attributes.getBoolean(JawrConstant.ALTERNATE_ATTR);
        boolean displayAlternateStyles = attributes.getBoolean(JawrConstant.DISPLAY_ALTERNATE_ATTR);
        
        return RendererFactory.getCssBundleRenderer(rsHandler, useRandomParam, media, alternate, displayAlternateStyles, title);
	}
378543
public static <D extends ImageGray<D>>
	OrientationHistogramSift<D> sift(ConfigSiftOrientation config , Class<D> derivType ) {
		if( config == null )
			config = new ConfigSiftOrientation();
		config.checkValidity();

		return new OrientationHistogramSift(config.histogramSize,config.sigmaEnlarge,derivType);
	}
32653
private Resource getConfigDirectory(ServletConfig sg, ConfigServerImpl configServer, int countExistingContextes, RefBoolean isCustomSetting) throws PageServletException {
	isCustomSetting.setValue(true);
	ServletContext sc = sg.getServletContext();
	String strConfig = sg.getInitParameter("configuration");
	if (StringUtil.isEmpty(strConfig)) strConfig = sg.getInitParameter("lucee-web-directory");
	if (StringUtil.isEmpty(strConfig)) strConfig = System.getProperty("lucee.web.dir");

	if (StringUtil.isEmpty(strConfig)) {
	    isCustomSetting.setValue(false);
	    strConfig = "{web-root-directory}/WEB-INF/lucee/";
	}
	// only for backward compatibility
	else if (strConfig.startsWith("/WEB-INF/lucee/")) strConfig = "{web-root-directory}" + strConfig;

	strConfig = StringUtil.removeQuotes(strConfig, true);

	// static path is not allowed
	if (countExistingContextes > 1 && strConfig != null && strConfig.indexOf('{') == -1) {
	    String text = "static path [" + strConfig + "] for servlet init param [lucee-web-directory] is not allowed, path must use a web-context specific placeholder.";
	    System.err.println(text);
	    throw new PageServletException(new ApplicationException(text));
	}
	strConfig = SystemUtil.parsePlaceHolder(strConfig, sc, configServer.getLabels());

	ResourceProvider frp = ResourcesImpl.getFileResourceProvider();
	Resource root = frp.getResource(ReqRspUtil.getRootPath(sc));
	Resource res;
	Resource configDir = ResourceUtil.createResource(res = root.getRealResource(strConfig), FileUtil.LEVEL_PARENT_FILE, FileUtil.TYPE_DIR);

	if (configDir == null) {
	    configDir = ResourceUtil.createResource(res = frp.getResource(strConfig), FileUtil.LEVEL_GRAND_PARENT_FILE, FileUtil.TYPE_DIR);
	}

	if (configDir == null && !isCustomSetting.toBooleanValue()) {
	    try {
		res.createDirectory(true);
		configDir = res;
	    }
	    catch (IOException e) {
		throw new PageServletException(Caster.toPageException(e));
	    }
	}
	if (configDir == null) {
	    throw new PageServletException(new ApplicationException("path [" + strConfig + "] is invalid"));
	}

	if (!configDir.exists() || ResourceUtil.isEmptyDirectory(configDir, null)) {
	    Resource railoRoot;
	    // there is a railo directory
	    if (configDir.getName().equals("lucee") && (railoRoot = configDir.getParentResource().getRealResource("railo")).isDirectory()) {
		try {
		    copyRecursiveAndRename(railoRoot, configDir);
		}
		catch (IOException e) {
		    try {
			configDir.createDirectory(true);
		    }
		    catch (IOException ioe) {}
		    return configDir;
		}
		// zip the railo-server di and delete it (optional)
		try {
		    Resource p = railoRoot.getParentResource();
		    CompressUtil.compress(CompressUtil.FORMAT_ZIP, railoRoot, p.getRealResource("railo-web-context-old.zip"), false, -1);
		    ResourceUtil.removeEL(railoRoot, true);
		}
		catch (Throwable t) {
		    ExceptionUtil.rethrowIfNecessary(t);
		}
	    }
	    else {
		try {
		    configDir.createDirectory(true);
		}
		catch (IOException e) {}
	    }
	}
	return configDir;
    }
1171961
protected ResourceBundlesHandler getResourceBundlesHandler(FacesContext context) {
		Object handler = context.getExternalContext().getApplicationMap().get(getResourceBundlesHandlerAttributeName());
		if (null == handler)
			throw new IllegalStateException(
					"ResourceBundlesHandler not present in servlet context. Initialization of Jawr either failed or never occurred.");

		ResourceBundlesHandler rsHandler = (ResourceBundlesHandler) handler;
		return rsHandler;
	}
1144378
protected void setRequestUrl(MockServletRequest request,
			Map<String, String> variantMap, String path, JawrConfig config) {

		String domainURL = JawrConstant.HTTP_URL_PREFIX + DEFAULT_WEBAPP_URL;

		if (JawrConstant.SSL.equals(variantMap
				.get(JawrConstant.CONNECTION_TYPE_VARIANT_TYPE))) {
			// Use the contextPathSslOverride property if it's an absolute URL
			if (StringUtils.isNotEmpty(config.getContextPathSslOverride())
					&& config.getContextPathSslOverride().startsWith(
							JawrConstant.HTTPS_URL_PREFIX)) {
				domainURL = config.getContextPathSslOverride();
			} else {
				domainURL = JawrConstant.HTTPS_URL_PREFIX + DEFAULT_WEBAPP_URL;
			}
		} else {
			// Use the contextPathOverride property if it's an absolute URL
			if (StringUtils.isNotEmpty(config.getContextPathOverride())
					&& config.getContextPathOverride().startsWith(
							JawrConstant.HTTP_URL_PREFIX)) {
				domainURL = config.getContextPathOverride();
			} else {
				domainURL = JawrConstant.HTTP_URL_PREFIX + DEFAULT_WEBAPP_URL;
			}
		}

		request.setRequestUrl(PathNormalizer.joinDomainToPath(domainURL, path));
	}
358338
private void map(Resource root) {

        for (Resource.ResourceEntry serverGroup : root.getChildren(SERVER_GROUP)) {
            String serverGroupName = serverGroup.getName();
            ModelNode serverGroupModel = serverGroup.getModel();
            String profile = serverGroupModel.require(PROFILE).asString();
            store(serverGroupName, profile, profilesToGroups);
            String socketBindingGroup = serverGroupModel.require(SOCKET_BINDING_GROUP).asString();
            store(serverGroupName, socketBindingGroup, socketsToGroups);

            for (Resource.ResourceEntry deployment : serverGroup.getChildren(DEPLOYMENT)) {
                store(serverGroupName, deployment.getName(), deploymentsToGroups);
            }

            for (Resource.ResourceEntry overlay : serverGroup.getChildren(DEPLOYMENT_OVERLAY)) {
                store(serverGroupName, overlay.getName(), overlaysToGroups);
            }

        }

        for (Resource.ResourceEntry host : root.getChildren(HOST)) {
            String hostName = host.getPathElement().getValue();
            for (Resource.ResourceEntry serverConfig : host.getChildren(SERVER_CONFIG)) {
                ModelNode serverConfigModel = serverConfig.getModel();
                String serverGroupName = serverConfigModel.require(GROUP).asString();
                store(serverGroupName, hostName, hostsToGroups);
            }
        }
    }