/** * Gets the String init parameter value from the specified context. If the parameter is an empty String or a String * containing only white space, this method returns <code>null</code> * * @param context * the application's external context * @param name * the init parameter's name * * @return the parameter if it was specified and was not empty, <code>null</code> otherwise * * @throws NullPointerException * if context or name is <code>null</code> */ public static String getStringInitParameter(ExternalContext context, String name) { return getStringInitParameter(context,name,null); }
/** * Gets the String init parameter value from the specified context. If the parameter is an empty String or a String * containing only white space, this method returns <code>null</code> * * @param context * the application's external context * @param names * the init parameter's names, the first one is scanned first. * Usually used when a param has multiple aliases * * @return the parameter if it was specified and was not empty, <code>null</code> otherwise * * @throws NullPointerException * if context or name is <code>null</code> */ public static String getStringInitParameter(ExternalContext context, String[] names) { return getStringInitParameter(context, names, null); }
String param = getStringInitParameter(context, name); if (param == null)
String param = getStringInitParameter(context, name); if (param == null)
String param = getStringInitParameter(context, name); if (param == null)
param = getStringInitParameter(context, name); if (param != null)
param = getStringInitParameter(context, name); if (param != null)
param = getStringInitParameter(context, name); if (param != null)
String param = getStringInitParameter(context, name); if (param == null)
param = getStringInitParameter(context, name); if (param != null)
String deprecatedName, T defaultValue) String param = getStringInitParameter(context, name, deprecatedName); if (param == null)
public ExtendedDefaultResourceHandlerSupport() { super(); FacesContext context = FacesContext.getCurrentInstance(); _developmentStage = context.isProjectStage(ProjectStage.Development); _resourceIdentifier = WebConfigParamUtils.getStringInitParameter(context.getExternalContext(), INIT_PARAM_EXTENDED_RESOURCE_IDENTIFIER, ResourceHandler.RESOURCE_IDENTIFIER); // parse the config MyFacesResourceHandlerConfigParser configParser = new MyFacesResourceHandlerConfigParser(); _config = configParser.parse(FacesContext.getCurrentInstance()); _webConfigProvider = WebConfigProviderFactory.getFacesConfigResourceProviderFactory(context). createWebConfigProvider(context); _webConfigProvider.init(context); // GZIPResourceLoader does some file operations to clear the cache, so this call must be done // to ensure only one thread is cleaning it up (at setup time) getResourceLoaders(); }
String delegateFacesServlet = WebConfigParamUtils.getStringInitParameter(context.getExternalContext(), INIT_PARAM_DELEGATE_FACES_SERVLET);
public MyFacesResourcesConfig parse(FacesContext facesContext) = WebConfigParamUtils.getStringInitParameter(facesContext.getExternalContext(), INIT_PARAM_EXTENDED_RESOURCE_HANDLER_CONFIG_URL_PROVIDER, INIT_PARAM_EXTENDED_RESOURCE_HANDLER_CONFIG_URL_PROVIDER_DEFAULT);