com.atlassian.user.configuration
Interface RepositoryConfiguration

All Known Implementing Classes:
DefaultRepositoryConfiguration

public interface RepositoryConfiguration

Represents the configuration of a single repository, with defaults taken from atlassian-user-defaults.xml and override settings coming from atlassian-user.xml.

TODO: At the moment, properties like LDAP host names are retrieved via getComponent(String) with a special constant (like Configuration.HOST). Instead, these properties should be retrieved by a getProperty(String) method on this object.


Method Summary
 void addComponent(java.lang.String componentName, java.lang.Object component)
           
 RepositoryAccessor configure()
           
 CacheConfiguration getCacheConfiguration()
          Returns the cache configuration for this repository.
 java.lang.Object getComponent(java.lang.String componentName)
          Returns the component specified by the name, or null if the component does not exist.
 java.lang.String getComponentClassName(java.lang.String componentName)
           
 java.util.Set getComponentNames()
           
 RepositoryIdentifier getIdentifier()
           
 boolean hasClassForComponent(java.lang.String componentName)
           
 boolean hasComponent(java.lang.String componentName)
          Returns true if the component exists and is not null, otherwise false.
 boolean isCachingEnabled()
          Returns true if caching is enabled for this repository, or false if caching is disabled.
 void setCacheConfiguration(CacheConfiguration cacheConfiguration)
          Set the cache configuration to be used for this repository.
 

Method Detail

getIdentifier

RepositoryIdentifier getIdentifier()

addComponent

void addComponent(java.lang.String componentName,
                  java.lang.Object component)

getComponent

java.lang.Object getComponent(java.lang.String componentName)
Returns the component specified by the name, or null if the component does not exist.


hasComponent

boolean hasComponent(java.lang.String componentName)
Returns true if the component exists and is not null, otherwise false.


getComponentClassName

java.lang.String getComponentClassName(java.lang.String componentName)

configure

RepositoryAccessor configure()
                             throws ConfigurationException
Throws:
ConfigurationException

hasClassForComponent

boolean hasClassForComponent(java.lang.String componentName)

getComponentNames

java.util.Set getComponentNames()
Returns:
an unmodifiable Set of the components specified by this configuration.

setCacheConfiguration

void setCacheConfiguration(CacheConfiguration cacheConfiguration)
Set the cache configuration to be used for this repository. If caching is to be disabled, you can pass a value of null. Caching is disabled by default.


isCachingEnabled

boolean isCachingEnabled()
Returns true if caching is enabled for this repository, or false if caching is disabled.

See Also:
getCacheConfiguration(), setCacheConfiguration(CacheConfiguration)

getCacheConfiguration

CacheConfiguration getCacheConfiguration()
Returns the cache configuration for this repository. If caching is disabled, returns null. You should use isCachingEnabled() rather than checking explicitly for null.

See Also:
isCachingEnabled()


Copyright © 2005-2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.