/** * 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 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 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); }
/** * 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); }
public long getMaxTimeExpires() { if (_maxTimeExpires == null) { _maxTimeExpires = WebConfigParamUtils.getLongInitParameter( FacesContext.getCurrentInstance().getExternalContext(), RESOURCE_MAX_TIME_EXPIRES, 604800000L); } return _maxTimeExpires; } }
public long getMaxTimeExpires() { if (_maxTimeExpires == null) { _maxTimeExpires = WebConfigParamUtils.getLongInitParameter( FacesContext.getCurrentInstance().getExternalContext(), RESOURCE_MAX_TIME_EXPIRES, 604800000L); } return _maxTimeExpires; } }
@Override public FaceletCache getFaceletCache() { FacesContext context = FacesContext.getCurrentInstance(); ExternalContext eContext = context.getExternalContext(); // refresh period long refreshPeriod; if(context.isProjectStage(ProjectStage.Production)) refreshPeriod = WebConfigParamUtils.getLongInitParameter(eContext, PARAMS_REFRESH_PERIOD, FaceletViewDeclarationLanguage.DEFAULT_REFRESH_PERIOD_PRODUCTION); else refreshPeriod = WebConfigParamUtils.getLongInitParameter(eContext, PARAMS_REFRESH_PERIOD, FaceletViewDeclarationLanguage.DEFAULT_REFRESH_PERIOD); return new FaceletCacheImpl(refreshPeriod); }
refreshPeriod = WebConfigParamUtils.getLongInitParameter(eContext, PARAMS_REFRESH_PERIOD, DEFAULT_REFRESH_PERIOD_PRODUCTION); else refreshPeriod = WebConfigParamUtils.getLongInitParameter(eContext, PARAMS_REFRESH_PERIOD, DEFAULT_REFRESH_PERIOD);
refreshPeriod = WebConfigParamUtils.getLongInitParameter(eContext, PARAMS_REFRESH_PERIOD, DEFAULT_REFRESH_PERIOD_PRODUCTION); else refreshPeriod = WebConfigParamUtils.getLongInitParameter(eContext, PARAMS_REFRESH_PERIOD, DEFAULT_REFRESH_PERIOD);