|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.commons.util.WebConfigParamUtils
public final class WebConfigParamUtils
Utility class to handle web config parameters
| Field Summary | |
|---|---|
static java.lang.String[] |
COMMON_FALSE_VALUES
|
static java.lang.String[] |
COMMON_TRUE_VALUES
|
| Constructor Summary | |
|---|---|
WebConfigParamUtils()
|
|
| Method Summary | ||
|---|---|---|
static boolean |
getBooleanInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name)
Gets the boolean init parameter value from the specified context. |
|
static boolean |
getBooleanInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names)
Gets the boolean init parameter value from the specified context. |
|
static boolean |
getBooleanInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names,
boolean defaultValue)
Gets the boolean init parameter value from the specified context. |
|
static boolean |
getBooleanInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names,
boolean defaultValue,
java.lang.String[] valuesIgnoreCase,
boolean returnOnValueEqualsIgnoreCase)
Gets the boolean init parameter value from the specified context. |
|
static boolean |
getBooleanInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name,
boolean defaultValue)
Gets the boolean init parameter value from the specified context. |
|
static boolean |
getBooleanInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name,
boolean defaultValue,
java.lang.String[] valuesIgnoreCase,
boolean returnOnValueEqualsIgnoreCase)
Gets the boolean init parameter value from the specified context. |
|
static
|
getInstanceInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name,
java.lang.String deprecatedName,
T defaultValue)
Gets the init parameter value from the specified context and instanciate it. |
|
static int |
getIntegerInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name)
Gets the int init parameter value from the specified context. |
|
static int |
getIntegerInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names)
Gets the int init parameter value from the specified context. |
|
static int |
getIntegerInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names,
int defaultValue)
Gets the int init parameter value from the specified context. |
|
static int |
getIntegerInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name,
int defaultValue)
Gets the int init parameter value from the specified context. |
|
static long |
getLongInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name)
Gets the long init parameter value from the specified context. |
|
static long |
getLongInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names)
Gets the long init parameter value from the specified context. |
|
static long |
getLongInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names,
long defaultValue)
Gets the long init parameter value from the specified context. |
|
static long |
getLongInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name,
long defaultValue)
Gets the long init parameter value from the specified context. |
|
static java.lang.String |
getStringInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name)
Gets the String init parameter value from the specified context. |
|
static java.lang.String |
getStringInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names)
Gets the String init parameter value from the specified context. |
|
static java.lang.String |
getStringInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names,
java.lang.String defaultValue)
Gets the String init parameter value from the specified context. |
|
static java.lang.String |
getStringInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name,
java.lang.String defaultValue)
Gets the String init parameter value from the specified context. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String[] COMMON_TRUE_VALUES
public static final java.lang.String[] COMMON_FALSE_VALUES
| Constructor Detail |
|---|
public WebConfigParamUtils()
| Method Detail |
|---|
public static java.lang.String getStringInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name)
null
context - the application's external contextname - the init parameter's name
null otherwise
java.lang.NullPointerException - if context or name is null
public static java.lang.String getStringInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name,
java.lang.String defaultValue)
null
context - the application's external contextname - the init parameter's namedefaultValue - the value by default if null or empty
null otherwise
java.lang.NullPointerException - if context or name is null
public static java.lang.String getStringInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names)
null
context - the application's external contextnames - the init parameter's names, the first one is scanned first.
Usually used when a param has multiple aliases
null otherwise
java.lang.NullPointerException - if context or name is null
public static java.lang.String getStringInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names,
java.lang.String defaultValue)
null
context - the application's external contextnames - the init parameter's names, the first one is scanned first.
Usually used when a param has multiple aliasesdefaultValue - the value by default if null or empty
null otherwise
java.lang.NullPointerException - if context or name is null
public static boolean getBooleanInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name)
context - the application's external contextname - the init parameter's namedeprecatedName - the init parameter's deprecated name.defaultValue - the default value to return in case the parameter was not set
java.lang.NullPointerException - if context or name is null
public static boolean getBooleanInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name,
boolean defaultValue)
context - the application's external contextname - the init parameter's namedeprecatedName - the init parameter's deprecated name.defaultValue - the default value to return in case the parameter was not set
java.lang.NullPointerException - if context or name is null
public static boolean getBooleanInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name,
boolean defaultValue,
java.lang.String[] valuesIgnoreCase,
boolean returnOnValueEqualsIgnoreCase)
context - the application's external contextname - the init parameter's namedeprecatedName - the init parameter's deprecated name.defaultValue - the default value to return in case the parameter was not setvaluesIgnoreCase - an array of valid values to matchreturnOnValueEqualsIgnoreCase - the value to return in case the parameter match with valuesIgnoreCase
java.lang.NullPointerException - if context or name is null
public static boolean getBooleanInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names)
context - the application's external contextnames - the init parameter's names
java.lang.NullPointerException - if context or name is null
public static boolean getBooleanInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names,
boolean defaultValue)
context - the application's external contextnames - the init parameter's namesdefaultValue - the default value to return in case the parameter was not set
java.lang.NullPointerException - if context or name is null
public static boolean getBooleanInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names,
boolean defaultValue,
java.lang.String[] valuesIgnoreCase,
boolean returnOnValueEqualsIgnoreCase)
context - the application's external contextnames - the init parameter's namesdefaultValue - the default value to return in case the parameter was not setvaluesIgnoreCase - an array of valid values to matchreturnOnValueEqualsIgnoreCase - the value to return in case the parameter match with valuesIgnoreCase
java.lang.NullPointerException - if context or name is null
public static int getIntegerInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name)
context - the application's external contextname - the init parameter's namedeprecatedName - the init parameter's deprecated name.defaultValue - the default value to return in case the parameter was not set
java.lang.NullPointerException - if context or name is null
public static int getIntegerInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name,
int defaultValue)
context - the application's external contextname - the init parameter's namedeprecatedName - the init parameter's deprecated name.defaultValue - the default value to return in case the parameter was not set
java.lang.NullPointerException - if context or name is null
public static int getIntegerInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names)
context - the application's external contextnames - the init parameter's names
java.lang.NullPointerException - if context or name is null
public static int getIntegerInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names,
int defaultValue)
context - the application's external contextnames - the init parameter's namesdefaultValue - the default value to return in case the parameter was not set
java.lang.NullPointerException - if context or name is null
public static long getLongInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name)
context - the application's external contextname - the init parameter's namedeprecatedName - the init parameter's deprecated name.defaultValue - the default value to return in case the parameter was not set
java.lang.NullPointerException - if context or name is null
public static long getLongInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name,
long defaultValue)
context - the application's external contextname - the init parameter's namedeprecatedName - the init parameter's deprecated name.defaultValue - the default value to return in case the parameter was not set
java.lang.NullPointerException - if context or name is null
public static long getLongInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names)
context - the application's external contextnames - the init parameter's names
java.lang.NullPointerException - if context or name is null
public static long getLongInitParameter(javax.faces.context.ExternalContext context,
java.lang.String[] names,
long defaultValue)
context - the application's external contextnames - the init parameter's namesdefaultValue - the default value to return in case the parameter was not set
java.lang.NullPointerException - if context or name is null
public static <T> T getInstanceInitParameter(javax.faces.context.ExternalContext context,
java.lang.String name,
java.lang.String deprecatedName,
T defaultValue)
context - the application's external contextname - the init parameter's namedeprecatedName - the init parameter's deprecated name.defaultValue - the default value to return in case the parameter was not set
java.lang.NullPointerException - if context or name is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||