public JspViewHandlingStrategy() { try { responseBufferSize = Integer.parseInt(webConfig.getOptionValue(ResponseBufferSize)); } catch (NumberFormatException nfe) { responseBufferSize = Integer .parseInt(ResponseBufferSize.getDefaultValue()); } }
private static Long getCheckPeriod(WebConfiguration webConfig) { String val = webConfig.getOptionValue(WebContextInitParameter.ResourceUpdateCheckPeriod); try { return (Long.parseLong(val)); } catch (NumberFormatException nfe) { return Long.parseLong(WebContextInitParameter.ResourceUpdateCheckPeriod.getDefaultValue()); } }
public JspViewHandlingStrategy() { try { responseBufferSize = parseInt(webConfig.getOptionValue(ResponseBufferSize)); } catch (NumberFormatException nfe) { responseBufferSize = parseInt(ResponseBufferSize.getDefaultValue()); } }
/** * <p>Utility method for obtaining the <code>Integer</code> based configuration * values used to change the behavior of the <code>ServerSideStateHelper</code>. * @param param the paramter to parse * @return the Integer representation of the parameter value */ protected Integer getIntegerConfigValue(WebContextInitParameter param) { String noOfViewsStr = webConfig.getOptionValue(param); Integer value = null; try { value = Integer.valueOf(noOfViewsStr); } catch (NumberFormatException nfe) { String defaultValue = param.getDefaultValue(); if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.log(Level.WARNING, "jsf.state.server.cannot.parse.int.option", new Object[] { param.getQualifiedName(), defaultValue} ); } try { value = Integer.valueOf(defaultValue); } catch (NumberFormatException ne) { if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.log(Level.FINEST, "Unable to convert number", ne); } } } return value; }
/** * <p>Utility method for obtaining the <code>Integer</code> based configuration * values used to change the behavior of the <code>ServerSideStateHelper</code>. * @param param the paramter to parse * @return the Integer representation of the parameter value */ protected Integer getIntegerConfigValue(WebContextInitParameter param) { String noOfViewsStr = webConfig.getOptionValue(param); Integer value = null; try { value = Integer.valueOf(noOfViewsStr); } catch (NumberFormatException nfe) { String defaultValue = param.getDefaultValue(); if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.log(Level.WARNING, "jsf.state.server.cannot.parse.int.option", new Object[] { param.getQualifiedName(), defaultValue} ); } try { value = Integer.valueOf(defaultValue); } catch (NumberFormatException ne) { if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.log(Level.FINEST, "Unable to convert number", ne); } } } return value; }
/** * <p>Utility method for obtaining the <code>Integer</code> based configuration * values used to change the behavior of the <code>ServerSideStateHelper</code>. * @param param the paramter to parse * @return the Integer representation of the parameter value */ protected Integer getIntegerConfigValue(WebContextInitParameter param) { String noOfViewsStr = webConfig.getOptionValue(param); Integer value = null; try { value = Integer.valueOf(noOfViewsStr); } catch (NumberFormatException nfe) { String defaultValue = param.getDefaultValue(); if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.log(Level.WARNING, "jsf.state.server.cannot.parse.int.option", new Object[] { param.getQualifiedName(), defaultValue} ); } try { value = Integer.valueOf(defaultValue); } catch (NumberFormatException ne) { if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.log(Level.FINEST, "Unable to convert number", ne); } } } return value; }
private ByteBuffer allocateByteBuffer() { int size; try { size = Integer.parseInt(webconfig.getOptionValue(ResourceBufferSize)); } catch (NumberFormatException nfe) { if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.log(Level.WARNING, "jsf.application.resource.invalid_resource_buffer_size", new Object[] { webconfig.getOptionValue(ResourceBufferSize), ResourceBufferSize.getQualifiedName(), ResourceBufferSize.getDefaultValue() }); } size = Integer.parseInt(ResourceBufferSize.getDefaultValue()); } return ByteBuffer.allocate(size); } }
private ByteBuffer allocateByteBuffer() { int size; try { size = Integer.parseInt(webconfig.getOptionValue(ResourceBufferSize)); } catch (NumberFormatException nfe) { if (LOGGER.isLoggable(WARNING)) { LOGGER.log(WARNING, "jsf.application.resource.invalid_resource_buffer_size", new Object[] { webconfig.getOptionValue(ResourceBufferSize), ResourceBufferSize.getQualifiedName(), ResourceBufferSize.getDefaultValue() }); } size = Integer.parseInt(ResourceBufferSize.getDefaultValue()); } return ByteBuffer.allocate(size); }
private ByteBuffer allocateByteBuffer() { int size; try { size = Integer.parseInt(webconfig.getOptionValue(ResourceBufferSize)); } catch (NumberFormatException nfe) { if (LOGGER.isLoggable(WARNING)) { LOGGER.log(WARNING, "jsf.application.resource.invalid_resource_buffer_size", new Object[] { webconfig.getOptionValue(ResourceBufferSize), ResourceBufferSize.getQualifiedName(), ResourceBufferSize.getDefaultValue() }); } size = Integer.parseInt(ResourceBufferSize.getDefaultValue()); } return ByteBuffer.allocate(size); }
private ByteBuffer allocateByteBuffer() { int size; try { size = Integer.parseInt(webconfig.getOptionValue(ResourceBufferSize)); } catch (NumberFormatException nfe) { if (LOGGER.isLoggable(WARNING)) { LOGGER.log(WARNING, "jsf.application.resource.invalid_resource_buffer_size", new Object[] { webconfig.getOptionValue(ResourceBufferSize), ResourceBufferSize.getQualifiedName(), ResourceBufferSize.getDefaultValue() }); } size = Integer.parseInt(ResourceBufferSize.getDefaultValue()); } return ByteBuffer.allocate(size); }
public FacesRenderKitImpl() { webConfig = WebConfiguration.getInstance(); String value = webConfig.getEnvironmentEntry(WebConfiguration.WebEnvironmentEntry.ProjectStage); if (value == null) { value = webConfig.getOptionValue(WebContextInitParameter.JavaxFacesProjectStage); } try { if (value != null) { if (ProjectStage.valueOf(value).equals(ProjectStage.Development)) { webConfig.overrideContextInitParameter(WebContextInitParameter.FaceletsDefaultRefreshPeriod, WebContextInitParameter.FaceletsDefaultRefreshPeriod.getDefaultValue()); } } } catch (IllegalArgumentException e) { } }
public FacesRenderKitImpl() { webConfig = WebConfiguration.getInstance(); String value = webConfig.getEnvironmentEntry(WebConfiguration.WebEnvironmentEntry.ProjectStage); if (value == null) { value = webConfig.getOptionValue(WebContextInitParameter.JavaxFacesProjectStage); } try { if (value != null) { if (ProjectStage.valueOf(value).equals(ProjectStage.Development)) { webConfig.overrideContextInitParameter(WebContextInitParameter.FaceletsDefaultRefreshPeriod, WebContextInitParameter.FaceletsDefaultRefreshPeriod.getDefaultValue()); } } } catch (IllegalArgumentException e) { } }
private void postConstructApplicationInitialization() { String optionValue = config.getOptionValue(WebConfiguration.WebContextInitParameter.ClientWindowMode); isClientWindowEnabled = (null != optionValue) && !optionValue.equals(WebConfiguration.WebContextInitParameter.ClientWindowMode.getDefaultValue()); }
private void postConstructApplicationInitialization() { String optionValue = config.getOptionValue(WebConfiguration.WebContextInitParameter.ClientWindowMode); isClientWindowEnabled = (null != optionValue) && !optionValue.equals(WebConfiguration.WebContextInitParameter.ClientWindowMode.getDefaultValue()); }
private void postConstructApplicationInitialization() { String optionValue = config.getOptionValue(WebConfiguration.WebContextInitParameter.ClientWindowMode); isClientWindowEnabled = (null != optionValue) && !optionValue.equals(WebConfiguration.WebContextInitParameter.ClientWindowMode.getDefaultValue()); }
private static Long getCheckPeriod(WebConfiguration webConfig) { String val = webConfig.getOptionValue(WebContextInitParameter.ResourceUpdateCheckPeriod); try { return (Long.parseLong(val)); } catch (NumberFormatException nfe) { return Long.parseLong(WebContextInitParameter.ResourceUpdateCheckPeriod.getDefaultValue()); } }
private void postConstructApplicationInitialization() { String optionValue = config.getOptionValue(WebConfiguration.WebContextInitParameter.ClientWindowMode); isClientWindowEnabled = (null != optionValue) && !optionValue.equals(WebConfiguration.WebContextInitParameter.ClientWindowMode.getDefaultValue()); }
public JspViewHandlingStrategy() { try { responseBufferSize = parseInt(webConfig.getOptionValue(ResponseBufferSize)); } catch (NumberFormatException nfe) { responseBufferSize = parseInt(ResponseBufferSize.getDefaultValue()); } }
private static Long getCheckPeriod(WebConfiguration webConfig) { String val = webConfig.getOptionValue(WebContextInitParameter.ResourceUpdateCheckPeriod); try { return (Long.parseLong(val)); } catch (NumberFormatException nfe) { return Long.parseLong(WebContextInitParameter.ResourceUpdateCheckPeriod.getDefaultValue()); } }
private static Long getCheckPeriod(WebConfiguration webConfig) { String val = webConfig.getOptionValue(WebContextInitParameter.ResourceUpdateCheckPeriod); try { return (Long.parseLong(val)); } catch (NumberFormatException nfe) { return Long.parseLong(WebContextInitParameter.ResourceUpdateCheckPeriod.getDefaultValue()); } }