org.xwiki.test
Class MockConfigurationSource

java.lang.Object
  extended by org.xwiki.test.MockConfigurationSource
All Implemented Interfaces:
ConfigurationSource

public class MockConfigurationSource
extends Object
implements ConfigurationSource

Mock ConfigurationSource that returns an empty list of configuration sources.

Since:
1.6M2
Version:
$Id$

Constructor Summary
MockConfigurationSource()
           
 
Method Summary
 boolean containsKey(String key)
           
static org.xwiki.component.descriptor.DefaultComponentDescriptor<ConfigurationSource> getDescriptor(String roleHint)
           
 List<String> getKeys()
           
<T> T
getProperty(String key)
           
<T> T
getProperty(String key, Class<T> valueClass)
           
<T> T
getProperty(String key, T defaultValue)
           
 boolean isEmpty()
           
 void removeProperty(String key)
           
 void setProperty(String key, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockConfigurationSource

public MockConfigurationSource()
Method Detail

getDescriptor

public static org.xwiki.component.descriptor.DefaultComponentDescriptor<ConfigurationSource> getDescriptor(String roleHint)

setProperty

public void setProperty(String key,
                        Object value)

removeProperty

public void removeProperty(String key)

containsKey

public boolean containsKey(String key)
Specified by:
containsKey in interface ConfigurationSource

getKeys

public List<String> getKeys()
Specified by:
getKeys in interface ConfigurationSource

getProperty

public <T> T getProperty(String key,
                         Class<T> valueClass)
Specified by:
getProperty in interface ConfigurationSource

getProperty

public <T> T getProperty(String key,
                         T defaultValue)
Specified by:
getProperty in interface ConfigurationSource

getProperty

public <T> T getProperty(String key)
Specified by:
getProperty in interface ConfigurationSource

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface ConfigurationSource


Copyright © 2004-2011 XWiki. All Rights Reserved.