private boolean isUseFlashScopePurgeViewsInSession(ExternalContext externalContext) { if (_useFlashScopePurgeViewsInSession == null) { _useFlashScopePurgeViewsInSession = WebConfigParamUtils.getBooleanInitParameter( externalContext, USE_FLASH_SCOPE_PURGE_VIEWS_IN_SESSION, false); } return _useFlashScopePurgeViewsInSession; }
private Integer getNumberOfSequentialViewsInSession(ExternalContext externalContext) { if (!_numberOfSequentialViewsInSessionSet) { _numberOfSequentialViewsInSession = WebConfigParamUtils.getIntegerInitParameter( externalContext, NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_PARAM); _numberOfSequentialViewsInSessionSet = true; } return _numberOfSequentialViewsInSession; } }
/** * Gets the long init parameter value from the specified context. If the parameter was not specified, the default * value is used instead. * * @param context * the application's external context * @param names * the init parameter's names * * @return the init parameter value as a long * * @throws NullPointerException * if context or name is <code>null</code> */ public static long getLongInitParameter(ExternalContext context, String[] names) { return getLongInitParameter(context, names, 0); }
/** * 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); }
_partialStateSaving = WebConfigParamUtils.getBooleanInitParameter(context, StateManager.PARTIAL_STATE_SAVING_PARAM_NAME, partialStateSavingDefault); String [] viewIds = StringUtils.splitShortString(WebConfigParamUtils.getStringInitParameter(context, StateManager.FULL_STATE_SAVING_VIEW_IDS_PARAM_NAME), ','); _markInitialStateWhenApplyBuildView = WebConfigParamUtils.getBooleanInitParameter(context, PARAM_MARK_INITIAL_STATE_WHEN_APPLY_BUILD_VIEW, false);
refreshPeriod = WebConfigParamUtils.getLongInitParameter(eContext, PARAMS_REFRESH_PERIOD, DEFAULT_REFRESH_PERIOD_PRODUCTION); else refreshPeriod = WebConfigParamUtils.getLongInitParameter(eContext, PARAMS_REFRESH_PERIOD, DEFAULT_REFRESH_PERIOD); String faceletsResourceResolverClassName = WebConfigParamUtils.getStringInitParameter(eContext, PARAMS_RESOURCE_RESOLVER, null); if (faceletsResourceResolverClassName != 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 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); }
_partialStateSaving = WebConfigParamUtils.getBooleanInitParameter(context, StateManager.PARTIAL_STATE_SAVING_PARAM_NAME, partialStateSavingDefault); String [] viewIds = StringUtils.splitShortString(WebConfigParamUtils.getStringInitParameter(context, StateManager.FULL_STATE_SAVING_VIEW_IDS_PARAM_NAME), ',');
refreshPeriod = WebConfigParamUtils.getLongInitParameter(eContext, PARAMS_REFRESH_PERIOD, DEFAULT_REFRESH_PERIOD_PRODUCTION); else refreshPeriod = WebConfigParamUtils.getLongInitParameter(eContext, PARAMS_REFRESH_PERIOD, DEFAULT_REFRESH_PERIOD); String faceletsResourceResolverClassName = WebConfigParamUtils.getStringInitParameter(eContext, PARAMS_RESOURCE_RESOLVER, null); if (faceletsResourceResolverClassName != 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); }
/** * Gets the boolean init parameter value from the specified context. If the parameter was not specified, the default * value is used instead. * * @param context * the application's external context * @param names * the init parameter's names * * @return the init parameter value as a boolean * * @throws NullPointerException * if context or name is <code>null</code> */ public static boolean getBooleanInitParameter(ExternalContext context, String[] names) { return getBooleanInitParameter(context, names, false); }
private void _initializeBuffer(ExternalContext context) { _bufferSize = WebConfigParamUtils.getIntegerInitParameter(context, PARAMS_BUFFER_SIZE, -1); }
/** * Gets the long init parameter value from the specified context. If the parameter was not specified, the default * value is used instead. * * @param context * the application's external context * @param names * the init parameter's names * * @return the init parameter value as a long * * @throws NullPointerException * if context or name is <code>null</code> */ public static long getLongInitParameter(ExternalContext context, String[] names) { return getLongInitParameter(context, names, 0); }
/** * 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 boolean init parameter value from the specified context. If the parameter was not specified, the default * value is used instead. * * @param context * the application's external context * @param names * the init parameter's names * * @return the init parameter value as a boolean * * @throws NullPointerException * if context or name is <code>null</code> */ public static boolean getBooleanInitParameter(ExternalContext context, String[] names) { return getBooleanInitParameter(context, names, false); }
private void _initializeBuffer(ExternalContext context) { _bufferSize = WebConfigParamUtils.getIntegerInitParameter(context, PARAMS_BUFFER_SIZE, -1); }
/** * Gets the long init parameter value from the specified context. If the parameter was not specified, the default * value is used instead. * * @param context * the application's external context * @param name * the init parameter's name * @param deprecatedName * the init parameter's deprecated name. * @param defaultValue * the default value to return in case the parameter was not set * * @return the init parameter value as a long * * @throws NullPointerException * if context or name is <code>null</code> */ public static long getLongInitParameter(ExternalContext context, String name) { return getLongInitParameter(context, name, 0); }
throw new NullPointerException(); String param = getStringInitParameter(context, name); if (param == null)
/** * Gets the boolean init parameter value from the specified context. If the parameter was not specified, the default * value is used instead. * * @param context * the application's external context * @param name * the init parameter's name * @param deprecatedName * the init parameter's deprecated name. * @param defaultValue * the default value to return in case the parameter was not set * * @return the init parameter value as a boolean * * @throws NullPointerException * if context or name is <code>null</code> */ public static boolean getBooleanInitParameter(ExternalContext context, String name) { return getBooleanInitParameter(context, name, false); }
/** * Gets the int init parameter value from the specified context. If the parameter was not specified, the default * value is used instead. * * @param context * the application's external context * @param names * the init parameter's names * * @return the init parameter value as a int * * @throws NullPointerException * if context or name is <code>null</code> */ public static int getIntegerInitParameter(ExternalContext context, String[] names) { return getIntegerInitParameter(context, names, 0); }