Serializable
, Comparable<ConfigLocator>
public enum ConfigLocator extends Enum<ConfigLocator>
File
) and configuration file retrieval as of the chosen configuration
mode.Modifier and Type | Method | Description |
---|---|---|
File[] |
getFolders() |
Returns the folders to be examined by the according enumeration's
configuration in the order as of evaluation.
|
File[] |
getFolders(File... aFolders) |
Returns the folders to be examined by the according enumeration's
configuration in the order as of evaluation.
|
boolean |
isApplicationBase() |
Determines whether to consider the application's base (the folder where
the JAR resides) folder.
|
boolean |
isApplicationBaseConfig() |
Determines whether to consider the application's base (the folder where
the JAR resides) "config" subfolder.
|
boolean |
isApplicationBaseDotConfig() |
Determines whether to consider the application's base (the folder where
the JAR resides) ".config" subfolder.
|
boolean |
isApplicationBaseDotEtc() |
Determines whether to consider the application's base (the folder where
the JAR resides) ".etc" subfolder.
|
boolean |
isApplicationBaseDotSettings() |
Determines whether to consider the application's base (the folder where
the JAR resides) ".settings" subfolder.
|
boolean |
isApplicationBaseEtc() |
Determines whether to consider the application's base (the folder where
the JAR resides) "etc" subfolder.
|
boolean |
isApplicationBaseSettings() |
Determines whether to consider the application's base (the folder where
the JAR resides) "settings" subfolder.
|
boolean |
isApplicationParentConfig() |
Determines whether to consider the application's parent (the parent
folder of the folder where the JAR resides) "config" subfolder.
|
boolean |
isApplicationParentDotConfig() |
Determines whether to consider the application's parent (the parent
folder of the folder where the JAR resides) ".config" subfolder.
|
boolean |
isApplicationParentDotEtc() |
Determines whether to consider the application's parent (the parent
folder of the folder where the JAR resides) ".etc" subfolder.
|
boolean |
isApplicationParentDotSettings() |
Determines whether to consider the application's parent (the parent
folder of the folder where the JAR resides) ".settings" subfolder.
|
boolean |
isApplicationParentEtc() |
Determines whether to consider the application's parent (the parent
folder of the folder where the JAR resides) "etc" subfolder.
|
boolean |
isApplicationParentSettings() |
Determines whether to consider the application's parent (the parent
folder of the folder where the JAR resides) "settings" subfolder.
|
boolean |
isHostEtc() |
Determines whether to consider the host's "/etc" folder.
|
boolean |
isUser() |
Determines whether to consider the user's home "~" folder.
|
boolean |
isUserConfig() |
Determines whether to consider the user's home "~" subfolder "config".
|
boolean |
isUserDotConfig() |
Determines whether to consider the user's home "~" subfolder ".config".
|
boolean |
isUserDotEtc() |
Determines whether to consider the user's home "~" subfolder ".etc".
|
boolean |
isUserDotSettings() |
Determines whether to consider the user's home "~" subfolder ".settings".
|
boolean |
isUserEtc() |
Determines whether to consider the user's home "~" subfolder "etc".
|
boolean |
isUserSettings() |
Determines whether to consider the user's home "~" subfolder "settings".
|
File |
toFile(String aFileName) |
Retrieves the first
File identified by the given filename located
in one of the according enumeration's configuration locations. |
File |
toFile(String aFileName,
File... aFolders) |
Retrieves the first
File identified by the given filename located
in one of the according enumeration's configuration locations. |
static ConfigLocator |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static ConfigLocator[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConfigLocator HOST_ETC
public static final ConfigLocator APPLICATION_BASE
public static final ConfigLocator APPLICATION_BASE_CONFIG
public static final ConfigLocator APPLICATION_BASE_ETC
public static final ConfigLocator APPLICATION_BASE_SETTINGS
public static final ConfigLocator APPLICATION_BASE_DOT_CONFIG
public static final ConfigLocator APPLICATION_BASE_DOT_ETC
public static final ConfigLocator APPLICATION_BASE_DOT_SETTINGS
public static final ConfigLocator APPLICATION_BASE_ALL
public static final ConfigLocator APPLICATION_PARENT_CONFIG
public static final ConfigLocator APPLICATION_PARENT_ETC
public static final ConfigLocator APPLICATION_PARENT_SETTINGS
public static final ConfigLocator APPLICATION_PARENT_DOT_CONFIG
public static final ConfigLocator APPLICATION_PARENT_DOT_ETC
public static final ConfigLocator APPLICATION_PARENT_DOT_SETTINGS
public static final ConfigLocator APPLICATION_PARENT_ALL
public static final ConfigLocator APPLICATION_ALL
public static final ConfigLocator USER
public static final ConfigLocator USER_CONFIG
public static final ConfigLocator USER_ETC
public static final ConfigLocator USER_SETTINGS
public static final ConfigLocator USER_DOT_CONFIG
public static final ConfigLocator USER_DOT_ETC
public static final ConfigLocator USER_DOT_SETTINGS
public static final ConfigLocator USER_ALL
public static final ConfigLocator ALL
public static final ConfigLocator SKIP
public static ConfigLocator[] values()
for (ConfigLocator c : ConfigLocator.values()) System.out.println(c);
public static ConfigLocator valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isHostEtc()
public boolean isApplicationBase()
public boolean isApplicationBaseConfig()
public boolean isApplicationBaseEtc()
public boolean isApplicationBaseSettings()
public boolean isApplicationBaseDotConfig()
public boolean isApplicationBaseDotEtc()
public boolean isApplicationBaseDotSettings()
public boolean isApplicationParentConfig()
public boolean isApplicationParentEtc()
public boolean isApplicationParentSettings()
public boolean isApplicationParentDotConfig()
public boolean isApplicationParentDotEtc()
public boolean isApplicationParentDotSettings()
public boolean isUser()
public boolean isUserConfig()
public boolean isUserEtc()
public boolean isUserSettings()
public boolean isUserDotConfig()
public boolean isUserDotEtc()
public boolean isUserDotSettings()
public File toFile(String aFileName)
File
identified by the given filename located
in one of the according enumeration's configuration locations. If
provided, regards the folder as provided by the system property
SystemProperty.CONFIG_DIR
with highest priority.
Also takes build environment folders into account (least highest
priority) when the launch folder points to an according build environment
(such as maven's "target" folder).public File toFile(String aFileName, File... aFolders)
File
identified by the given filename located
in one of the according enumeration's configuration locations. If
provided, regards the folder as provided by the system property
SystemProperty.CONFIG_DIR
with highest priority. The
programmatically provided folders are regarded with second highest
priority.
Also takes build environment folders into account (least highest
priority) when the launch folder points to an according build environment
(such as maven's "target" folder).public File[] getFolders()
SystemProperty.CONFIG_DIR
with highest priority.
Also takes build environment folders into account (least highest
priority) when the launch folder points to an according build environment
(such as maven's "target" folder).public File[] getFolders(File... aFolders)
SystemProperty.CONFIG_DIR
with highest priority. The
programmatically provided folders are regarded with second highest
priority.
Also takes build environment folders into account (least highest
priority) when the launch folder points to an according build environment
(such as maven's "target" folder).aFolders
- The folders to also take into account.Copyright © 2018. All rights reserved.