|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sonatype.aether.util.ConfigUtils
public class ConfigUtils
A utility class to read configuration properties from a repository system session.
RepositorySystemSession.getConfigProperties()| Method Summary | |
|---|---|
static boolean |
getBoolean(Map<?,?> properties,
boolean defaultValue,
String... keys)
Gets the specified configuration property. |
static boolean |
getBoolean(RepositorySystemSession session,
boolean defaultValue,
String... keys)
Gets the specified configuration property. |
static int |
getInteger(Map<?,?> properties,
int defaultValue,
String... keys)
Gets the specified configuration property. |
static int |
getInteger(RepositorySystemSession session,
int defaultValue,
String... keys)
Gets the specified configuration property. |
static List<?> |
getList(Map<?,?> properties,
List<?> defaultValue,
String... keys)
Gets the specified configuration property. |
static List<?> |
getList(RepositorySystemSession session,
List<?> defaultValue,
String... keys)
Gets the specified configuration property. |
static long |
getLong(Map<?,?> properties,
long defaultValue,
String... keys)
Gets the specified configuration property. |
static long |
getLong(RepositorySystemSession session,
long defaultValue,
String... keys)
Gets the specified configuration property. |
static Map<?,?> |
getMap(Map<?,?> properties,
Map<?,?> defaultValue,
String... keys)
Gets the specified configuration property. |
static Map<?,?> |
getMap(RepositorySystemSession session,
Map<?,?> defaultValue,
String... keys)
Gets the specified configuration property. |
static Object |
getObject(Map<?,?> properties,
Object defaultValue,
String... keys)
Gets the specified configuration property. |
static Object |
getObject(RepositorySystemSession session,
Object defaultValue,
String... keys)
Gets the specified configuration property. |
static String |
getString(Map<?,?> properties,
String defaultValue,
String... keys)
Gets the specified configuration property. |
static String |
getString(RepositorySystemSession session,
String defaultValue,
String... keys)
Gets the specified configuration property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Object getObject(Map<?,?> properties,
Object defaultValue,
String... keys)
properties - The configuration properties to read, must not be null.defaultValue - The default value to return in case the property isn't set, may be null.keys - The properties to read, must not be null. The specified keys are read one after one until a
valid value is found.
null if none.
public static Object getObject(RepositorySystemSession session,
Object defaultValue,
String... keys)
session - The repository system session from which to read the configuration property, must not be
null.defaultValue - The default value to return in case the property isn't set, may be null.keys - The properties to read, must not be null. The specified keys are read one after one until a
valid value is found.
null if none.
public static String getString(Map<?,?> properties,
String defaultValue,
String... keys)
properties - The configuration properties to read, must not be null.defaultValue - The default value to return in case the property isn't set, may be null.keys - The properties to read, must not be null. The specified keys are read one after one until a
valid value is found.
null if none.
public static String getString(RepositorySystemSession session,
String defaultValue,
String... keys)
session - The repository system session from which to read the configuration property, must not be
null.defaultValue - The default value to return in case the property isn't set, may be null.keys - The properties to read, must not be null. The specified keys are read one after one until a
valid value is found.
null if none.
public static int getInteger(Map<?,?> properties,
int defaultValue,
String... keys)
properties - The configuration properties to read, must not be null.defaultValue - The default value to return in case the property isn't set.keys - The properties to read, must not be null. The specified keys are read one after one until a
valid value is found.
public static int getInteger(RepositorySystemSession session,
int defaultValue,
String... keys)
session - The repository system session from which to read the configuration property, must not be
null.defaultValue - The default value to return in case the property isn't set.keys - The properties to read, must not be null. The specified keys are read one after one until a
valid value is found.
public static long getLong(Map<?,?> properties,
long defaultValue,
String... keys)
properties - The configuration properties to read, must not be null.defaultValue - The default value to return in case the property isn't set.keys - The properties to read, must not be null. The specified keys are read one after one until a
valid value is found.
public static long getLong(RepositorySystemSession session,
long defaultValue,
String... keys)
session - The repository system session from which to read the configuration property, must not be
null.defaultValue - The default value to return in case the property isn't set.keys - The properties to read, must not be null. The specified keys are read one after one until a
valid value is found.
public static boolean getBoolean(Map<?,?> properties,
boolean defaultValue,
String... keys)
properties - The configuration properties to read, must not be null.defaultValue - The default value to return in case the property isn't set.keys - The properties to read, must not be null. The specified keys are read one after one until a
valid value is found.
public static boolean getBoolean(RepositorySystemSession session,
boolean defaultValue,
String... keys)
session - The repository system session from which to read the configuration property, must not be
null.defaultValue - The default value to return in case the property isn't set.keys - The properties to read, must not be null. The specified keys are read one after one until a
valid value is found.
public static List<?> getList(Map<?,?> properties,
List<?> defaultValue,
String... keys)
properties - The configuration properties to read, must not be null.defaultValue - The default value to return in case the property isn't set, may be null.keys - The properties to read, must not be null. The specified keys are read one after one until a
valid value is found.
null if none.
public static List<?> getList(RepositorySystemSession session,
List<?> defaultValue,
String... keys)
session - The repository system session from which to read the configuration property, must not be
null.defaultValue - The default value to return in case the property isn't set, may be null.keys - The properties to read, must not be null. The specified keys are read one after one until a
valid value is found.
null if none.
public static Map<?,?> getMap(Map<?,?> properties,
Map<?,?> defaultValue,
String... keys)
properties - The configuration properties to read, must not be null.defaultValue - The default value to return in case the property isn't set, may be null.keys - The properties to read, must not be null. The specified keys are read one after one until a
valid value is found.
null if none.
public static Map<?,?> getMap(RepositorySystemSession session,
Map<?,?> defaultValue,
String... keys)
session - The repository system session from which to read the configuration property, must not be
null.defaultValue - The default value to return in case the property isn't set, may be null.keys - The properties to read, must not be null. The specified keys are read one after one until a
valid value is found.
null if none.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||