com.liferay.faces.util.config
Enum WebConfigParam

java.lang.Object
  extended by java.lang.Enum<WebConfigParam>
      extended by com.liferay.faces.util.config.WebConfigParam
All Implemented Interfaces:
ConfigParam<javax.faces.context.ExternalContext>, Serializable, Comparable<WebConfigParam>

public enum WebConfigParam
extends Enum<WebConfigParam>
implements ConfigParam<javax.faces.context.ExternalContext>

Author:
Neil Griffin

Enum Constant Summary
I18nELMapInitialCacheCapacity
          Integer indicating the initial cache capacity for the message cache used by the i18n EL utility.
I18nELMapMaxCacheCapacity
          Integer indicating the default maximum cache capacity for the message cache used by the i18n EL utility.
I18nInitialCacheCapacity
          Integer indicating the default maximum cache capacity for the resource bundle cache used by the i18n EL utility.
I18nMaxCacheCapacity
          Integer indicating the maximum cache capacity for the resource bundle cache used by the I18n utility.
ResolveXMLEntities
          Boolean indicating whether or not XML entities should be resolved
UploadedFileMaxSize
          Maximum file size for an uploaded file.
UploadedFilesDir
          Absolute path to a directory (folder) in which the uploaded file data should be written to.
 
Method Summary
 String getAlternateName()
          Returns the alternate name of the config param (or null if there is not an alternate name).
 boolean getBooleanValue(javax.faces.context.ExternalContext externalContext)
          Returns the boolean value of the config param.
 String getConfiguredValue(javax.faces.context.ExternalContext externalContext)
          Returns the value of the config param that was specified in the configuration file.
 boolean getDefaultBooleanValue()
          Returns the default boolean value of the config param.
 int getDefaultIntegerValue()
          Returns the default int value of the config param.
 long getDefaultLongValue()
          Returns the default long value of the config param.
 String getDefaultStringValue()
          Returns the default String value of the config param.
 int getIntegerValue(javax.faces.context.ExternalContext externalContext)
          Returns the int value of the config param.
 long getLongValue(javax.faces.context.ExternalContext externalContext)
          Returns the long value of the config param.
 String getName()
          Returns the name of the config param.
 String getStringValue(javax.faces.context.ExternalContext externalContext)
          Returns the String value of the config param.
 boolean isConfigured(javax.faces.context.ExternalContext externalContext)
          Flag indicating whether or not the config param was specified in the configuration file.
static WebConfigParam valueOf(String name)
          Returns the enum constant of this type with the specified name.
