Package it.bancaditalia.oss.vtl.config
Class ConfigurationManagerFactory
- java.lang.Object
-
- it.bancaditalia.oss.vtl.config.ConfigurationManagerFactory
-
public class ConfigurationManagerFactory extends Object
Used by the application to obtain implementing instances ofConfigurationManager
, and by various classes implementing components to register properties.- Author:
- Valentino Pinna
- See Also:
VTLGeneralProperties.CONFIG_MANAGER
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<VTLProperty>
findSupportedProperty(Class<?> implementationClass, String name)
Query for a specific property by name, if supported by given class.static ConfigurationManager
getInstance()
static List<VTLProperty>
getSupportedProperties(Class<?> implementationClass)
Allows you to retrieve the properties registered by the given implementation class.static <T> T
instanceOfClass(String className, Class<T> instanceClass, String errorMsg)
static void
registerSupportedProperties(Class<?> implementationClass, VTLProperty... classProperties)
static void
registerSupportedProperties(Class<?> implementationClass, List<VTLProperty> classProperties)
Called by implementation classes to register exposedVTL properties
.
-
-
-
Method Detail
-
getInstance
public static ConfigurationManager getInstance()
- Returns:
- an application-wide
ConfigurationManager
instance.
-
getSupportedProperties
public static List<VTLProperty> getSupportedProperties(Class<?> implementationClass)
Allows you to retrieve the properties registered by the given implementation class.- Parameters:
implementationClass
- The implementation class to query.- Returns:
- The list of exposed properties, empty if the class does not expose any property.
-
findSupportedProperty
public static Optional<VTLProperty> findSupportedProperty(Class<?> implementationClass, String name)
Query for a specific property by name, if supported by given class.- Parameters:
implementationClass
- The implementation class to query.name
- The name of the queried property.- Returns:
- The requested
VTLProperty
instance, or an emptyOptional
if none was found.
-
registerSupportedProperties
public static void registerSupportedProperties(Class<?> implementationClass, List<VTLProperty> classProperties)
Called by implementation classes to register exposedVTL properties
.- Parameters:
implementationClass
- The calling implementation class which is registering properties.classProperties
- TheList
of properties to register.
-
registerSupportedProperties
public static void registerSupportedProperties(Class<?> implementationClass, VTLProperty... classProperties)
- See Also:
registerSupportedProperties(Class, List)
-
-