org.sonatype.aether
Class ConfigurationProperties

java.lang.Object
  extended by org.sonatype.aether.ConfigurationProperties

public final class ConfigurationProperties
extends java.lang.Object

The keys and defaults for common configuration properties.

Author:
Benjamin Bentmann
See Also:
RepositorySystemSession.getConfigProperties()

Field Summary
static java.lang.String CONNECT_TIMEOUT
          The timeout (in milliseconds) to wait for a successful connection to a remote server.
static int DEFAULT_CONNECT_TIMEOUT
          The default connect timeout to use if CONNECT_TIMEOUT isn't set.
static boolean DEFAULT_INTERACTIVE
          The default interactive mode if INTERACTIVE isn't set.
static int DEFAULT_REQUEST_TIMEOUT
          The default request timeout to use if REQUEST_TIMEOUT isn't set.
static java.lang.String DEFAULT_USER_AGENT
          The default user agent to use if USER_AGENT isn't set.
static java.lang.String INTERACTIVE
          A flag indicating whether interaction with the user is allowed.
static java.lang.String REQUEST_TIMEOUT
          The timeout (in milliseconds) to wait for a response from a remote server.
static java.lang.String USER_AGENT
          The user agent that repository connectors should reports to servers.
 
Method Summary
static boolean get(java.util.Map<?,?> properties, java.lang.String key, boolean defaultValue)
          Gets the specified configuration property.
static int get(java.util.Map<?,?> properties, java.lang.String key, int defaultValue)
          Gets the specified configuration property.
static java.lang.String get(java.util.Map<?,?> properties, java.lang.String key, java.lang.String defaultValue)
          Gets the specified configuration property.
static boolean get(RepositorySystemSession session, java.lang.String key, boolean defaultValue)
          Gets the specified configuration property.
static int get(RepositorySystemSession session, java.lang.String key, int defaultValue)
          Gets the specified configuration property.
static java.lang.String get(RepositorySystemSession session, java.lang.String key, java.lang.String defaultValue)
          Gets the specified configuration property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTERACTIVE

public static final java.lang.String INTERACTIVE
A flag indicating whether interaction with the user is allowed.

See Also:
DEFAULT_INTERACTIVE, Constant Field Values

DEFAULT_INTERACTIVE

public static final boolean DEFAULT_INTERACTIVE
The default interactive mode if INTERACTIVE isn't set.

See Also:
Constant Field Values

USER_AGENT

public static final java.lang.String USER_AGENT
The user agent that repository connectors should reports to servers.

See Also:
DEFAULT_USER_AGENT, Constant Field Values

DEFAULT_USER_AGENT

public static final java.lang.String DEFAULT_USER_AGENT
The default user agent to use if USER_AGENT isn't set.

See Also:
Constant Field Values

CONNECT_TIMEOUT

public static final java.lang.String CONNECT_TIMEOUT
The timeout (in milliseconds) to wait for a successful connection to a remote server. Non-positive values indicate no timeout.

See Also:
DEFAULT_CONNECT_TIMEOUT, Constant Field Values

DEFAULT_CONNECT_TIMEOUT

public static final int DEFAULT_CONNECT_TIMEOUT
The default connect timeout to use if CONNECT_TIMEOUT isn't set.

See Also:
Constant Field Values

REQUEST_TIMEOUT

public static final java.lang.String REQUEST_TIMEOUT
The timeout (in milliseconds) to wait for a response from a remote server. Non-positive values indicate no timeout.

See Also:
DEFAULT_REQUEST_TIMEOUT, Constant Field Values

DEFAULT_REQUEST_TIMEOUT

public static final int DEFAULT_REQUEST_TIMEOUT
The default request timeout to use if REQUEST_TIMEOUT isn't set.

See Also:
Constant Field Values
Method Detail

get

public static java.lang.String get(java.util.Map<?,?> properties,
                                   java.lang.String key,
                                   java.lang.String defaultValue)
Gets the specified configuration property.

Parameters:
properties - The configuration properties to read, must not be null.
key - The property to read, must not be null.
defaultValue - The default value to return in case the property isn't set, may be null.
Returns:
The property value or null if none.

get

public static java.lang.String get(RepositorySystemSession session,
                                   java.lang.String key,
                                   java.lang.String defaultValue)
Gets the specified configuration property.

Parameters:
session - The repository system session from which to read the configuration property, must not be null.
key - The property to read, must not be null.
defaultValue - The default value to return in case the property isn't set, may be null.
Returns:
The property value or null if none.

get

public static int get(java.util.Map<?,?> properties,
                      java.lang.String key,
                      int defaultValue)
Gets the specified configuration property.

Parameters:
properties - The configuration properties to read, must not be null.
key - The property to read, must not be null.
defaultValue - The default value to return in case the property isn't set, may be null.
Returns:
The property value.

get

public static int get(RepositorySystemSession session,
                      java.lang.String key,
                      int defaultValue)
Gets the specified configuration property.

Parameters:
session - The repository system session from which to read the configuration property, must not be null.
key - The property to read, must not be null.
defaultValue - The default value to return in case the property isn't set, may be null.
Returns:
The property value.

get

public static boolean get(java.util.Map<?,?> properties,
                          java.lang.String key,
                          boolean defaultValue)
Gets the specified configuration property.

Parameters:
properties - The configuration properties to read, must not be null.
key - The property to read, must not be null.
defaultValue - The default value to return in case the property isn't set, may be null.
Returns:
The property value.

get

public static boolean get(RepositorySystemSession session,
                          java.lang.String key,
                          boolean defaultValue)
Gets the specified configuration property.

Parameters:
session - The repository system session from which to read the configuration property, must not be null.
key - The property to read, must not be null.
defaultValue - The default value to return in case the property isn't set, may be null.
Returns:
The property value.


Copyright © 2010 Sonatype, Inc.. All Rights Reserved.