static WebConfigParam[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

I18nELMapInitialCacheCapacity

public static final WebConfigParam I18nELMapInitialCacheCapacity
Integer indicating the initial cache capacity for the message cache used by the i18n EL utility. The default value of this param is 16. For more details, see CacheFactory.getConcurrentCache(int) and HashMap.HashMap().

Since:
1.1, 2.1, 3.1

I18nInitialCacheCapacity

public static final WebConfigParam I18nInitialCacheCapacity
Integer indicating the default maximum cache capacity for the resource bundle cache used by the i18n EL utility. The default value of this param is -1 which indicates that no maximum should be enforced. For more details, see CacheFactory.getConcurrentCache(int) and HashMap.HashMap().

Since:
1.1, 2.1, 3.1

I18nELMapMaxCacheCapacity

public static final WebConfigParam I18nELMapMaxCacheCapacity
Integer indicating the default maximum cache capacity for the message cache used by the i18n EL utility. The default value of this param is -1 which indicates that no maximum capacity should be enforced (in other words, the cache will be obtained via CacheFactory.getConcurrentCache(int)). Otherwise, an LRU cache with the specified maximum capacity will be obtained via CacheFactory.getConcurrentLRUCache(int, int).

Since:
1.1, 2.1, 3.1

I18nMaxCacheCapacity

public static final WebConfigParam I18nMaxCacheCapacity
Integer indicating the maximum cache capacity for the resource bundle cache used by the I18n utility. The default value of this param is -1 which indicates that no maximum capacity should be enforced (in other words, the cache will be obtained via CacheFactory.getConcurrentCache(int)). Otherwise, an LRU cache with the specified maximum capacity will be obtained via CacheFactory.getConcurrentLRUCache(int, int).

Since:
1.1, 2.1, 3.1

ResolveXMLEntities

public static final WebConfigParam ResolveXMLEntities
Boolean indicating whether or not XML entities should be resolved


UploadedFilesDir

public static final WebConfigParam UploadedFilesDir
Absolute path to a directory (folder) in which the uploaded file data should be written to. Default value is the value of the system property "java.io.tmpdir".


UploadedFileMaxSize

public static final WebConfigParam UploadedFileMaxSize
Maximum file size for an uploaded file. Default is 104,857,600 (~100MB), upper limit is 2,147,483,647 (~2GB)

Method Detail

values

public static WebConfigParam[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (WebConfigParam c : WebConfigParam.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static WebConfigParam valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getAlternateName

public String getAlternateName()
Description copied from interface: ConfigParam
Returns the alternate name of the config param (or null if there is not an alternate name).

Specified by:
getAlternateName in interface ConfigParam<javax.faces.context.ExternalContext>

getBooleanValue

public boolean getBooleanValue(javax.faces.context.ExternalContext externalContext)
Description copied from interface: ConfigParam
Returns the boolean value of the config param. If not specified in the config file, then the value of ConfigParam.getDefaultBooleanValue() is returned.

Specified by:
getBooleanValue in interface ConfigParam<javax.faces.context.ExternalContext>

getConfiguredValue

public String getConfiguredValue(javax.faces.context.ExternalContext externalContext)
Description copied from interface: ConfigParam
Returns the value of the config param that was specified in the configuration file.

Specified by:
getConfiguredValue in interface ConfigParam<javax.faces.context.ExternalContext>

getDefaultBooleanValue

public boolean getDefaultBooleanValue()
Description copied from interface: ConfigParam
Returns the default boolean value of the config param.

Specified by:
getDefaultBooleanValue in interface ConfigParam<javax.faces.context.ExternalContext>

getDefaultIntegerValue

public int getDefaultIntegerValue()
Description copied from interface: ConfigParam
Returns the default int value of the config param.

Specified by:
getDefaultIntegerValue in interface ConfigParam<javax.faces.context.ExternalContext>

getDefaultLongValue

public long getDefaultLongValue()
Description copied from interface: ConfigParam
Returns the default long value of the config param.

Specified by:
getDefaultLongValue in interface ConfigParam<javax.faces.context.ExternalContext>

getDefaultStringValue

public String getDefaultStringValue()
Description copied from interface: ConfigParam
Returns the default String value of the config param.

Specified by:
getDefaultStringValue in interface ConfigParam<javax.faces.context.ExternalContext>

getIntegerValue

public int getIntegerValue(javax.faces.context.ExternalContext externalContext)
Description copied from interface: ConfigParam
Returns the int value of the config param. If not specified in the config file, then the value of ConfigParam.getDefaultIntegerValue() is returned.

Specified by:
getIntegerValue in interface ConfigParam<javax.faces.context.ExternalContext>

getLongValue

public long getLongValue(javax.faces.context.ExternalContext externalContext)
Description copied from interface: ConfigParam
Returns the long value of the config param. If not specified in the config file, then the value of ConfigParam.getDefaultLongValue() is returned.

Specified by:
getLongValue in interface ConfigParam<javax.faces.context.ExternalContext>

getName

public String getName()
Description copied from interface: ConfigParam
Returns the name of the config param.

Specified by:
getName in interface ConfigParam<javax.faces.context.ExternalContext>

getStringValue

public String getStringValue(javax.faces.context.ExternalContext externalContext)
Description copied from interface: ConfigParam
Returns the String value of the config param. If not specified in the config file, then the value of ConfigParam.getDefaultStringValue() is returned.

Specified by:
getStringValue in interface ConfigParam<javax.faces.context.ExternalContext>

isConfigured

public boolean isConfigured(javax.faces.context.ExternalContext externalContext)
Description copied from interface: ConfigParam
Flag indicating whether or not the config param was specified in the configuration file.

Specified by:
isConfigured in interface ConfigParam<javax.faces.context.ExternalContext>


Copyright © 2019 Liferay, Inc.. All rights reserved.