public abstract class ReposConfig extends java.lang.Object implements ReposConfiguration
Modifier and Type | Field and Description |
---|---|
java.lang.String |
ConfigEnvironmentVariable |
protected java.util.LinkedHashMap |
ReposMap |
java.lang.String |
SplitString |
java.lang.String |
SysConfigFile |
java.lang.String |
UsrConfigFile |
Constructor and Description |
---|
ReposConfig()
Get the configuration information from the usual places.
|
ReposConfig(java.lang.String S) |
Modifier and Type | Method and Description |
---|---|
void |
addRepository(java.lang.String repos) |
java.util.HashSet |
getButtonTextConfigs() |
java.util.HashSet |
getColorConfigs() |
java.util.LinkedHashMap |
getConfig() |
java.util.HashMap |
getConfig(java.lang.String repository) |
java.lang.String |
getConfigEnvironmentVariable()
This may be overridden so that a class will use a different user configuration file.
|
java.util.Set |
getConfigKeys()
Return the keys of configuration for a particular repository as a Set.
|
java.lang.String |
getConfigValue(java.lang.String config) |
java.lang.String |
getConfigValue(java.lang.String repository,
java.lang.String config)
Return the value of a configuration for a particular repository.
|
java.util.LinkedHashMap |
getDefaultConfig()
Get a HashMap containing the default configuration.
|
java.util.HashSet |
getDirectoryChooserConfigs() |
java.util.HashSet |
getDomainNameFilterConfigs() |
java.util.HashSet |
getFileChooserConfigs() |
java.lang.String |
getFirstSplitConfigValue(java.lang.String repository,
java.lang.String config)
Returns the first configured value when the configuration is treated as a list with items separated
by the split string.
|
java.util.HashSet |
getFontConfigs() |
java.lang.String[] |
getIllegalChars() |
java.util.HashSet |
getIntegerConfigs() |
java.lang.String |
getLastSplitConfigValue(java.lang.String repository,
java.lang.String config)
Returns the last configured value when the configuration is treated as a list with items separated
by the split string.
|
java.util.HashSet |
getOnOffConfigs() |
static java.lang.Class |
getPreferencesClass() |
java.util.Set |
getRepositories()
Get a set of repository names.
|
java.lang.String[] |
getSplitConfigValue(java.lang.String repository,
java.lang.String config)
Returns a String[] of of values delimited by the currently set SplitString.
|
java.lang.String |
getSplitString() |
java.lang.String |
getSysConfigFile()
This may be overridden so that a class will use a different user configuration file.
|
java.util.HashSet |
getTrueFalseConfigs() |
java.lang.String |
getUsrConfigFile() |
java.util.HashSet |
getYesNoConfigs() |
boolean |
hasIllegalChars(java.lang.String value) |
boolean |
hasRepository(java.lang.String repos)
Return true if a configuration exists for the named
repository.
|
java.util.Vector |
importConfig(java.io.File configfile) |
void |
initialize()
(Re)reads the configuration file information.
|
void |
processConfig(java.io.File configfile) |
void |
removeRepository(java.lang.String repos) |
void |
saveConfig()
Save the current configuration back to the configuration file.
|
void |
setConfigValue(java.lang.String config,
java.lang.Object value) |
void |
setConfigValue(java.lang.String repository,
java.lang.String config,
java.lang.String value)
Set the value of a configuration for a particular repository.
|
void |
setSplitConfigValue(java.lang.String repository,
java.lang.String config,
java.lang.String[] V) |
void |
setSplitString(java.lang.String splitter) |
void |
show()
Print the configuration on standard output.
|
void |
showError(java.lang.String msg) |
int |
size() |
abstract java.lang.Class |
supportedInterface()
Returns the Class representing the RepositoryStorage interface which
this configuration supports for storage and transfers.
|
java.lang.Class |
what()
Deprecated.
Use
supportedInterface() instead. |
public java.lang.String SysConfigFile
public java.lang.String UsrConfigFile
public java.lang.String ConfigEnvironmentVariable
protected java.util.LinkedHashMap ReposMap
public java.lang.String SplitString
public ReposConfig()
public ReposConfig(java.lang.String S)
public static java.lang.Class getPreferencesClass()
public java.util.LinkedHashMap getDefaultConfig()
getDefaultConfig
in interface Configuration
@Deprecated public java.lang.Class what()
supportedInterface()
instead.what
in interface ReposConfiguration
public abstract java.lang.Class supportedInterface()
supportedInterface
in interface ReposConfiguration
public java.util.HashSet getDomainNameFilterConfigs()
public java.util.HashSet getButtonTextConfigs()
public java.util.HashSet getIntegerConfigs()
public java.util.HashSet getColorConfigs()
public java.util.HashSet getYesNoConfigs()
getYesNoConfigs
in interface Configuration
public java.util.HashSet getTrueFalseConfigs()
getTrueFalseConfigs
in interface Configuration
public java.util.HashSet getFontConfigs()
public java.util.HashSet getFileChooserConfigs()
getFileChooserConfigs
in interface Configuration
public java.util.HashSet getDirectoryChooserConfigs()
public java.util.HashSet getOnOffConfigs()
getOnOffConfigs
in interface Configuration
public int size()
size
in interface Configuration
public boolean hasRepository(java.lang.String repos)
hasRepository
in interface ReposConfiguration
public void addRepository(java.lang.String repos)
addRepository
in interface ReposConfiguration
public void removeRepository(java.lang.String repos)
removeRepository
in interface ReposConfiguration
public java.lang.String getUsrConfigFile()
getUsrConfigFile
in interface ReposConfiguration
public java.lang.String getSysConfigFile()
getSysConfigFile
in interface ReposConfiguration
public java.lang.String[] getIllegalChars()
getIllegalChars
in interface Configuration
public java.lang.String getConfigEnvironmentVariable()
getConfigEnvironmentVariable
in interface ReposConfiguration
public void initialize()
initialize
in interface Configuration
public void show()
show
in interface Configuration
public java.util.Set getRepositories()
getRepositories
in interface ReposConfiguration
public java.util.LinkedHashMap getConfig()
getConfig
in interface Configuration
public java.util.HashMap getConfig(java.lang.String repository)
getConfig
in interface ReposConfiguration
public java.util.Set getConfigKeys()
getConfigKeys
in interface Configuration
public void setSplitString(java.lang.String splitter)
setSplitString
in interface Configuration
public java.lang.String getSplitString()
getSplitString
in interface Configuration
public java.lang.String[] getSplitConfigValue(java.lang.String repository, java.lang.String config)
getSplitConfigValue
in interface ReposConfiguration
public java.lang.String getFirstSplitConfigValue(java.lang.String repository, java.lang.String config)
public java.lang.String getLastSplitConfigValue(java.lang.String repository, java.lang.String config)
public void setSplitConfigValue(java.lang.String repository, java.lang.String config, java.lang.String[] V)
setSplitConfigValue
in interface ReposConfiguration
public java.lang.String getConfigValue(java.lang.String config)
getConfigValue
in interface Configuration
public java.lang.String getConfigValue(java.lang.String repository, java.lang.String config)
getConfigValue
in interface ReposConfiguration
public void setConfigValue(java.lang.String config, java.lang.Object value)
setConfigValue
in interface Configuration
public void setConfigValue(java.lang.String repository, java.lang.String config, java.lang.String value)
setConfigValue
in interface ReposConfiguration
public boolean hasIllegalChars(java.lang.String value)
hasIllegalChars
in interface Configuration
public void saveConfig()
public void showError(java.lang.String msg)
public java.util.Vector importConfig(java.io.File configfile)
public void processConfig(java.io.File configfile)
processConfig
in interface ReposConfiguration
Copyright © 2011, 2013. Daniel P. Dougherty