com.atlassian.user.configuration
Class DefaultRepositoryConfiguration

java.lang.Object
  extended bycom.atlassian.user.configuration.DefaultRepositoryConfiguration
All Implemented Interfaces:
RepositoryConfiguration

public class DefaultRepositoryConfiguration
extends java.lang.Object
implements RepositoryConfiguration


Field Summary
protected  org.apache.log4j.Logger logger
           
 
Constructor Summary
DefaultRepositoryConfiguration(RepositoryIdentifier identifier, RepositoryProcessor processor, java.util.Map components, java.util.Map componentClassNames)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.log4j.Logger logger
Constructor Detail

DefaultRepositoryConfiguration

public DefaultRepositoryConfiguration(RepositoryIdentifier identifier,
                                      RepositoryProcessor processor,
                                      java.util.Map components,
                                      java.util.Map componentClassNames)
Method Detail

addComponent

public void addComponent(java.lang.String componentName,
                         java.lang.Object component)
Specified by:
addComponent in interface RepositoryConfiguration

getComponent

public java.lang.Object getComponent(java.lang.String componentName)
Description copied from interface: RepositoryConfiguration
Returns the component specified by the name, or null if the component does not exist.

Specified by:
getComponent in interface RepositoryConfiguration

hasComponent

public boolean hasComponent(java.lang.String componentName)
Description copied from interface: RepositoryConfiguration
Returns true if the component exists and is not null, otherwise false.

Specified by:
hasComponent in interface RepositoryConfiguration

getComponentClassName

public java.lang.String getComponentClassName(java.lang.String componentName)
Specified by:
getComponentClassName in interface RepositoryConfiguration

configure

public RepositoryAccessor configure()
                             throws ConfigurationException
Specified by:
configure in interface RepositoryConfiguration
Throws:
ConfigurationException

getIdentifier

public RepositoryIdentifier getIdentifier()
Specified by:
getIdentifier in interface RepositoryConfiguration

hasClassForComponent

public boolean hasClassForComponent(java.lang.String componentName)
Specified by:
hasClassForComponent in interface RepositoryConfiguration

getComponentNames

public java.util.Set getComponentNames()
Specified by:
getComponentNames in interface RepositoryConfiguration
Returns:
an unmodifiable Set of the components specified by this configuration.

setCacheConfiguration

public void setCacheConfiguration(CacheConfiguration cacheConfiguration)
Description copied from interface: RepositoryConfiguration
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.

Specified by:
setCacheConfiguration in interface RepositoryConfiguration

isCachingEnabled

public boolean isCachingEnabled()
Description copied from interface: RepositoryConfiguration
Returns true if caching is enabled for this repository, or false if caching is disabled.

Specified by:
isCachingEnabled in interface RepositoryConfiguration
See Also:
RepositoryConfiguration.getCacheConfiguration(), RepositoryConfiguration.setCacheConfiguration(CacheConfiguration)

getCacheConfiguration

public CacheConfiguration getCacheConfiguration()
Description copied from interface: RepositoryConfiguration
Returns the cache configuration for this repository. If caching is disabled, returns null. You should use RepositoryConfiguration.isCachingEnabled() rather than checking explicitly for null.

Specified by:
getCacheConfiguration in interface RepositoryConfiguration
See Also:
RepositoryConfiguration.isCachingEnabled()


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