public class ParameterCache
This class is for storing a cache of parameters retrieved from a java.util.Properties file that is available to all plugins on the command line. This is used when run_pipeline.pl -configParameters config.txt... is used. config.txt example entries as follow... First five are using by GetDBConnectionPlugin -config config.txt but that should be refactored to individual PluginParameters. Then entry example would be GetDBConnectionPlugin.DBType=sqlite KinshipPlugin.method=TYPE is the standard. PLUGIN_NAME.COMMAND_LINE_NAME=VALUE host=localHost user=sqlite password=sqlite DB=/tempFileDir/outputDir/phgTestDB.db DBtype=sqlite KinshipPlugin.method=Normalized_IBS
public static void load(java.lang.String filename)
Loads the parameter cache with the values in the given java.util.Properties file.
filename - file namepublic static java.util.Optional<java.lang.String> value(Plugin plugin, java.lang.String parameter)
public static java.util.Optional<java.lang.String> value(java.lang.String plugin,
java.lang.String parameter)
Returns the value if any for the given plugin and parameter. Value for PluginClassName.parameter will be returned if it exists. If not, value for parameter will be returned. Otherwise, an empty optional.
plugin - pluginparameter - parameterpublic static java.util.Optional<java.lang.String> value(java.lang.String key)
Returns the value if any for the given key.
key - keypublic static boolean hasValues()
Returns true if this cache has been loaded with values.
public static java.util.Enumeration<?> keys()