public class ConfigurationFactory extends Object
It contains the following parameters:
nullhttp://recorder.samebug.io| Modifier and Type | Field and Description |
|---|---|
static String |
DEF_APP_KEY |
static String |
DEF_DEBUG |
static String |
DEF_DEVELOPER_KEY |
static String |
DEF_HELP_MODE |
static String |
DEF_RECORDER_URL |
static String |
DEF_UI_URL |
static String |
DEF_VERSION |
static String |
DEFAULT_PROPERTY_RESOURCE |
static String |
K_APP_KEY |
static String |
K_DEBUG |
static String |
K_DEVELOPER_KEY |
static String |
K_HELP_MODE |
static String |
K_RECORDER_URL |
static String |
K_UI_URL |
static String |
K_VERSION |
| Constructor and Description |
|---|
ConfigurationFactory() |
| Modifier and Type | Method and Description |
|---|---|
static com.samebug.notifier.core.IConfiguration |
fromAppKey(String appKey)
Construct a configuration with the specified application key.
|
static com.samebug.notifier.core.IConfiguration |
fromDefault()
Factory method of the default configuration.
|
static com.samebug.notifier.core.IConfiguration |
fromProperties(Properties props) |
static com.samebug.notifier.core.IConfiguration |
fromPropertyFile(String fileName)
Factory method to create a configuration based on the content of a
property file, given with its absolute path.
|
static com.samebug.notifier.core.IConfiguration |
fromPropertyResource(String resourceName)
Factory method to create a configuration based on the content of a
resource property file.
|
static UUID |
parseAppKey(String appKey) |
static boolean |
parseDebug(String debug) |
static UUID |
parseDeveloperKey(String userKey) |
static int |
parseHelpMode(String helpMode) |
static URL |
parseRecorderURL(String serverAddress) |
static URL |
parseUIURL(String serverAddress) |
static String |
parseVersion(String version) |
public static final String K_APP_KEY
public static final String K_VERSION
public static final String K_RECORDER_URL
public static final String K_DEBUG
public static final String K_UI_URL
public static final String K_DEVELOPER_KEY
public static final String K_HELP_MODE
public static final String DEF_APP_KEY
public static final String DEF_VERSION
public static final String DEF_RECORDER_URL
public static final String DEF_DEBUG
public static final String DEF_UI_URL
public static final String DEF_DEVELOPER_KEY
public static final String DEF_HELP_MODE
public static final String DEFAULT_PROPERTY_RESOURCE
public static UUID parseAppKey(String appKey) throws com.samebug.notifier.core.exceptions.BadAppKey
com.samebug.notifier.core.exceptions.BadAppKeypublic static URL parseRecorderURL(String serverAddress) throws com.samebug.notifier.core.exceptions.BadServerAddress
com.samebug.notifier.core.exceptions.BadServerAddresspublic static URL parseUIURL(String serverAddress) throws com.samebug.notifier.core.exceptions.BadServerAddress
com.samebug.notifier.core.exceptions.BadServerAddresspublic static boolean parseDebug(String debug)
public static UUID parseDeveloperKey(String userKey) throws com.samebug.notifier.core.exceptions.BadDeveloperKey
com.samebug.notifier.core.exceptions.BadDeveloperKeypublic static int parseHelpMode(String helpMode) throws com.samebug.notifier.core.exceptions.BadHelpMode
com.samebug.notifier.core.exceptions.BadHelpModepublic static com.samebug.notifier.core.IConfiguration fromDefault()
throws com.samebug.notifier.core.exceptions.NoConfigFileException,
com.samebug.notifier.core.exceptions.MultipleConfigFileException,
com.samebug.notifier.core.exceptions.BadConfigFile,
com.samebug.notifier.core.exceptions.BadHelpMode,
com.samebug.notifier.core.exceptions.BadServerAddress,
com.samebug.notifier.core.exceptions.BadDeveloperKey
This method will build a configuration based on values taken from many location. Each value is assigned in this order:
com.samebug.notifier.core.exceptions.NoConfigFileExceptioncom.samebug.notifier.core.exceptions.MultipleConfigFileExceptioncom.samebug.notifier.core.exceptions.BadConfigFilecom.samebug.notifier.core.exceptions.BadHelpModecom.samebug.notifier.core.exceptions.BadServerAddresscom.samebug.notifier.core.exceptions.BadDeveloperKeypublic static com.samebug.notifier.core.IConfiguration fromPropertyResource(String resourceName) throws com.samebug.notifier.core.exceptions.NoConfigFileException, com.samebug.notifier.core.exceptions.MultipleConfigFileException, com.samebug.notifier.core.exceptions.BadConfigFile, com.samebug.notifier.core.exceptions.BadServerAddress, com.samebug.notifier.core.exceptions.BadHelpMode
resourceName - the name of the resourcecom.samebug.notifier.core.exceptions.NoConfigFileExceptioncom.samebug.notifier.core.exceptions.MultipleConfigFileExceptioncom.samebug.notifier.core.exceptions.BadConfigFilecom.samebug.notifier.core.exceptions.BadServerAddresscom.samebug.notifier.core.exceptions.BadHelpModepublic static com.samebug.notifier.core.IConfiguration fromPropertyFile(String fileName) throws com.samebug.notifier.core.exceptions.NoConfigFileException, com.samebug.notifier.core.exceptions.MultipleConfigFileException, com.samebug.notifier.core.exceptions.BadConfigFile, com.samebug.notifier.core.exceptions.BadServerAddress, com.samebug.notifier.core.exceptions.BadHelpMode
fileName - the name of the filecom.samebug.notifier.core.exceptions.NoConfigFileExceptioncom.samebug.notifier.core.exceptions.MultipleConfigFileExceptioncom.samebug.notifier.core.exceptions.BadConfigFilecom.samebug.notifier.core.exceptions.BadServerAddresscom.samebug.notifier.core.exceptions.BadHelpModepublic static com.samebug.notifier.core.IConfiguration fromAppKey(String appKey) throws com.samebug.notifier.core.exceptions.BadAppKey
The other parameters are left on default.
appKey - the key of your registered Samebug application, as found on
the documentation site of your app. Must not be
nullcom.samebug.notifier.core.exceptions.BadHelpMode - when appKey is not parsable as a UUID, or is
nullcom.samebug.notifier.core.exceptions.BadAppKeypublic static com.samebug.notifier.core.IConfiguration fromProperties(Properties props)
Copyright © 2014. All rights reserved.