fr.gouv.culture.sdx.utils.configuration
Class ConfigurationUtils
java.lang.Object
fr.gouv.culture.sdx.utils.configuration.ConfigurationUtils
public class ConfigurationUtils
- extends java.lang.Object
|
Method Summary |
static void |
checkConfAttributeValue(java.lang.String attName,
java.lang.String attValue,
java.lang.String attLocation)
Verifies a configuration attribute value, ie it should not be null or an empty String |
static void |
checkConfiguration(org.apache.avalon.framework.configuration.Configuration configuration)
Verifies a configuration object |
static void |
checkContext(org.apache.avalon.framework.context.Context context)
|
static void |
checkLogger(org.apache.avalon.framework.logger.Logger log)
|
static void |
checkServiceManager(org.apache.avalon.framework.service.ServiceManager serviceManager)
|
static FieldList |
configureFieldList(org.apache.avalon.framework.logger.Logger logger,
org.apache.avalon.framework.service.ServiceManager manager,
org.apache.avalon.framework.context.Context context,
java.lang.String id,
org.apache.avalon.framework.configuration.Configuration configuration)
|
static IDGenerator |
configureIDGenerator(org.apache.avalon.framework.logger.Logger logger,
org.apache.avalon.framework.configuration.Configuration configuration)
|
static FieldList |
configureLuceneFieldList(org.apache.avalon.framework.logger.Logger logger,
org.apache.avalon.framework.context.Context context,
FieldList fieldList)
|
static Repository |
createRepository(org.apache.avalon.framework.logger.Logger logger,
org.apache.avalon.framework.context.Context context,
org.apache.avalon.framework.service.ServiceManager manager,
org.apache.avalon.framework.configuration.Configuration repoConf)
Used to create a repository based upon a 'type' attribute |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurationUtils
public ConfigurationUtils()
configureIDGenerator
public static IDGenerator configureIDGenerator(org.apache.avalon.framework.logger.Logger logger,
org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
configureFieldList
public static FieldList configureFieldList(org.apache.avalon.framework.logger.Logger logger,
org.apache.avalon.framework.service.ServiceManager manager,
org.apache.avalon.framework.context.Context context,
java.lang.String id,
org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
configureLuceneFieldList
public static FieldList configureLuceneFieldList(org.apache.avalon.framework.logger.Logger logger,
org.apache.avalon.framework.context.Context context,
FieldList fieldList)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
createRepository
public static Repository createRepository(org.apache.avalon.framework.logger.Logger logger,
org.apache.avalon.framework.context.Context context,
org.apache.avalon.framework.service.ServiceManager manager,
org.apache.avalon.framework.configuration.Configuration repoConf)
throws SDXException,
org.apache.avalon.framework.configuration.ConfigurationException
- Used to create a repository based upon a 'type' attribute
- Parameters:
repoConf - The configuration object made up of an 'repository' element.manager - The service manager to pass to the repositorycontext - The context object to pass to the repositorylogger - The super.getLog() to pass to the repository and for error handling
- Throws:
SDXException
org.apache.avalon.framework.configuration.ConfigurationException
checkConfAttributeValue
public static void checkConfAttributeValue(java.lang.String attName,
java.lang.String attValue,
java.lang.String attLocation)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Verifies a configuration attribute value, ie it should not be null or an empty String
- Parameters:
attName - The name of the attributeattValue - The value of the attributeattLocation - The location of the configuration object
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException - Thrown if null or an empty String
checkConfiguration
public static void checkConfiguration(org.apache.avalon.framework.configuration.Configuration configuration)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Verifies a configuration object
- Parameters:
configuration - The object to verify
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException - Thrown if the object is null
checkLogger
public static void checkLogger(org.apache.avalon.framework.logger.Logger log)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
checkServiceManager
public static void checkServiceManager(org.apache.avalon.framework.service.ServiceManager serviceManager)
throws org.apache.avalon.framework.service.ServiceException
- Throws:
org.apache.avalon.framework.service.ServiceException
checkContext
public static void checkContext(org.apache.avalon.framework.context.Context context)
throws org.apache.avalon.framework.context.ContextException
- Throws:
org.apache.avalon.framework.context.ContextException
Copyright © 2000-2010 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.