Search in sources :

Example 1 with MultiPartConfig

use of com.liferay.faces.util.config.MultiPartConfig in project liferay-faces-alloy by liferay.

the class InputFileDecoderBase method getFacesServletMultiPartConfig.

protected MultiPartConfig getFacesServletMultiPartConfig(ExternalContext externalContext) {
    MultiPartConfig facesServletMultiPartConfig = null;
    String appConfigAttrName = ApplicationConfig.class.getName();
    Map<String, Object> applicationMap = externalContext.getApplicationMap();
    ApplicationConfig applicationConfig = (ApplicationConfig) applicationMap.get(appConfigAttrName);
    WebConfig webConfig = applicationConfig.getWebConfig();
    List<ConfiguredServlet> configuredServlets = webConfig.getConfiguredServlets();
    for (ConfiguredServlet configuredServlet : configuredServlets) {
        if (FACES_SERVLET_FQCN.equals(configuredServlet.getServletClass())) {
            facesServletMultiPartConfig = configuredServlet.getMultiPartConfig();
        }
    }
    return facesServletMultiPartConfig;
}
Also used : MultiPartConfig(com.liferay.faces.util.config.MultiPartConfig) ApplicationConfig(com.liferay.faces.util.config.ApplicationConfig) WebConfig(com.liferay.faces.util.config.WebConfig) ConfiguredServlet(com.liferay.faces.util.config.ConfiguredServlet)

Aggregations

ApplicationConfig (com.liferay.faces.util.config.ApplicationConfig)1 ConfiguredServlet (com.liferay.faces.util.config.ConfiguredServlet)1 MultiPartConfig (com.liferay.faces.util.config.MultiPartConfig)1 WebConfig (com.liferay.faces.util.config.WebConfig)1