org.xwiki.configuration.internal
Class AbstractDocumentConfigurationSource

java.lang.Object
  extended by org.xwiki.configuration.internal.AbstractDocumentConfigurationSource
All Implemented Interfaces:
org.xwiki.configuration.ConfigurationSource
Direct Known Subclasses:
SpacePreferencesConfigurationSource, UserPreferencesConfigurationSource, WikiPreferencesConfigurationSource

public abstract class AbstractDocumentConfigurationSource
extends java.lang.Object
implements org.xwiki.configuration.ConfigurationSource

Common features for all Document sources (ie configuration data coming from wiki pages).

Since:
2.0M2
Version:
$Id$

Constructor Summary
AbstractDocumentConfigurationSource()
           
 
Method Summary
 boolean containsKey(java.lang.String key)
          
protected abstract  DocumentReference getClassReference()
           
protected  WikiReference getCurrentWikiReference()
           
protected  DocumentAccessBridge getDocumentAccessBridge()
           
protected abstract  DocumentReference getDocumentReference()
           
 java.util.List<java.lang.String> getKeys()
          
<T> T
getProperty(java.lang.String key)
          
<T> T
getProperty(java.lang.String key, java.lang.Class<T> valueClass)
          
<T> T
getProperty(java.lang.String key, T defaultValue)
          
 boolean isEmpty()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDocumentConfigurationSource

public AbstractDocumentConfigurationSource()
Method Detail

getDocumentReference

protected abstract DocumentReference getDocumentReference()
Returns:
the document reference of the document containing an XWiki Object with configuration data or null if there no such document in which case this configuration source will be skipped

getClassReference

protected abstract DocumentReference getClassReference()
Returns:
the XWiki Class reference of the XWiki Object containing the configuration properties

getDocumentAccessBridge

protected DocumentAccessBridge getDocumentAccessBridge()
Returns:
the bridge used to access Object properties

getCurrentWikiReference

protected WikiReference getCurrentWikiReference()
Returns:
the reference pointing to the current wiki

containsKey

public boolean containsKey(java.lang.String key)

Specified by:
containsKey in interface org.xwiki.configuration.ConfigurationSource
See Also:
ConfigurationSource.containsKey(String)

getKeys

public java.util.List<java.lang.String> getKeys()

Specified by:
getKeys in interface org.xwiki.configuration.ConfigurationSource
See Also:
ConfigurationSource.getKeys()

getProperty

public <T> T getProperty(java.lang.String key,
                         T defaultValue)

Specified by:
getProperty in interface org.xwiki.configuration.ConfigurationSource
See Also:
ConfigurationSource.getProperty(String, Object)

getProperty

public <T> T getProperty(java.lang.String key,
                         java.lang.Class<T> valueClass)

Specified by:
getProperty in interface org.xwiki.configuration.ConfigurationSource
See Also:
ConfigurationSource.getProperty(String, Class)

getProperty

public <T> T getProperty(java.lang.String key)

Specified by:
getProperty in interface org.xwiki.configuration.ConfigurationSource
See Also:
ConfigurationSource.getProperty(String)

isEmpty

public boolean isEmpty()

Specified by:
isEmpty in interface org.xwiki.configuration.ConfigurationSource
See Also:
ConfigurationSource.isEmpty()


Copyright © 2004-2011 XWiki. All Rights Reserved.