net.sourceforge.taglets.simple.configuration
Class SystemPropertyConfiguration

java.lang.Object
  extended by net.sourceforge.taglets.simple.configuration.AbstractConfiguration
      extended by net.sourceforge.taglets.simple.configuration.SystemPropertyConfiguration
All Implemented Interfaces:
Configuration

public class SystemPropertyConfiguration
extends AbstractConfiguration

Configuration that looks up its value in the system properties.

Version:
1.7 (2008/03/30 12:43:19)
Maintainer:
Bruno Essmann <essmann@sourceforge.net>
Since:
1.6.0

Constructor Summary
SystemPropertyConfiguration(Configuration parent)
          Creates a new system property configuration that uses the specified parent.
 
Method Summary
 String getString(String key, String defaultValue)
          Retrieves a String value for the specified key.
 boolean hasValue(String key)
          Check if the configuration supports the specified key.
 String[] listKeys(String prefix)
          Lists all configuration keys with the specified prefix.
 
Methods inherited from class net.sourceforge.taglets.simple.configuration.AbstractConfiguration
getBoolean, getStringList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemPropertyConfiguration

public SystemPropertyConfiguration(Configuration parent)
Creates a new system property configuration that uses the specified parent.

Parameters:
parent - the parent configuration, may be null.
Since:
1.6.0
Method Detail

hasValue

public boolean hasValue(String key)
Description copied from interface: Configuration
Check if the configuration supports the specified key.

Specified by:
hasValue in interface Configuration
Overrides:
hasValue in class AbstractConfiguration
Implementation Notes:
Checks if the system property key exists.
Parameters:
key - the key to check.
Returns:
true if the specified key is supported, false otherwise.
Since:
1.6.0

listKeys

public String[] listKeys(String prefix)
Description copied from interface: Configuration
Lists all configuration keys with the specified prefix.

Specified by:
listKeys in interface Configuration
Overrides:
listKeys in class AbstractConfiguration
Parameters:
prefix - the prefix for all keys to list.
Returns:
the list of configuration entries with the given prefix.
Since:
1.6.0

getString

public String getString(String key,
                        String defaultValue)
Description copied from interface: Configuration
Retrieves a String value for the specified key.

Specified by:
getString in interface Configuration
Overrides:
getString in class AbstractConfiguration
Implementation Notes:
Retrieves the value from the system property key.
Parameters:
key - the key of the value to retrieve.
defaultValue - the default value if the key cannot be found.
Returns:
the String value.
Since:
1.6.0


Taglets Collection 2.0.3 (Build 30)
2008/03/30 15:34:51
Copyright (c) 2002-2008 Bruno Essmann